How to validate if all sub-tasks are closed before closing parent and if not prompt a message

Thyagaraj Gopalakrishna July 23, 2019

I have already tried Sub-Task Blocking Condition to prevent closing parent issue when any of the sub-task is not closed. It just hides the transition status if any sub-task is not closed.

Now I'm looking for some validator which validates if all the sub-tasks are closed if anyone tries to close the parent issue, and if any of the sub-task is not closed then prompt a simple message to notify to close the sub-tasks before closing parent.

Simply, I'm just looking to promote a message while closing parent issue if sub-task is not closed. Please let me know if we can do this without installing any add-ons/plugins.

 

Any help is appreciated!

3 answers

1 accepted

1 vote
Answer accepted
Radhika Vijji _Innovalog_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 23, 2019

Hi Thyagaraj,

You can use the Linked Issues Status Validator of JMWE for this. 

Regards,

Radhika

Thyagaraj Gopalakrishna July 24, 2019

Hi @Radhika Vijji _Innovalog_ thanks for replying. Need some help in configuring above validator. The validator looks to be specific for Linked Issues rather sub-tasks. Or may be I don't know how to use it. Can you please type or share any screenshot for configuring sub-task 

Radhika Vijji _Innovalog_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 24, 2019

Hi again,

No, it isn't specific for linked issues. You can use this validator on the Sub-tasks too. 

  • "Issue Link Type" select the Link type as "is Parent Of"
  • Issue Type, select a Issue type if you want this validation to be done on Sub-tasks of the specific issue type. Leave "Any" for no restricitions
  • Select the status(es) to be checked for under the Status(es) field. 
  • Input an error message in "Error message" or leave it empty for a default message

Regards,

Radhika

Like # people like this
Thyagaraj Gopalakrishna July 24, 2019

Hi @Radhika Vijji _Innovalog_ Thanks a lot. It worked!!!. You saved my day.

0 votes
Amir Katz (Outseer)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 26, 2022

An update (for cloud) on the answer provided by @Radhika Vijji _Innovalog_

There are actually two JMWE validators with similar names.

The one that Radhika mentioned ('Linked Issues Status Validator') does not work for me.

I think that it relies on link type 'is parent of' which is not created by Jira when you create a sub-task.

The other one, 'Linked Issues Validator' works for me.

Here is my working config for this validator:

If issue links of the is Parent of link type exist on the issue , the linked issues must be of type Sub Task Dev , and all linked issues must satisfy the following Jira expression:

issue.status.name == "Done" || issue.status.name == "Rejected"


The following message will be displayed if validation fails: All child sub-tasks must be in status 'Done' or 'Rejected' before you can close this parent ticket

Amir Katz (Outseer)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 26, 2022

A more recent update - the 2nd one does not work either...I suspect it's the same problem - it assumes there's a issue link between the parent and child, and there isn't.

For now, I gave up on the validator and instead I am using the simple, Atlassian-provided condition that checks sub-tasks statuses.

From UX perspective, a condition is not as good as a validator, but the end result is the same - user cannot transition the parent if the children are not in the expected statuses.

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 23, 2019

Hello,

I believe that you should use the Sub-Task Blocking Condition. Such validator does not exist.

Thyagaraj Gopalakrishna July 24, 2019

Hi @Alexey Matveev , thanks for confirming. Isn't there any other way, I can give a try if we can do this building own our plugin. Just need some starting point where to start from

Suggest an answer

Log in or Sign up to answer