Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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