Post

3 followers Follow
0
Avatar

WorkFlow: If a field on Milestones are all set to true, Update the same field for the Project level

I need to set the Parent field "C_Billed" to True, if all the milestone level "C_Billed"'s are True.

If I switch the True and False in the Update $Project.C_Billed field - then the field does change to True so my counts must not be correct.

Here is what I have... I also want to make sure this is the best way to do this.

Thank you!

Gina Cargile Answered

Please sign in to leave a comment.

11 comments

0
Avatar

Hello Gina,

Your Workflow Rule seems to be correct at first glance. Are there any tasks directly under the project?

However, I came up with a more concise way of doing this:

1) Evaluation criteria: IsChanged($C_Billed) || IsTriggeredBy("New")

2) Action 1: New Variable of type Toggle set to TRUE (let's name it AllMilestonesAreOn)

3) Action 2: Update Variable AllMilestonesAreOn

Run on: $ParentProject.Children

Filter: TargetObject.EntityType = 'Milestone' && TargetObject.C_Billed = FALSE

Value = FALSE

4) Action 3: Update Field $ParentProject.C_Billed = AllMilestonesAreOn

How does it work?

1) Runs whenever $C_Billed is updated on a milestone OR when a milestone is created.

2) Defines AllMilestonesAreOn as TRUE (just in case all of them have $C_Billed turned on).

3) Checks if there are any milestones with $C_Billed turned off and updates AllMilestonesAreOn to FALSE in such case.

4) Updates the $C_Billed field on the parent project with the calculated value of AllMilestonesAreOn.

Video: https://www.screencast.com/t/mJWTYayV 

Please let me know if this helps.

Roland Pumputis 0 votes
Comment actions Permalink
0
Avatar

Your screencast link says: "We're sorry! We were unable to locate the requested page."

Gina Cargile 0 votes
Comment actions Permalink
0
Avatar

I tried what you have... It doesn't work (I may have done something wrong)...I put it on the Milestone- is that ok?

Gina Cargile 0 votes
Comment actions Permalink
0
Avatar

Hello Gina,

Sorry about the broken link, this seems to happen to me when I put a space after the link. Try this one: https://www.screencast.com/t/mJWTYayV

Yes, you should've created it on milestone entity. The problem, however, is with the second action - your filter is not set, but should be set to TargetObject.EntityType = 'Milestone' && TargetObject.C_Billed = FALSE 

The value should be set to FALSE.

Please let me know if this works.

Roland Pumputis 0 votes
Comment actions Permalink
0
Avatar

Ok... I didn't understand the filter thing ... I thought you just had an extra floating false :)

I changed Action 2 to be the following, and it still doesn't update for me.  Could it be because I have sub-tasks?  I set those as well- but, still didn't change for me.  I saw your screen video of it working for you.

https://app.box.com/s/y6a7a7fp9rvycf4ag6wh37zvro3nvi0x

Gina Cargile 0 votes
Comment actions Permalink
0
Avatar

Maybe that's a stupid question, but are you sure the Workflow rule is enabled? I had the situation where a workflow switched back to disabled when I was working on it.

Maybe that's just that, or you could post a screenshot of your project structure.

Here, the milestones should be directly under the project (because $Children are direct children only). So, 2 possible reasons for your workflow not to update.

Also, to know if the workflow launch or not, you can add a "Notify" action at the end. You'll get a pop-up when the workflow runs (on every page opened in Clarizen, if you use multiple windows or tab in your browser).

Armand BOLMONT 0 votes
Comment actions Permalink
0
Avatar

I actually meant to say - it is definitely enabled.

I added a notify, and it runs when I turn one on or off... it just doesn't set the toggle.

Gina Cargile 0 votes
Comment actions Permalink
0
Avatar

For Action #3 - What should it be Run On?  I had CurrentOjbect - that I just changed to  $ParentProject.C_Billed

Value=

$ParentProject.C_Billed = AllMilestonesAreOn

But, it still doesn't work.

 

 

Gina Cargile 0 votes
Comment actions Permalink
0
Avatar

Action 3 should be "Update Field" (so, no "Runs On", just the field).

The field to change should be $ParentProject.C_Billed

Value should be AllMilestonesAreOn

 

 

 

Armand BOLMONT 0 votes
Comment actions Permalink