Hello @Ramesh Lakshmanasamy
You can get priority like this
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.priority.Priority
def constantsManager = ComponentAccessor.getConstantsManager()
Priority priority = constantsManager.getPriorities().find {it.name == "High"}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This method for sure return Priority object, may be you need priority id?
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.priority.Priority
def constantsManager = ComponentAccessor.getConstantsManager()
Priority priority = constantsManager.getPriorities().find {it.name == "High"}
def id = priority.id
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got solution Using PriorityManager class but i implemented logic which one you follow the same thanks @Mark Markov
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It would be like this:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.priority.Priority
Priority priority = ComponentAccessor.getConstantsManager().getPriorityObject("priority name")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Where do you need this info? By using Jira Java Api or Jira Rest API? Or somehow else?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It would be like this:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.priority.Priority
Priority priority = ComponentAccessor.getConstantsManager().getPriorityObject("priority name")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear @Alexey Matveev
That method will not work, because getPriorityObject() accept priority id, not name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.