Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting an Organization field based on Customer the reporter is associated with - project specific

Jennifer Marple
Contributor
August 12, 2025

In JMWE, I'm running an Event-based action to "check" if the reporter of an issue is linked to a company/organization, and if so, apply the organization name to the issue based on that (often they come in blank, especially when by email). I have found that the same company has a couple different names in different projects (example: Company in one project and CompanySPECIALDEPT in another), and there's occasionally overlap of the people/reporters (they're linked to two different companies in two different projects).

Below is my current Nunjucks code for how to set the issue (on the post function "set issue"). When I test this code with one of the users who exists in two projects as above, it's applying the organization name as it appears in a different project than the one the issue was logged under (not sure if it's where they FIRST were linked, or if it's alphabetical) 

Any thoughts on what I could add to make it pick the result from the "same" project as the issue was logged under?

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


Alternatively, if, instead of having the context of "all" of my projects on this action, I had it as a separate event-based action that only defines one specific project - should that solve? (I just tested this with the problem project, and it still seemed to pick the Org name from the "other" project that the user exists under).

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events