Hi
I have built an automation is triggered when a task is created. Part of the automation is to rename the Summary field based on the custom fields chosen.
Summary Field in Edit Issue
{{issue.fields.ROC Race Location.value}} - {{issue.fields.ROC Race Location.child.value}} : {{issue.customfield_10251}}
That all works and no issue.
What I would like try and do is add the created task to an existing epic.
I have a set of Existing Epics of locations, eg "Sydney Race Course" etc ... When the above automation is created and the location is = Sydney, I would like to move the Issue to the corresponding EPIC.
I assume this will be a JSON file type of rule where it would say if
issue.fields.ROC Race Location.child.value is equal to Sydney then move to EPIC called Sydney Race Course and so on.
Is any one able to help build the syntax, and then I should be able to adapt it.
Note that there are multiple locations that I would need to query.
Thank you in advance
I recommend using a Lookup Table for a scenario like this: https://community.atlassian.com/t5/Automation-articles/Update-Create-lookup-table-action-improvements/ba-p/2427798
This would greatly simplify the rule and make maintenance easier / safer.
For example:
{{issue.ROC Race Location.value}} - {{issue.ROC Race Location.child.value}}
{{varEpicKeyMap.get(varSummaryValue)}}
Please note well:
Kind regards,
Bill
Hi Bill
Thank you ... I've just logged in and will give it a try. I was reading about this last night and wanted to give it a go. Ill let you know how I go.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill ... Thank you so much, that worked as expected and it is so smooth.
Thanks again
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; I am glad to learn that helped!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Assuming you have defined set of epics.
For the created issue (Standard Issue Type), you want to link this issue to the epic.
So, within the same rule, you can add if/else condition
if location matches Sydney
Then add Edit Issue Condition, with following rule in
{
"fields": {
"parent": {
"key": "EPIC-123"
}
}
}
I am assuming there is no field in the issue being created to give you the actual issue key of the epic and hence suggesting a hard coded value of epic for each location.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for responding
I do apologies, I am struggling to understand what you are proposing. This is what I have put together
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the edit issue fields parent,
you need to provide a key to make the current issue child of epic.
So, you can add this under more options. replace EPIC-123 with your actual value
{
"fields": {
"parent": {
"key": "EPIC-123"
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks I got that to work. However I have about 30 locations to build and I wont be able to do it as a single automation using the IF match and Edit option.
I was hoping to be able to write up a single edit issue option and then write up a json file to do the if check then update parent ... something like
if {{issue.fields.ROC Race Location.value}} - {{issue.fields.ROC Race Location.child.value}} = Victoria - Caulfield
then
{
"fields": {
"parent": {
"key": "EPIC-123"
}
}
}
elif
if {{issue.fields.ROC Race Location.value}} - {{issue.fields.ROC Race Location.child.value}} = NSW - Sydney
{
"fields": {
"parent": {
"key": "EPIC-ABC"
}
}
}
And so on ... is that do able?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i don't think JIRA automation supports that :-(
you will need to use to If or else block
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.