Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Block Initial transition if no subtask is created in issue

priyanka
Contributor
July 12, 2022

Hi All,

 

We are trying to block Initial transition if no sub-task is added to the story: For this we want when issue moves from to do to in progress it should check if subtask is not created under story it should block the transition. We are not able to find such condition in existing jira WF conditions.

Any suggestions or guidance would be appreciated.

1 answer

1 accepted

2 votes
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 12, 2022

Hi @priyanka 

Assuming this is for a company managed project, you can do this with a custom field, automation and a workflow validator...

Custom Field

The custom field will be used as a flagging mechanism that will serve as the catalyst for the workflow validator. Don't add the field to the screen, but it needs to be part of the project's field configuration.

For illustration purposes, I'll call the field Admin.  If the field is empty, the validator won't let the transition occur.

Automation

Use automation to set the Admin field (I'm using "Passed") whenever Sub-Tasks are created so it can pass the validator logic:

  • TRIGGER: Issue Created
  • CONDITION: Issue Type = Sub-Task
  • BRANCH: Parent 
    • ACTION: Edit Issue - Admin = Passed

Validator

On the desired transition set up your validator like this:

  • Field Required Validator
    • Fields required for this transition: Admin
    • Error Message: The error message you'd like your team members to see
priyanka
Contributor
July 13, 2022

Thank you @Mark Segall that works well if we have to achieve this using native functionalities of jira.

But what if someone creates a subtask and deletes it before moving to in progress transition ? I think this would set the value and we can by pass the validator

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 13, 2022

Hi @priyanka - You could create a separate automation for Issue Deleted...

  • TRIGGER: Issue Deleted
  • CONDITION: Issue Type = Sub-Task
  • BRANCH: Parent
    • CONDITION: Related Issues Sub-Tasks are not present
    • ACTION Edit Issue - Clear the field
priyanka
Contributor
July 14, 2022

Perfect !! thanks alot :-)

Like Mark Segall likes this

Suggest an answer

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

Atlassian Community Events