Remove flag from parent issue!

Hey everyone,

We have a post function set up that when a defect sub-task is transition into a status "in refinement" the parent issue (story) will automatically get flagged; we are using this post function on the transition "to in refinement"

Post function in Copy a parsed text to a field function

Taget Field: Parents flagged - %{00016} = "In Refinement" ? "Impediment" : ""


What we now need is a post function that when a defect sub-task is transition from in refinement to any other status that the flag is automatically taken off the parent issue (story) 

 

Thanks

2 answers

1 accepted

This widget could not be displayed.

In addition to the comment from @Bob Swift [Bob Swift Atlassian Add-ons] I would also think about the edge case where you had two defect subtasks which would have caused the parent issue to be flagged. Do you still want to clear the parent if only one defect has moved to "In Refinement"?

Good point, if so, then you would add another condition to the post function using JQL to check if there were any other subtasks not in that state. Condition on the JQLresult (%jql_result_count%) being 0.

Hi @Bob Swift [Bob Swift Atlassian Add-ons]
Maybe you can help me creating the correct expression for a conditional Execution of a post function?

My workflow is
To Do --> In Progress --> Impeded --> Done

I have made following post functions on transitions TO "Impeded"
1. Set Flagged to "impediment" 
2. Copies value of Flaggeed to parent issue replacing existing values

Post functions on transitions FROM Impeded
1. Clears Flagged
2. Copies Value of Flagged to parent issue replacing existing values

All seems to be working fine however:
I want a condition on post function number 2, so that the flag on parent issue will NOT be cleared if the parent issue have other subtask(s) with Status = Impeded.

I have no experience in groove expression :(

I hope you can help me figuring this out as this is the last step of setting up my workflow.

/Jacob

For post function #2, if you need to condition ONLY on the clearing flag and not the other, then you need to split the post function into 2 parts. The you condition the first part based on the JQL result returning 0 entries as mentioned above. So you would use Update issues post function with your condition and JQL query. It would simply set the Flagged custom field value to blank.

More specifically:

Condition 1: %jql_result_count%, Regex pattern: 0

 

This widget could not be displayed.

The Update issues post function from Update on Transition for JIRA can be used to set any custom field including Flagged. The issue to update would be %parent_key% (substitution variable), You can condition the update based on the issue type - see How to use pattern matching conditioning

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

95 views 1 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you