The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Notifications coming from Service Desk appear to use the project portal name as the 'from' address.
How can I retrieve this value in ScriptRunner?
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()
targetPortalResult.getName()
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.
Cheers!
Dyelamos
Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.