Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Assigning organizations field based on customer that raised the query


I'm having some issues around trying to improve the following code i have in JMWE. 

issue.fields["Reporter"] isInOrganizations ()

The idea is that the customer will report the ticket, and then the organization that they are from, will be automatically assigned based on the customer/organization setup. Now that we have tons of organization, a normal if/else check doesn't seem ideal? Just wondering if there is a better method out there?

Thank you.

2 answers

1 accepted

0 votes
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 04, 2019

Hi Patricia,

unfortunately, Jira Service Desk doesn't expose a REST API to access the Organizations to which a Customer belongs. And iterating over each Organization to check whether the customer belongs to it is not a good idea either, as you will quickly reach your Jira Cloud REST API "quota".

I have created to request this feature from Atlassian, but don't hole your breath!

Thank you David. I was hoping that we would have a workaround to this. This doesn't make things easier for us unfortunately. Also thanks for the feature request!

Update: for Cloud users

I have recently been using JMWE and by accessing the service desk API and JMWE this is now possible.


Go to your JMWE app and select: Event-Based Actions and select new

Trigger:  issue created

Project: I have our main service desk selected

Select Add Post function

Set Target issue: Current issue

Add Field: Organizations

options: set only if empty


{{"/rest/servicedeskapi/organization?accountId=:issue" | callJira( params={"issue":issue.fields.reporter._accountId})}}


Run as add on user and the save.

Save again and then it should set the organization based on the reporters account ID. 

Does this still work for you? I did try it today and I cannot get it to work. The Organizations Field stays empty.

I did find a solution:

{% set result = "/rest/servicedeskapi/organization?accountId=:issue" | callJira(params={"issue":issue.fields.reporter._accountId}) %}
{{ result.values[0].name }}

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events