Workflow: Display message to close all sub-tasks in order to Close parent

Janice Castro June 14, 2022

I have Sub-Task Blocking Condition set to prevent closing a parent issue when any of the sub-tasks are not closed. It successfully hides the transition status, however it does not give the user any indication as to why they can't close the ticket.

How can I add messaging to indicate this? Preferably via the default message in the Status area.

 

Clipboard01.png 

2 answers

1 accepted

0 votes
Answer accepted
Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 14, 2022

Hey @Janice Castro ,

A validator instead of a condition would be perfect as they can display error messages to users to provide some context. There's only one issue with what you're trying to achieve. Jira has no similar validator available by default. For this kind of slightly more sophisticated use cases, you should have a look at common workflow apps on the Atlassian Marketplace.

Atlassian Marketplace workflow apps for Jira Cloud 

Best, Max

Janice Castro June 14, 2022

thanks Max -- I looked into ScriptRunner as we do have that already but I am not getting the error message I set up.

We have a transition screen set prior to going to Done (to have users select a resolution) and on the transition screen I see the error message: The following validator rejected the transition: ScriptRunner Script. The configuration is invalid. Contact the app vendor that provided this workflow element.

 

Any thoughts?

Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 14, 2022

Can you also show us the configuration of the workflow element?

Janice Castro June 14, 2022

I added a validator with the following script:

issue.subtasks.filter(subtask => subtask.status.name == 'Done').length == issue.subtasks.length

I was copying this tutorial scriptrunner (with the exclusion of requiring an assignee) https://youtu.be/M-IKsFFAbVE?t=183

The Done transition in my workflow is set to have a transition screen to capture resolution

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 14, 2022

Conditions don't have any way to display why they are removing the option to transition - they're designed to de-clutter - don't offer options to do things that you can't!  You could use a validator instead, but these are less friendly than the condition - they would let the user trigger the transition and then scold them for trying.

I'm afraid the right answer to this is to educate your users on how things are supposed to work and review your process.  Ask them why they are trying to close things that are not finished?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events