Forums

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

Adding multiple organizations based on asset attributes

Gerrit Wahlers
Contributor
July 14, 2025

We want to add jira organizations by adding their organizationID with a automation which are stored as asset attributes.

If a user submits a work item and chooses one or more departments in the customfield "Responsible Departments" (customfield_10384) the organizationID stored as asset Attribute "OrganisationID" should be added as organization.

I tried adding those organizations like adding request participants in this documentation: Manage Request Participants with Automation in JSM Cloud | Jira and Jira Service Management | Atlassian Support

My edit issue-rule looks like this:

{"update": {
"customfield_10002": [
{{#issue.customfield_10384}}{"add": {"id":[{{OrganisationID}}]}}{{^last}},{{/}}{{/}}
]
}
}

I got the error: "Function value has to be a number (customfield_10002)"

I added a additional protocol action to verify my input:
{{#issue.customfield_10384}}{{OrganisationID}}{{^last}},{{/}}{{/}}
returns:

211,78

What am i not seeing here?protocol.pngrule.png

1 answer

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2025

Hi @Gerrit Wahlers 

What type of field is field with id 10002?

I assume 10384 is an asset field, probably you get information like <schema_key>-1234

Add 1st some logging to the rule, to find out what kind of information your get.

Gerrit Wahlers
Contributor
July 14, 2025

customfield_10002 is the jira-standard-field "organizsations" where you can add the customer organizations.

Customfield_10384 holds the "responsible departments". if i log customfield_10384.OrganisationID i get the needed organization IDs.

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2025

Hi @Gerrit Wahlers 

What type of field is the field "Customfield_10384", is this an custom asset field?

What is the content of the field "Customfield_10384", if this is an custom asset field the information would be returned as "asset-1234"

The field organizations, expects an ID of the organization, this can't be an assets identifier.

Gerrit Wahlers
Contributor
July 14, 2025

Hi Marc,

10384 is a custom assetfield.

If i log {{customfield_10384}} i get META-1371036, META-1419952
If i log {{customfield_10384.OrganisationID}} i get the desired 211,78.

The question is how to pass this list of organisations ids to the organizations field.

Suggest an answer

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

Atlassian Community Events