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

0 votes
Thorsten Letschert _Decadis AG_
Atlassian Partner
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 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.

Suggest an answer

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

Atlassian Community Events