I'm working on a Jira automation rule where I'm trying to grab the assign the user to a task based on a task description. I first grab the substring from the description, and that substring contains the assignee display name as it appears in Jira. However, when I try to assign that string to the displayName attribute, nothing happens.
Could someone please help me work through this?
In the JSON box under "More options" in the rule configuration, I have the following right now:
{
"fields": {
"Assignee":[{"displayName":"{{issue.description.substringAfter("Assignee: ")}}"}]
}
}
You need to use the Atlassian ID for the assignee field, so you would have to use the web request component to send a request to either Get account IDs for users or find users and then get the ID from the result. Your JSON should look something like this:
{ "fields": { "assignee": { "id": "{{webhookData.accountId}}" } } }
I just want to give you a thumbs up, your reply re using the rest api to fetch user id helped out with my automation rule dilemma immensely !
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Trying to do similar by setting the trigger issue's assignee to the one found in branch jql (yes, will always find one).
{ "fields": { {{triggerIssue.assignee}} : { "id" : {{issue.assignee.accountId}} " } } }
is invalid JSON
I'm sure I'm fairly close but trying to get this to work on assignee seems different from custom fields which is usually the example and questions here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Marc Isikoff You cannot set the trigger issue's assignee in a branch, you can only edit the branch issue.
I would break that part out so you have two automations. The first one would do a web request to the second automation with the key to the trigger issue and the assignee that you want to set.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually you can and I just tested it:
Use standard automation (e.g., not branching) of edit issue, assign issue and use copy from another issue -> JQL Issue -> You JQL statement
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.