Forums

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

Using a Scriptrunner email handler, we would like to prefill the label field at ticket creation.

Bob Vasey May 25, 2022

We have a Scriptrunner email handler set up in JIRA and working as it should. Now we would like to prefill a specific value in the label field within the initial JIRA ticket creation process.

Does anyone have an example? Of even something similar?

2 answers

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2022

There's a console based script for setting labels over at https://library.adaptavist.com/entity/update-the-labels-for-an-issue-in-jira - it should be quite easy to adapt to be part of an email handler.

0 votes
Djiga Sene May 27, 2022

If i understand when creating a ticket, you want to prefill values in the standard field labels.

If so, you can do it with behaviours (Script Runner).

def values = ["TEST-1", "TEST-2"]

getFieldById("labels").setFormValue(values)

 

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2022

I'm afraid that won't work - it's a Behaviour, not code to be used in a scripted email handler.

Like Djiga Sene likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.5.2
TAGS
AUG Leaders

Atlassian Community Events