I realize I really dont understand the documentation about JIRA Script runner because there is absolutely no example of what I'm looking for. Could you help me ?
I'm looking for 2 scripts.
Thank you.
Hello,
Story points is a custom field. You can access it like this:
import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.issue.IssueManager;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.MutableIssue;
CustomFieldManager customFieldManager = ComponentManager.getInstance().getCustomFieldManager();
CustomField customField_name = customFieldManager.getCustomFieldObjectByName( "customfield_name" );
customfield_value = issue.getCustomFieldValue( customField_name))
I finally found hoe to set the priority
import com.atlassian.jira.issue.MutableIssueif (issue.summary.contains("Urgent") || issue.summary.contains("URGENT")) { MutableIssue mutableIssue = (MutableIssue) issue; mutableIssue.setPriorityId("2");}
I'm sill looking for my point two.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know, especially when someone fixes their own problem.
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.