Hi all,
I would like to create this automation rule:
when an issue is created in Service Desk, clone it, move in another project, and assign it to a specific user.
I can't find the right way to set it, through the JSON part:
{
"update": {
"fields": {
"assignee": {
"name": "Fiorella"
},
"labels": [
{
"add": "cloned"
}
],
"issuelinks": [
{
"add": {
"type": {
"name": "Cloners"
},
"outwardIssue": {
"key": "{{issue.key}}"
}
}
}
]
}
}
I tried even with the id of the user, but it doesn't work.
Do you have any suggestions?
Thanks,
Fiorella
You cannot do that with the user's name, and instead need to find their account id, as shown in this example:
If this is always for the same specific user you may find their account id with a JQL search and then use that value.
Kind regards,
Bill
Thanks a lot for your reply.
Yes,
I tried it, but it still doesn't work:
here is the code:
{
"update": {
"assignee": { "id": "{{initiator.accountId}}" },
"labels": [
{
"add": "cloned"
}
],
"issuelinks": [
{
"add": {
"type": {
"name": "Cloners"
},
"outwardIssue": {
"key": "{{issue.key}}"
}
}
}
]
},
"set": {
"fields": {"assignee": { "id": "{{initiator.accountId}}" }
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In that expression, you appear to be trying to changing assignee twice: once in the "update" and once in the "fields".
And, you have a "set" prior to "fields", but "fields" is a shortcut to using "update" and "set": https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#What--x27-s-the-difference-between-update-and-fields
Please try setting the field once, such as with this:
{
"update": {
"labels": [
{
"add": "cloned"
}
],
"issuelinks": [
{
"add": {
"type": {
"name": "Cloners"
},
"outwardIssue": {
"key": "{{issue.key}}"
}
}
}
]
},
"fields": {
"assignee": { "id": "{{initiator.accountId}}" }
}
}
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.
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.