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!