I have the following issue.
I'm trying to display a notice on the creation page of a case in the customer portal.
I try this with a Scriptrunner web panel
<code>
import com.atlassian.jira.plugin.webfragment.model.JiraHelper import com.atlassian.jira.component.ComponentAccessor import com.atlassian.servicedesk.api.requesttype.RequestTypeService import com.onresolve.scriptrunner.runner.customisers.WithPlugin @WithPlugin("com.atlassian.servicedesk") def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser() def requestTypeService = ComponentAccessor.getOSGiComponentInstanceOfType(RequestTypeService) def query = requestTypeService.newQueryBuilder().serviceDesk(7).requestType(137).build() def reqT = requestTypeService.getRequestTypes(currentUser,query) def requestType = requestTypeService.getRequestTypes(currentUser, query).results def name = requestType.name writer.write( '''<style> label#attachment-label.field-label::after { content: "MyText"; background-color:#fff7e0; color:black; font-family: Arial, Helvetica, sans-serif; } </style> ''' )
</code>
I want to resolve in this line requestTypeService.newQueryBuilder().serviceDesk(7).requestType(137).build() and set the serviceDesk and the requestType from the Url of the creation. But I can't access it. How can i get the url ?