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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Prevent creating sub-tasks if parent issue is closed/resolved

How can I Prevent creating sub-tasks if the parent issue is closed/resolved?

I am aware that we can hide the sub-task from below two ways but I am looking for a script runner script to achieve this.

-  Hide the Create-Subtask UI element using one of the built-in Script Fragments. OR
-  We can add workflow transition, property jira.permission.edit=false

 

2 answers

Since we don't want to hide the sub-task create button or disable edit issue, we have added a script validator to stop creating sub-task.

Validator on subtask create workflow.

issue.getParentObject().getStatus().name != "Done"

!("Done"==(issue.getParentObject().getStatus()))
(issue.getParentObject().getStatus().getName()=='Done')

 

Thanks for posting this Rajiv. 

Are you using a plug-in like Script Runner for this validator? Or can it be achieved without a plug-in?

Hi @Brian Longstreet 

Yes, using Script Runner validator

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you