How to show open sub-task to the parent user while closing Jira
Asked by Leo Nishanth Anthony:

I have enabled a feature in the workflow to prevent issues from being closed while sub-tasks are still open.

Here's the issue I'm encountering: In my workflow,

we have three statuses: **Open, In Progress,** and **Done**. Users can transition forward and backward between these statuses.

For example, from In Progress, a user can move to Done or back to Open. If there are open sub-tasks, the Done status is not shown, which is working as intended. However, the problem is that my end users, who are not from a development background, do not understand why the Done status is not visible. There's no *++error message or information++* explaining this.

**My question is:** How can we inform users that the Done status will only be visible when all sub-tasks are completed?


Answers:
author: Carla Ann Rowland
body: With only tools straight out of the box --one possible thing you can do is write an automation rule that if the sub-tasks of a parent are not in done or canceled status that it sends and email to the assignee --- and put a comment on the ticket; displaying a message pop up requires script runner to write a behavior.

comments: author: Leo Nishanth Anthony
body: this can be considered an work-around, i will create an automation in DC version where i can add a comment in the Jira and re-open the Jira back from closed that way the reporter knows that there are open sub-tasks in the parent


author: Vikrant Yadav
body: Hi [@Leo Nishanth Anthony](/t5/user/viewprofilepage/user-id/1187069) For displaying a message on view screen, you can use Scriptrunner for Jira plugin and create Script Fragment to display message on View Message.

If you don't have Scriptrunner plugin, then another option is to apply Validator on Done status, then user can see **Done** status but won't be able to transition and received an error message that complete all subtasks then only Done transition work.

comments: author: Leo Nishanth Anthony
body: thank you [@Vikrant Yadav](/t5/user/viewprofilepage/user-id/1801711) for the reply, i should've mentioned we don't have scriptrunner.

so lets says i use validator and what is the next condition it need to fulfil, i don't see the same option sub-tasks must be closed as validator-condition. what am i missing ?


author: Vikrant Yadav
body: [@Leo Nishanth Anthony](/t5/user/viewprofilepage/user-id/1187069) Do you have any other plugin like JMWE or JSU ?   
Default validators don't have any validation to check Sub-task status.

Without plugin It's not feasible to set a message on view screen or put validator with message.


author: Leo Nishanth Anthony
body: [@Vikrant Yadav](/t5/user/viewprofilepage/user-id/1801711) we have JSU but i dont see any option that would help here. what am i missing if you let me know


author: Vikrant Yadav
body: [@Leo Nishanth Anthony](/t5/user/viewprofilepage/user-id/1187069) Check this link : <https://beecom-products.atlassian.net/wiki/spaces/JSU/pages/25680475/Linked+Status+Validator>  

Linked Status Validator works for you.   

I don't have Data Center instance now to test and share screenshot, but this one works for you.


author: Leo Nishanth Anthony
body: [@Vikrant Yadav](/t5/user/viewprofilepage/user-id/1801711) since the sub-task is linked to story via parent child relationship, this will not work but really appreciate your time and effort in trying to help.


author: Maciej Dudziak _Forgappify_
body: I am sorry, ignore this message, I didn't read that it is for DC


author: Richard A_ Michaels
body: Hi Leo,  
You should be able to write a ScriptRunner Validator using the following expression  
**issue.subtasks.every(subtask =\> subtask.status.name == 'Done')**  
You can then create a custom message to let the user know they have an subtask which has not been completed.

comments: author: Leo Nishanth Anthony
body: thank you [@Richard A_ Michaels](/t5/user/viewprofilepage/user-id/4990041) for the reply, i should've mentioned we don't have scriptrunner


Tags: data-center

jira-data-center

jira-software