Hi Team,
Our team needs assistance automatically populating the "Issue Type" field with the value from a "custom field." Can this be achieved using Script Runner, JMWE, and JSU add-ons?
Hi @Lakshmi CH.
Yes, it is possible to do it using Scriptrunner.
At first, you need to configure a behaviour that executes when you update the custom field.
Inside the behaviour, you can use the following lines to make your script works:
import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE
// Get all the issue types available
def allIssueTypes = ComponentAccessor.constantsManager.allIssueTypeObjects
//Get the issue Type Field
def issueTypeField = getFieldById(IssueFieldConstants.ISSUE_TYPE)
//You need to obtain the value of the custom field, and find the correct
//Issue type that you want to add
//Update the Issue Type value.
issueTypeField.setFieldOptions(<your variable with the proper issue type>)
Hi Lakshmi - I believe this will only be possible using the ScriptRunner Behaviours app.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @John Funk
Do you happen to have any sample code available?
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.