If a user creates a ticket and chooses a department, all department managers should be added as request participants.
1 department can contain up to 5 employees in the attribute "manager". (1:n)
Every employee has one linked jira user in the attribute "Jira User". (1:1)
For a single manager, this "edit issue" step is working, but if a department has multiple Managers, i get the error "Inactive User". It seems the syntax of the list is wrong.
I use the edit issue-function with this JSON:
{
"update":{
"Request participants" :[
{
"add": {
"id":"{{#issue.customfield_10294.Manager}}{{Jira User.ID}}{{^last}}, {{/}}{{/}}"
}
}
]
}
}
Probably a silly question, but have you checked to make sure that one of the managers you're trying to add isn't actually an inactive user?
All manager´s Jira Users are active. I checked it more than one time.
My guess is that he tries to put in the user [User-ID1, User-ID2, User-ID3] instead of (maybe) [User-ID1],[User-ID2],[User-ID3].
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.
Have you tried using log action or a comment to see what the smart value {{#issue.customfield_10294.Manager}}{{Jira User.ID}}{{^last}}, {{/}}{{/}} is returning?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The protocol-action {{#issue.customfield_10294.Manager}}{{Jira User.ID}}{{^last}}, {{/}}{{/}}
gives me for departments with multiple managers this result:
5ecd094edacdxxxx1f893d3e, 712020:587a58ad-dfc5-40ba-xxxx-9b3796523801
and for a department with a single manager this result:
712020:587a58ad-dfc5-40ba-xxxx-9b3796523801
Then, i have this update issue command:
{
"update": {
"customfield_10026": [
{{#issue.customfield_10294.Manager}}
{ "add": { "id": "{{Jira User.ID}}"}}{{^last}}, {{/}}
{{/}}
]
}
}
All departments with a single manager everything works fine. But if a department has multiple managers i got this error:
GER: Geben Sie einen gültigen Wert für "customfield_10026" an (customfield_10026))
ENG: Enter a valid value for “customfield_10026” (customfield_10026))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The funny thing is, if i put all department-managers in a smart value (Branch) (#departmentmanagers = {{issue.customfield_10294.Manager}}) and use this command:
{
"update": {
"customfield_10026": [
{{#departmentmanagers}}
{ "add": { "id": "{{Jira User.ID}}" }}{{^last}}, {{/last}}
{{/departmentmanagers}}
]
}
}
all departments with multiple managers works fine, but not with a single manger.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe just do an IF / ELSE for One / More than one manager, and use the code that works for just one manager in the IF and use the smart value branch in the ELSE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My understanding is asset data is looked up just-in-time, and the Edit Issue action with JSON can have timing problems by parsing too quickly...leading to missing data and errors.
The solution for this is to first build that JSON expression and save it in a Created Variable, perhaps named varJson. This will lookup and fully evaluate the expression before it is needed.
Then use the variable as the JSON in the advanced edit as:
{{varJson}}
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried this, but it does not help either:
{"update": {
"Request participants": [
{{#issue.customfield_10294.Manager}}{"add": {"id":"{{Jira User.ID}}"}}{{^last}},{{/}}{{/}}
]
}
}
Source: Add/Update/Remove Request Participants using Automation | Jira | Atlassian Documentation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.