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?
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.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm afraid that won't work - it's a Behaviour, not code to be used in a scripted email handler.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.