I am trying to do the following:
- Hide summary from create screen (or at the very least have it prepopulated so users can ignore it - right now all I've been able to do is prepopulate it)
- Once the ticket is created, populate summary with a combination of 3 custom fields that are required on the create screen ("Member ID": "Member First Name" + "Member Last Name")
I have the following script set up on the create transition post-function (via Script Runner):
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
customFieldManager = ComponentManager.getInstance().getCustomFieldManager()
customField = customFieldManager.getCustomFieldObjectByName(“Member ID”)
customField1 = customFieldManager.getCustomFieldObjectByName(“Member First Name”)
customField2 = customFieldManager.getCustomFieldObjectByName(“Member Last Name”)
memberid = issue.getCustomFieldValue(customField)
memberfname = issue.getCustomFieldValue(customField1)
memberlname = issue.getCustomFieldValue(customField1)
Issue issue = issue;
issue.summary = memberid + “: “ + memberfname + " " + memberlname;
but no matter what I do I can't get it to work. It keeps just creating the issue with the default Summary that I put into the description of the Summary field on the particular field configuration in question.
Anyone have suggestions on what I'm doing wrong/how I can get this to work? Your help would be much appreciated! Thanks!