The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Force the user to have a task have at least one subtask before moving to another state

Beatriz
February 20, 2025

Hi!

How I can force the user to have a task have at least one subtask before moving to another state?

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Thorsten Letschert _Decadis AG_
Community Champion
February 20, 2025

Hey @Beatriz ,

While this might not be possible out of the box, a workflow app from the Atlassian Marketplace capable of evaluating so-called Jira expressions will do the trick.

Taking Jira Workflow Toolbox as an example, the required steps would be as follows:

  • Open the workflow editor and select the transition of interest
  • Choose between Jira expression condition (by JWT) or Jira expression validator (by JWT)
    • Condition hides the transition if your expression returns false
    • Validator shows the transition but blocks it when trying to confirm if the expression returns false and you're able to show a message on the transition screen
  • Copy and paste the following expression (in the code block)
  • Save, publish - all set!
issue?.subtasks?.length > 0

P.S. I'm part of the team behind the beforementioned app. 

Regards from Germany,
Thorsten

0 votes
Jeffrey Wolfe
Contributor
February 20, 2025

You can enforce this rule in Jira using workflow validators. In your workflow settings, add a Scripted Validator (if you're using ScriptRunner) or a Regular Expression Check to ensure that a task has at least one subtask before transitioning to another state.

Another option is using Jira Automation to send a warning or prevent the transition by reverting the status if no subtasks exist. If you're on Jira Cloud and need a no-code approach, you might need a marketplace app like JSU Automation Suite to enforce this behavior.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events