Post

2 followers Follow
0
Avatar

Creating a Milestone in a Custom Action if it doesn't already exist

I'm trying to create a Custom Action that does a few things:

- Create a Milestone called "Unallocated Tasks" if one doesn't already exist

- Create a Task under the Milestone

- Other steps after this are assign a resource, send an email etc which all works OK.

I've managed to get my CA to create a Milestone every time with a Task, but I'd like to check if there is an existing Milestone already and add the Task to this if it exists. The CA currently creates a Milestone every time and sets the Tasks parent to the new Milestone rather than an existing one.

I've tried using conditional action item but I'm not sure how I find the "Unallocated Tasks" Milestone within a Project so I can then execute a New Item on the result if not found. 

I thought maybe I could use Find Object, but how do I use that within the context of the Project ID that I am passing in? Can anybody help please?

Jamie Lowe

Please sign in to leave a comment.

3 comments

0
Avatar

Hello Jamie,

This is a way to check if a work item with a certain name already exists under the current work item:

 

The milestone creation action should then be moved to a conditional action list with its evaluation criteria set to the 'MilestoneExists' variable.

Please let me know if that works.

Thank you!

Roland Pumputis 0 votes
0
Avatar

Hi Roland,

 

I got as far as adding the conditional action item but it doesn't recognise my "MilestoneExists" variable... any ideas? It's not selectable in the variables list based on what you suggested above?

 

Jamie Lowe 0 votes
0
Avatar

Hello Jamie,

It should definitely work. Could you please try building the custom action from scratch? I suspect this one got corrupted somehow.

Roland Pumputis 0 votes