Can't assign Planned end date in project task table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2024 11:58 PM
Hello,
I am trying to assign a value in the field: Planned end date(end_date) in the project_task table whenever I insert a new project task record from a business rule.I can change the Planned start date because I have change the calculation field to manual but I can't change the Planned end date.I tried to play with the "rollup" and the "allow dates outside schedule" fields but it didn't work. I will be very grateful to any insight.Thanks for any help in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2024 12:58 AM
Do you have a set duration when you create the task? Does the end date change when you update the start date? What does your code look like? And just to be sure: are you trying to move the end date beyond the end date of the project itself?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2024 01:50 AM
Hi Mark.
I have the values of "start date" and "end date" but not the "duration". I know there is another option to set the "end date", by calculating the "duration" and then the "end date" would be calculated automatically but I could not find the code to this either.
I would not mind to keep the tasks "end date" the same as the project's "end date".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2024 02:44 AM
I forgot to mention you Mark.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2024 01:53 AM
Hi @MikeMU ,
I tried your problem in my PDI and it works for me please check below code
var gr = new GlideRecord('pm_project_task');
if(gr.get("0dccaa5f939b82100d5170918bba10af")){
gs.print('Herere');
var date = new GlideDateTime("2024-07-19");
gs.print(date);
date.addDays(1);
gr.end_date = date;
gr.update();
}
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak