You need to sign in to do that
Don't have an account?
tbucket
Gantt Chart Sort Order
What's the easiest (or best) way to change the order of Milestones or Tasks displayed in the Gantt? I can live with an alphabetical order for a little while, but when I have 20 or so Milestones, then I need to add one at line 12 (for example), it can become a bear to edit all Milestones after that one. just to make it sort properly.
I'm sure someone has already tackled this one...just wondering the best way to do it.
Probably worth adding this as an issue over on github.
https://github.com/ForceDotComLabs/Milestones-PM/issues/43
If you go into the chart controller, you should be able to chance the order by clause on a SOQL statement and have it work.
I think it's this class
https://github.com/ForceDotComLabs/Milestones-PM/blob/master/src/classes/Milestone1_Charts_GanttController.cls
soql is on line 119.
All Answers
Probably worth adding this as an issue over on github.
https://github.com/ForceDotComLabs/Milestones-PM/issues/43
If you go into the chart controller, you should be able to chance the order by clause on a SOQL statement and have it work.
I think it's this class
https://github.com/ForceDotComLabs/Milestones-PM/blob/master/src/classes/Milestone1_Charts_GanttController.cls
soql is on line 119.
Milestones PM has two Start Date fields Kickoff__c and Start_Date__c so you can't just input those following "order by" you actually need to use their startDateFieldName. The code will then sort by Start Date regardless of the field name and it will looks like this (starting at line 119):
String query = 'Select '+idFieldName+','+startDateFieldName+','+endDateFieldName+','+nameFieldName+','+completedFieldName+
' from '+objectType+ ' where '+filterFieldName+'=\''+mytarget+'\' order by '+startDateFieldName+'';
Hope that saves some time for y'all.