Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Update IssueLink's with Script Runner when a costumField has changed

Daniel
Contributor
August 21, 2019

Hi,

I want to update IssueLinks when a costum field has changed.

The custom field is script runner issue picker, and I want to mirrow the picked issues from that field, into the system field "IssueLink" that other Plugins can use that informations.

To understand my overall goal: I want to restrict the IssueType which can be picked from. Say, only Features and Stories can linekd to an Epic.

No I'm looking for a way to react on the custom field picker. Which I hope is possible with the "CustomFieldUpdateEvent". As I understand the listener it gets all the objects which are custom fields and updated. So how can test if a special field is updated (e.g. Feature Picker)

In this Post I found some help, but not the answer:

https://community.atlassian.com/t5/Answers-Developer-Questions/Can-I-make-a-script-run-every-time-a-custom-field-value-is/qaq-p/509719

I get an error in this line:

def change = event?.getChangeLog()?.getRelated("ChildChangeItem").find {it.field == "Name of custom field"}

What events I have to import?

Can anyone support me on that?

1 answer

0 votes
Daniel
Contributor
August 21, 2019

Working on Jira Version v8.2.3

Script Runner 5.5.8.1-jira8

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events