You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hi guys,
I need help. We have a requirement to set priorities based on the issue type. We are using the JIRA Server 8.20.12 version now. I have written this below code for the Task issue type. It's working fine on the Create screen But not on the edit screen. Can u help me to find a solution for this?
import com.atlassian.jira.component.ComponentAccessor
import static com.atlassian.jira.issue.IssueFieldConstants.PRIORITY
def constantsManager = ComponentAccessor.getConstantsManager()
def formField = getFieldById(PRIORITY)
def availablePriorities = ["High","Low"]
if(issueContext.issueType.name == "Task")
{
formField.setFieldOptions(availablePriorities)
}
Out of the box, you can set priority scheme at the project level in the Server env. However, the scheme is for the entire project and cannot be based on issue types used within a project.
To set priority at issue type + only in the EDIT screen, you will need to use third party paid add-on to accomplish the ask - Example Scriptrunner for Jira and utilize their Behavior component setup -
https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?hosting=datacenter&tab=overview
NOTE - I hope you have already migrated to Data Center env and not staying with the Server env, it is because the Server env support will end at Feb, 2024.
Hope this helps.
Best, Joseph Chung Yin
Jira/JSM Functional Lead, Global Technology Applications Team
Viasat Inc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.