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?
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.