Our goal is to create an Automation for Jira DC that creates one Initiative and then fans out multiple Epics/Stories across different projects from a single request, based on several Yes/No “impacted area” fields, while avoiding duplicate Initiatives.
General Rule Information Jira Data Center xxxx Impacted Areas = 11 binary yes/no select lists created as 11 separate fieldsCustom Field 18503 = “Changes Needed.” Customfield_11902 = Parent Link (Epic → Initiative)Customfield_10006 = Epic Link (Story → Epic)ProjectId 28100 = Strategic InitiativesProjectId 30300 = impacted area delivery project
We worked with support for guidance and landed on the best path, which was more than one rule. We so far have:
- The framework for the rule for when there is only a single impacted area we have created looks like:
- Trigger: Issue is transitioned from status ID 3 to status ID 10001.
- Condition 1: customfield_18503 on the request = “Yes” (e.g., “Changes Needed = Yes”).
- Condition 2 (sub‑branch): If customfield_18700 (Requesting Business Area) = “ACSIS History”, then:
- Create a Story in project 30300, copy summary/description from the request, and link it back to the request via issue link type inward:10000.
- Log Story: createdIssue.key in the audit log.
- Create Initiative:
- Create an Initiative in project 28100 (issue type 12705), copy summary/description from the request, and link it back to the request via issue link type inward:10003.
- Log Initiative: createdIssue.key.
- Store the Initiative key in a smart variable called InitiativeKey.
- Create Epic (linked to Initiative):
- Create an Epic in project 30300 (issue type 10000), copy summary/description from the request, and set customfield_16200 from the request’s customfield_16200.
- In advanced fields, set customfield_11902 (likely Parent Link) to InitiativeKey so the Epic is parented to the Initiative.
- Log Epic: createdIssue.key.
- Create Story (linked to Epic):
- Create a Story in project 30300 (issue type 10001), copy summary/description from the request, set Epic Link (customfield_10006) to the just‑created Epic’s key (createdIssue.key from the Epic step), and copy customfield_16200 from the request.
- Log Story: createdIssue.key.
Note / known issue (not intentional): In the single-impacted-area framework above, the ACSIS History sub-branch creates a Story, but the rule then continues on to create the Initiative → Epic → Story chain as well. That means when customfield_18700 = "ACSIS History" we currently end up with two Stories (one linked to the request and one linked to the Epic). This is not the intended behavior—we want only one Story path to run (either “story-only” or the Initiative/Epic/Story path), so we’re likely missing an ELSE / stop / guard structure there.
Where we need help:
We are struggling to convert this into a rule for multiple impacted areas.
Example: If Impacted Area A = Yes and Impacted Area B = Yes on the same request, we expect 1 Initiative + 2 Epics + 2 Stories, but we currently get 2 Initiatives + 2 Epics + 2 Stories.
We have considered:
- Eleven modified clones of the above rule, but avoiding non-duplication or false positives is challenging. When a single request has 2+ impacted areas = Yes, multiple rules trigger, and each creates an Initiative, so we end up with duplicate Initiatives for the same request. Since our goal is one Initiative per request issue, we need a guard so that even if multiple impacted-area rules fire for the same request transition, only one rule creates the Initiative and the others reuse its key. We are primarily trying to avoid creating multiple Initiatives for the same request when 2+ impacted areas are marked Yes.
- This is where support recommended using a custom field with Lookup Issues from the Jira Automation Actions Landing Page, but we are struggling to implement that correctly.
- We also considered implementing a single, very large and complex rule, but we have not yet gotten it to work, and that would be a step beyond our current level of expertise.
Questions:
- If the best approach is a guard field/flag on the request, what do people typically store (e.g., Initiative key vs boolean), and how do they avoid race conditions?
- We are also open to recommendations for a cleaner approach altogether.
Rule JSON
If it can help, the full JSON of our current progress is:
{"rules":[{"id":213,"clientKey":"com.codebarrel.tenant.global","name":"ACSIS History Impacted","state":"ENABLED","canOtherRuleTrigger":true,"notifyOnError":"FIRSTERROR","authorAccountId":"b15635","actorAccountId":"b15635","created":1772210760677,"updated":1772212970127,"trigger":{"id":"8947","component":"TRIGGER","schemaVersion":1,"type":"jira.issue.event.trigger:transitioned","value":{"synchronous":false,"eventKey":"jira:issue_updated","issueEvent":"issue_generic","fromStatus":[{"type":"ID","value":"3"}],"toStatus":[{"type":"ID","value":"10001"}]},"children":[],"conditions":[]},"components":[{"id":"8948","component":"CONDITION","schemaVersion":1,"type":"jira.comparator.condition","value":{"first":"{{issue.customfield_18503.value}}","second":"Yes","operator":"EQUALS"},"children":[],"conditions":[]},{"id":"8949","component":"CONDITION","schemaVersion":1,"type":"jira.condition.container.block","children":[{"id":"8950","component":"CONDITION_BLOCK","parentId":"8949","schemaVersion":1,"type":"jira.condition.if.block","value":{"conditionMatchType":"ALL"},"children":[{"id":"8952","component":"ACTION","parentId":"8950","schemaVersion":6,"type":"jira.issue.create","value":{"operations":[{"fieldId":"summary","fieldType":"summary","type":"COPY","value":{"type":"COPY","value":"current","additional":"summary"}},{"fieldId":"description","fieldType":"description","type":"COPY","value":{"type":"COPY","value":"current","additional":"description"}},{"fieldId":"project","fieldType":"project","type":"SET","value":{"type":"ID","value":"30300"}},{"fieldId":"issuetype","fieldType":"issuetype","type":"SET","value":{"type":"ID","value":"10001"}},{"fieldId":"issuelinks","fieldType":"issuelinks","type":"SET","value":{"issue":{"type":"COPY","value":"trigger"},"linkType":"inward:10000"}}],"sendNotifications":false,"useLegacyRendering":false},"children":[],"conditions":[]},{"id":"8953","component":"ACTION","parentId":"8950","schemaVersion":1,"type":"codebarrel.action.log","value":"Story: {{createdIssue.key}}","children":[],"conditions":[]}],"conditions":[{"id":"8951","component":"CONDITION","conditionParentId":"8950","schemaVersion":1,"type":"jira.comparator.condition","value":{"first":"{{issue.customfield_18700.value}}","second":"ACSIS History","operator":"EQUALS"},"children":[],"conditions":[]}]}],"conditions":[]},{"id":"8954","component":"ACTION","schemaVersion":6,"type":"jira.issue.create","value":{"operations":[{"fieldId":"summary","fieldType":"summary","type":"COPY","value":{"type":"COPY","value":"current","additional":"summary"}},{"fieldId":"description","fieldType":"description","type":"COPY","value":{"type":"COPY","value":"current","additional":"description"}},{"fieldId":"project","fieldType":"project","type":"SET","value":{"type":"ID","value":"28100"}},{"fieldId":"issuetype","fieldType":"issuetype","type":"SET","value":{"type":"ID","value":"12705"}},{"fieldId":"issuelinks","fieldType":"issuelinks","type":"SET","value":{"issue":{"type":"COPY","value":"trigger"},"linkType":"inward:10003"}}],"sendNotifications":false,"useLegacyRendering":false},"children":[],"conditions":[]},{"id":"8955","component":"ACTION","schemaVersion":1,"type":"codebarrel.action.log","value":"Initiative: {{createdIssue.key}}","children":[],"conditions":[]},{"id":"8956","component":"ACTION","schemaVersion":1,"type":"jira.create.variable","value":{"id":"_customsmartvalue_id_1772209174764","name":{"type":"FREE","value":"InitiativeKey"},"type":"SMART","query":{"type":"SMART","value":"{{createdIssue.key}}"},"lazy":false},"children":[],"conditions":[]},{"id":"8957","component":"ACTION","schemaVersion":6,"type":"jira.issue.create","value":{"operations":[{"fieldId":"summary","fieldType":"summary","type":"COPY","value":{"type":"COPY","value":"current","additional":"summary"}},{"fieldId":"description","fieldType":"description","type":"COPY","value":{"type":"COPY","value":"current","additional":"description"}},{"fieldId":"project","fieldType":"project","type":"SET","value":{"type":"ID","value":"30300"}},{"fieldId":"issuetype","fieldType":"issuetype","type":"SET","value":{"type":"ID","value":"10000"}},{"fieldId":"customfield_16200","fieldType":"com.atlassian.jira.plugin.system.customfieldtypes:select","type":"SET","value":{"type":"SMART","value":"{{issue.customfield_16200.value}}"}}],"advancedFields":"{\n“fields”:{\n“customfield_11902”: {“value”:”{{InitiativeKey}}”}\n}}","sendNotifications":false,"useLegacyRendering":false},"children":[],"conditions":[]},{"id":"8958","component":"ACTION","schemaVersion":1,"type":"codebarrel.action.log","value":"Epic: {{createdIssue.key}}","children":[],"conditions":[]},{"id":"8959","component":"ACTION","schemaVersion":6,"type":"jira.issue.create","value":{"operations":[{"fieldId":"summary","fieldType":"summary","type":"COPY","value":{"type":"COPY","value":"current","additional":"summary"}},{"fieldId":"description","fieldType":"description","type":"COPY","value":{"type":"COPY","value":"current","additional":"description"}},{"fieldId":"project","fieldType":"project","type":"SET","value":{"type":"ID","value":"30300"}},{"fieldId":"issuetype","fieldType":"issuetype","type":"SET","value":{"type":"ID","value":"10001"}},{"fieldId":"customfield_10006","fieldType":"com.pyxis.greenhopper.jira:gh-epic-link","type":"SET","value":{"type":"SMART","value":"{{createdIssue.key}}"}},{"fieldId":"customfield_16200","fieldType":"com.atlassian.jira.plugin.system.customfieldtypes:select","type":"COPY","value":{"type":"COPY","value":"current","additional":"customfield_16200"}}],"sendNotifications":false,"useLegacyRendering":false},"children":[],"conditions":[]},{"id":"8960","component":"ACTION","schemaVersion":1,"type":"codebarrel.action.log","value":"Story: {{createdIssue.key}}","children":[],"conditions":[]}],"projects":[{"projectId":"30000","projectTypeKey":"software"}],"labels":[],"tags