Hello!
I would really like some help with an automation.
There are three steps in my workflow:
Each step is done by a separate person, and the people who do each step will be different for every separate workflow. I have created custom fields (people fields) for each person on the issue, eg:
I would like to write an automation which does the following:
When I change the status from Write to Edit, the issue automatically gets assigned to whoever I've allocated the edit job to.
I have tried the following automations (which haven't worked):
FIRST TRY
When: Issue transitioned from Write to Edit
Then: Edit issue fields Assignee
And: Re-fetch issue data
The rule has been validated, and has run but it's not updating the assignee field with the name of the person who is doing the edit stage.
SECOND TRY
When: Issue transitioned from Write to Edit
Then: Assign the issue to: {{Edit.DisplayNAME}}
And: Re-fetch issue data
Please help!!
Hi @Rosalind Bird -- Welcome to the Atlassian Community!
First thing, smart values are name, spacing, and case-sensitive. When an incorrect one is used, that evaluates to null, often failing to work as expected.
The smart value for the display name of a user is displayName, as in {{issue.myCustomPeopleField.displayName}}
You may also want to use the accountId attribute for issue assignment rather than the displayName: {{issue.myCustomPeopleField.accountId}}
Next, there are several ways to select the users from your custom fields for the various transitioned-to statuses:
Using one rule will reduce the chance of errors and make maintaining the rule easier.
Finally, can your issues ever transition backwards in the workflow, such as from Edit back to Write? If so, please consider to whom the issue should be assigned when that happens.
Kind regards,
Bill
Thanks for the help everyone, I got there in the end :-). The answer was to edit issue and then do advanced options with the following code as shown below.
{
"fields": {
"assignee": { "id": "{{customfield_10057.accountId}}" }
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have two solutions:
1. Automation
Create an Automation, with a condition for each status, like that:
The transition must be empty:
The condition block should be if-else, and analyze the status:
2. Post-Functions
Use a workflows post function in these transitions, setting the field assignee to correct person, like that:
I hope help you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you are doing the issue transition, you have the option of adding a post function. The post function gives the option, to update one field value from another.
based on your problem statement, I suppose this will suite your use case.
if you want to go with automation, can you share screen shot of your automation log to see where the rule is failing?
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.