Behaviours on Linked Issues field

Hi,

For one issue type, I want to restrict the field "Linked issue" to only one value.

I succeeded to do it for the EDIT window (see picture Edit-Window), by using Behaviour plugin. But the code doesn't work for the "Link" dialog box (see picture Link-Dialog-Window) from the menu MORE -> Link

As the field's name is not the same, I supposed that is the reason, but I don't know how to get this name.

Can you help me please?

Just in case, here is the code I'm using:

// Get a pointer to the Issue Links Field
def issueLinksCF = getFieldById("issuelinks-linktype")
issueLinksCF.setFieldOptions(["relates to":"relates to"])

 

Edit-Window.png

Link-Dialog-Window.png

1 answer

0 votes
Alexey Matveev Community Champion Jan 24, 2018

Hello,

Behaviours work only for the Create, Edit, View and Transition Screens. They do not work for the Link screen.

Hi Alexey,

Thank you for this indication, it explains why it doesn't work.

Do you know how to restrict the field in this dialog box with another method?

Alexey Matveev Community Champion Jan 24, 2018

You would need to write your own javascript and put it as web-resource in Scriptrunner

https://scriptrunner.adaptavist.com/latest/jira/fragments/WebResource.html

You can provide atl.general context for your javascript file.

OK tks.

 

I will have a look

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,139 views 13 19
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot