The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Access to current jira from Custom Picker

fromero88
May 29, 2022

Hi,

I've made a Custom pickers as shown in https://docs.adaptavist.com/sr4js/latest/features/script-fields/built-in-script-fields/custom-picker


In my code, I need to make different REST API calls depends of the request type value.


I can access the request type through the following code, but I can't access the jira context to find the issue id of the issue I'm working at.

 

def issue = issueManager.getIssueObject("JIRASD-70")

def requestTypeService = ComponentAccessor.getOSGiComponentInstanceOfType(RequestTypeService)

def reqQ = requestTypeService.newQueryBuilder().issue(issue.id).build()

def reqT = requestTypeService.getRequestTypes(currentUser, reqQ)

def requestTypeName = reqT.getResults()[0].getName()


Any idea to do that?

Thanks!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events