i want to allow the user to close the subtask only if the parent issue is in inprogress state

Sunilkumar k September 17, 2022

Hi,

 

I don't want to allow the user to close the subtask if the parent issue is still in the new state.

I want to make the user to close the subtask only if the parent issue is in inprogress state how can i achieve this ?

 

Please give me the suggestions to achieve this ...!

2 answers

1 vote
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 17, 2022

Hi @Sunilkumar k 

You have to place a condition/validator on the subtask workflow and during the close transition. This condition/validation will check that its parent is in the In Progress status.

0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 17, 2022

you cannot do this OOTB. You need to look at addons, e.g. Scriptrunner or similar. However, maybe a different approach would work? Typically what users want is to ensure that the parent progresses with the sub-tasks. That is, when the first sub-task moves to In Progress the Parent should do so as well. Similarly, when the last sub-task moves to Done then the Parent is moved to Done. If that would work for you then it could be achieved with Automation. There are a number of posts in the Community on how to accomplish this with example rules.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 17, 2022

@Jack Brickey he could achieve that natively using Jira Automation. Not the best approach, but is doable :/

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2022

Hi @Alex Koxaras _Relational_ Do you mean by changing the status of subtask back to In Progress if parent is In progress? or something else?

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2022

One way could be the one you suggest, by transitioning back the subtask to it's previous status, since you can get that value.

Another option would be to:

  • Create a numeric (or text, but change the third bullet accordingly) custom field
  • Place that field on the standard issue type (e.g. task) and subtask on view screen
  • Create an automation rule for task/subtasks
    • On create or transition to any status than in progress
    • Add a value on this field for both issues
  • Create a new automation for tasks
    • When task transition to In Progress
    • For subtasks clear the custom numeric field
  • Add validator on subtasks to Done transition
    • Validate the custom field to be 0

Let's hope that I don't forget anything...

But I wouldn't recommend this solution. It's just not...the right way to go ... :/ 

Like Jack Brickey likes this
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2022

Thanks for the detail. Indeed an interesting workaround but as you indicated pretty tedious.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2022

No man, I wouldn't recommend the above to my worst enemy! LoL :)

Like Jack Brickey likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events