Fusion Manage Forum
Welcome to Autodesk’s Fusion Manage (formerly Fusion 360 Manage) Forum. Share your knowledge, ask questions, and explore popular Fusion Manage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to read Milestone Status (event) in script?

3 REPLIES 3
Reply
Message 1 of 4
Kasper_Arvad
341 Views, 3 Replies

How to read Milestone Status (event) in script?

Hi 

 

I'm working on a script that will give me the average time (in days) from one state in a workflow to another.


avarage days.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

My idea was to use the milestone dates ([01] and [06]) which seems to work fine using this script:

 

script.JPG

 

 

 

 

 

 

 

But in order not to get wrong data, I'm only interested in items that is closed ([06] Done). So my idea was to use the milestone status to tell me if the milestone event was reached or not, and only include the ones where the milestone event was actually reached.

 

I have been searching all over the forum and help pages, but i can't seem to find anywhere that tell me how to reach the milestone status???

 

My guess was that i could reach it through item.milestones[i].milestoneStatus; but this doesn't seem to be right? I'm just getting a result saying it's undefined..

 

Hope someone can help me here..

 

Kasper 

3 REPLIES 3
Message 2 of 4

I tried the following (based on the Help)

 

var myVar = item.milestones[0];

println("milestoneDate: " + myVar.milestoneDate); 
println("milestoneType: " + myVar.milestoneType ); 
println("progress: " +  myVar.progress); 
println("warnThreshold: " + myVar.warnThreshold);  
println("workflowState: " + myVar.workflowState); 
println("workflowStateName: " + myVar.workflowStateName);

And I got the following

 

 

milestoneDate: Sat Sep 20 2014 00:00:00 GMT-0400 (EDT)
milestoneType: ENTER
progress: 10
warnThreshold: 5
workflowState: undefined
workflowStateName: Concept

 

 

So you can read the workflowStateName and the Progress, but I don't think you can read status (it might be a representation of the progress).

 

Does that help?

Message 3 of 4

That's is the same conclusion i came to, but I need to think about where I can get a verification of whether the workflow state is actually reached or not.

Without the verification I run the risk of getting wrong statistics, since the date is populated with the target date which might not be the same as the actual closing date.

 

So I guess i might need to have the script look at the workflow in order to make sure the closed state is reached.

 

Kasper 

Message 4 of 4
shenx
in reply to: Kasper_Arvad

what you need is the milestones[i].status or milestones[i].actualCompleteDate,

 

status = Done means actualCompleteDate not null means it's finished means the green tick in the Status column.

 

status = Awaiting means actualCompleteDate = null means the clock in the Status column

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report