Hello,
I have an automation rule that creates a certain number of stories when it transitions to a new status. Those stories inherit field values from the parent epic. One of the fields is the system field 'Assignee'. However there's a story where the 'Assignee' needs to be selected based on the value of a custom field of the parent. Example: parent field = Sales -> Assignee child story X= John; parent field = Production -> Assignee child story X= Peter
I tried several approaches from a simple 'if' branch to smart values but nothing works. Either the value remains blank, gives an error or the value gets the Assignee of the parent. I suppose this should be simple by using an if/else branch but if the first if doesn't equals the parent field it throws an error (stops creating the rest of the child stories). I don't know whether it has something to do with the just before creation of the child or something else but am stuck.
Can somebody help me with this issue please? Thank you very much.
Best regards,
Joost
Hello @Joost Klykens
Welcome to the Atlassian community.
When asking for help with an Automation Rule that you have constructed that doesn't do what you intend, it will help us help you if you provide us with screen images showing your entire rule, screen images showing the full content of the audit log entry from its execution, and a detailed explanation what results you wanted versus the results that you actually got.
You could use a Lookup Table to create a listing pairing custom values with the related Assignee's account id.
https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-lookup-table
Then in the action where you create the item that needs special handling for the Assignee, use the Lookup Table smart values to set the Assignee field to the account id (in the table) that is paired with the custom field value of the parent issue.
For the stories where you want to copy the assignee, use the Copy option to set the Assignee field.
For the story where you want to set the Assignee based on the custom field, set the field using the smart values for looking up a key in the Lookup Table to get the associated value (Assignee account id)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trudy, thank you for the extensive explanation. I should have added some more info I agree. My lookup table didn't work but suppose it was not correct neither (can't check since I overwrote the rule). I will try to configure and come back with the results. Thank you already.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi again Trudy, I got it working. Thank you very much! Hereby the screenshots of the automation rule:
Overall rule ('Group 1' is created automatically by Jira when using an 'Advanced Component")
Definition of the lookup table 'teamBPM' containing the id's of the persons responsible for the respective teams
The work item where the Assignee needs to be retrieved from the parent epic however based on the value of the team field of the parent and then linked to the lookup table in the automation rule.
Thank you again for your explanation and best regards,
Joost
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Joost Klykens ,
Welcome to Atlassian Community!
To create stories (5 story) when Epic is transitioned from one status to another (ToDo to Inprogress), the rule structure should look like below
Trigger:
Issue transitioned
From: To Do
To: In Progress
Issue type: Epic
Actions:
Create issue (Story 1)
Create issue (Story 2)
Create issue (Story 3)
Create issue (Story 4)
Create issue (Story 5)
Each “Create issue” action:
Project: {{issue.project.key}}
Issue type: Story
Epic Link: {{issue.key}}
Summary: Story X for {{issue.summary}}
To add Assignee from Epic to Story, in create branch follow below:
Project: {{issue.project.key}}
Issue type: Story
Epic Link: {{issue.key}}
Summary: (e.g.) Story 1 for {{issue.summary}}
Assignee: {{issue.assignee}}
Please help me understand if this is helpful?
Regards
Chitra Nagdeo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chitra, thanks for your contribution. This however gives the parent assignee and not the one I need. It's another one depending on the team field value of the parent epic (lookup table).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Joost Klykens & welcome to the community,
You can use the smart value {{triggerissue.parent.assignee}} to pass along the assignee of the parent of the issue that transitioned (triggered the automation rule.
If you paste a screenshot of your automation rule, then it will be easier to help you with it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rudy, thanks for your contribution. This parent assignee is however not the one I need. It's another one depending on the team field value of the parent epic (lookup table).
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.