PLM 360 General Discussion

Posts: 214
Registered: ‎10-04-2012
Message 1 of 2 (75 Views)

Milestone Status Flag Error

75 Views, 1 Replies
01-04-2013 01:31 PM



I have created a milestone via scripting. The target date is +3 days in the future and the warning date is +7 days in the future. However the warning flag shows up as green (on time) when it should be yellow. I have attached a screenshot. My code is as follows;


var milestone = item.addMilestone();
var target_date = new Date();

if (item.URGENCY === '1 - High')
else if (item.URGENCY === '2 - Medium')
else if (item.URGENCY === '2 - Low')

milestone.setWorkflowState('[04] Closed');
milestone.milestoneType = 'ENTER';
milestone.milestoneDate = target_date;
milestone.warnThreshold = 7;
milestone.progress = 100;

Product Support
Posts: 279
Registered: ‎03-27-2012
Message 2 of 2 (59 Views)

Re: Milestone Status Flag Error

01-07-2013 07:14 AM in reply to: dkeeley



Because the warning date is set to occur after the target date, this will always show as green. The milestone will turn to red though once the target date is passed.


Always make sure the warning date is < the target date. 

Joe Piggee
Support Specialist
Product Support
Autodesk, Inc.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Ask the Community