Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?


Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given

It's not the same without you


Atlassian Community Hero Image Collage

Script Runner - Retrieving the Project Portal Name

Notifications coming from Service Desk appear to use the project portal name as the 'from' address.

How can I retrieve this value in ScriptRunner?

1 answer

You would need to use something like this:]

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.servicedesk.api.portal.Portal
import com.atlassian.servicedesk.api.portal.PortalService

def portalManager = ComponentAccessor.getOSGiComponentInstanceOfType(PortalService)
Portal targetPortalResult = portalManager.getPortalForProject(user, project).right()

Where user is an instance of ApplicationUser and project is an instance of Project.

Mind you, the user must have access rights to this portal, or else this will fail.



Suggest an answer

Log in or Sign up to answer
Community showcase

All you wanted to know about customer support KPIs


132 views 1 5
Read article

Community Events


Find an event


Unfortunately there are no Community Events near you at the moment.

Host an event


Events near you