Hello,
I have added a custom text field to jira called sync and populated with a simple string 1234. I need to be able to get that value (1234) in java so I can use it to do a rest call. my question is how can I get that customfield details of the current issue im on in?
Hello,
You mean with groovy script using the Jira API, right? If that so, you can do it like this:
import
com.atlassian.jira.component.ComponentAccessor
import
com.atlassian.jira.issue.MutableIssue
import
com.atlassian.jira.issue.fields.CustomField
def issueManager = ComponentAccessor.getIssueManager()
def issue = issueManager.getIssueObject(
"TEST-5"
)
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def customfield = customFieldManager.getCustomFieldObjectByName("Testing")
return issue.getCustomFieldValue(customfield)
Regards,
Elifcan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
thanks for the reply! I actually using java with jira api but I will try and convert this to java and give it a try will update you with result
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.