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

How to prevent linking issues to epics that are closed?

Hello all,

I'd like to prevent linking issues to epics that are closed (Epics in status Done for example).
I saw in another post that it is probably possible using a ScriptRunner behavior:

It is possible to define a behaviour which you can attach to the Epic Link field. This behaviour code can look up the status of the selected issue, and if the status is Done then setError on the Epic Link field which would then prevent the user submitting the issue until they choose a different Epic.

The Epic Link field returns a String value like this: "key:SSPA-30" which you can then remove the word "key:" from and use the remaining string with the issueManager.getIssueByCurrentKey(String key) method to get the issue object. Then you can get the status.name from that issue object to check if it equals "Done".

Could someone familiar with ScriptRunner behaviors help?

Thank you!

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.9.2
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