Portlet sorting by date-period fields (260 Views)
Reply
Advisor
Jim Bowen
Posts: 36
Registered: ‎06-24-2009
Message 1 of 6 (260 Views)

Portlet sorting by date-period fields

Hi,
We are using Proposals and Projects in PPM. In Proposals, we are using the standard 'Plannd Start Period' and 'Planned Finish Period' fields, which by default are year-month, as 'January 2009', 'February 2009', etc.

Users would like to include these fields in portlets, and sort by the values. However, it doesn't work the way we want! The sort results will look something like:
April 2008
April 2009
August 2008
August 2009
December 2008
...etc.

Is there any way to get these rows to sort in a logical manner? The only thing I can think of is to change the values to be YYYY MM.

Jim
Advisor
Prabha N
Posts: 14
Registered: ‎09-21-2008
Message 2 of 6 (260 Views)

Re: Portlet sorting by date-period fields

Hi,

I think, you are sorting by period name(visible_parameter). Try sorting by Period_id(parameter),i.e. PRJ_PLAN_START_PERIOD_ID. This should work.

Thanks,
Prabha
Honored Contributor
Mahen M
Posts: 1,029
Registered: ‎11-12-2008
Message 3 of 6 (260 Views)

Re: Portlet sorting by date-period fields

Hi,
The Above value is 'Period Name' is present in the Table called 'KNTA_PERIODS' join this table in your Query and add a order by clause called 'Period_id' or 'SEQ'

Select * from KNTA_PERIODS where PERIOD_TYPE='MONTH' order by Period_id


Kindly let me know if you face any issues.

Thank you.

Regards,
Mahendran M
Advisor
Jim Bowen
Posts: 36
Registered: ‎06-24-2009
Message 4 of 6 (260 Views)

Re: Portlet sorting by date-period fields

Thanks for the input. However, I'm not dealing with a custom portlet. If I were building a custom portlet, I could code around this issue. I'm more concerned with the out-of-the-box portlets that my customers use. 'Request List' is one example. I don't think the customers have the ability to change the way it sorts, nor the ability to sort on non-displayed fields.

Jim
Honored Contributor
Mahen M
Posts: 1,029
Registered: ‎11-12-2008
Message 5 of 6 (260 Views)

Re: Portlet sorting by date-period fields

Hi,
I have not tried on this, but it is worth to give a try, See the Query which gets fired when you run the Request List Portlet, Or you can drill down RequestList.Jsp file from 'deploy/itg.war/web/knta/crt' location.

See if you can do modification in the JSP files.

Good Luck.
Thank you.

Regards,
Mahendran M
Advisor
mcwang
Posts: 21
Registered: ‎12-07-2007
Message 6 of 6 (241 Views)

Re: Portlet sorting by date-period fields

I am having this issue now.. I couple options to pursue:

 

1.  Create a separate field and Planned Finish Day -- then either ask users to fill in that field.   Or create a rule that will grab the start date then populated it with that field.  Then use the portlet to report on that new field.   

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.