Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create issue if issue is not found in another project

Tuan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 13, 2023

Hey everyone


I have a few project boards and I'd like to know how to create Epic in another board by first checking whether there is existing Epic based on a field.

 

Example:

  • 2 different boards: A, B
  • Once an Epic reaches In Progress status in A, an Epic will be automatically created in B. A field A ID in B will be auto populated with the corresponding ID in A using {{issue.key}}.

The problem arises when there is also an automation where when a story in A reaches In Progress, the relevant Epic in A will also be moved to In Progress. As such, I would like to implement a validation where if there is an Epic in B that already has the A ID where the value is equal to the ID of the Epic that is moved to In Progress, new Epic will not be created.

 

Thank you.

1 answer

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Champion
February 14, 2023

Hello @Tuan 

Welcome to the Atlassian community!

First we need to clear up some terminology.

Issues (Epics, stories, etc.) exist in Projects.

Boards are a way to view and manipulate issues. Boards are based on Filters that retrieve sets of issues. The issue retrieved can exist in 1 to n Projects.

Issues do not exist "in" boards. 

 

Assuming that A and B are separate projects, this Rule would have to be set up as a multiple project rule, applying to both Project A and Project B. You would set up one rule and in the Rule Details set the Scope to Multiple Projects and specify both Project A and Project B in the Projects field.

 

The outline of your rule would be:

TRIGGER: Issue Transitioned

- To Status: In Progress

 

CONDITION: Issue Fields Condition:

- Issue Type = Epic

 

CONDITION: Issue Fields Condition

- Project = Project A

 

CONDITION: Related Issues Condition

- Related issues: JQL Issues

- JQL: 
project=B and type=Epic and "A ID"={{issue.key}}

- Condition: Are Not Present

- Rule restricted to Projects: Project A, Project B 

Screen Shot 2023-02-14 at 3.20.07 PM.png

 

ACTION: Create Issue

Tuan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 14, 2023

hi @Trudy Claspill

 

Thanks for your reply. I've done some a bit of configuration. Turns out the JQL needs to be:

  • project=B and type=Epic and "A ID"~{{issue.key}}

If is use the equal (=) operator, I'll get the message that the operator is not supported for text field.

Otherwise, the configuration works like a charm!

 

BR,

Tuan

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events