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) 



2 answers

1 accepted

0 votes
Accepted answer

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.


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


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
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,560 views 15 21
Read article

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