You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi -
Currently I'm using a script post-function to add some specific users as Request Participants to a specific type of issue. I'd like to switch that over to use an organization.
I was reading
but that seems more aimed at adding ALL organizations applicable, and only when the ticket is created via JIRA, not the SD portal.
I have two scenarios that I'd need to address with this issue:
1) Add a specific organization upon the creation (via portal) of a ticket in X type
2) Add a specific organization upon the creation (via portal) of a ticket in X type in which a custom field is flagged in a specific way.
Can anyone point me in the right direction on this? Thanks!
Hey Kevin,
You can follow the example in the documentation and if you want to get a specific one then you will need to slightly change the last lines to
def organizationsToAdd = organizationService.getOrganizations(currentUser, organizationsQuery)?.right()?.get()?.results?.find {it.name == "Organization A"} // get the Organizations custom field def cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Organizations") // finally update the organizations custom field cf.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(cf), [organizationsToAdd]), new DefaultIssueChangeHolder())
kind regards, Thanos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.