Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Blocking of Auto sub-task creation if subtask in parent with same summary already exists?

Tracey Ryan
September 17, 2017

I have set up auto-sub task creation using post functions on a couple of transitions in our workflow. However, I our workflow can go back and forth between stages, and therefore i only want the sub-tasks to create the first time it gets transitioned.

Is there a script that i can use in the condition section of the post-script auto-sub task function that will only create the sub-task if a sub-task with the same summary doesn’t already exist on the Parent?  If it does exist, then the sub task wont’ create, but if sub-task doesn’t already exist, then it will create.

 thanks

Tracey

1 answer

1 accepted

1 vote
Answer accepted
Jeison
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 3, 2013

Hi there!

That's actually quite simple, as JQL treats dates as an exact point in time. In other words, if you're searching for issues that were "resolved" on yyyy-MM-dd (without specifying the time), JIRA will only bring issues resolved in that date at 00:00 hour. To make that JQL work, you have to specify an interval of time, as in:

resolved > "2011/01/15" and resolved < "2011/01/16"

The query above will bring issues that were resolved between 2011/01/15 at 00:00h and 2011/01/16 at 00:00h. Alternatively, you can specify the time along with the date using "yyyy/MM/dd HH:mm".

For more information on advanced searching, refer to the documentation here.

Hope it helps!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events