Created
April 27, 2021 05:47
-
-
Save vikrantyadav11/5b9154eac0d5e8c2d06f83a02831f8f1 to your computer and use it in GitHub Desktop.
Restrict System priority field values using Script Runner behaviour
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.atlassian.jira.component.ComponentAccessor | |
import static com.atlassian.jira.issue.IssueFieldConstants.* | |
def formField = getFieldById(PRIORITY) | |
def optionsMap = ComponentAccessor.getConstantsManager().getPriorities().findAll { priority -> | |
priority.getName() in ["Major", "Minor", "Trivial"] | |
}.collectEntries { | |
[(it.id): it.name] | |
} | |
formField.setFieldOptions(optionsMap) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Isranigit
Check this link updating text field based on issue type :- https://gist.github.com/vikrantyadav11/8b8312372bd6487c9758f9c8a1998a95
Replace description with Acceptance Criteria field id for eg : customfield_12345