At Create Issue I want the Summary to be a combination of a few other fields entered in the Create form. Basically I want "Issue Type" + "Entered Summary" + "Custom Field 1" etc
I have Script Runner installed and I have managed to get this script to work:
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.component.ComponentAccessor;
issue.summary = "HR Request Test - " + issue.summary;
And this script is placed in the Create function under Post Functions like this:
Creates the issue originally.
Script workflow function : A custom script will be run:
Adjust name to hardcoded "HR Request Test - " + Summary
from inline script.
Re-index an issue to keep indexes in sync with the database.
Fire a Issue Created event that can be processed by the listeners.
In my project I have 4 Issue Types and some custom fields apart from ordinary JIRA native fields
This is a HR Request scenario, so it's like this in pseudo
"Issue Type" + "CF1" + CF2 + "Entered Summary"
Examples:
"New Headcount;" "Title" + "org-unit" + "Entered Summary"
"Replacement current HC New role;" + "Title New" + "org-unit" + "Entered Summary"
"Replacement current HC Same role;" + "Title" + org-unit" + "Entered Summary"
"Change compensation;" "First name" + "Last name" + "Title" + "Entered Summary"
So the question is how to get Issue Type-value and CF-values into the script