Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira Automation: Clone issue to another project and select project

Josh Allen
Contributor
May 15, 2024

Our dev team has a few dozen Jira projects, one for each microservice - we'll use "PAY" as an example jira key for one of those. They use a single Jira project as their main board (MAIN as the key) and have the filter setup to view all projects in that single project board. 

A review ticket gets created each sprint within the specific Jira project (PAY) so that all the work is tracked in the appropriate place, sometimes multiple review tickets get created in multiple projects. They do this for each sprint for whatever microservice they are working on.

I'd like to setup a template jira issue (in MAIN for exampel) in which they can just clone into the appropriate project, but i'm not sure how without having to specifiy each project. In the Clone Issue automation you're required to select the project. Seems like I'd have to set this up within each microservice jira project.

Was trying to think of a way to pull some sort of information from within the ticket like a label or something so that it gets moved to the appropriate project.

Any help is greatly appreciated and happy to provide more details.

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 15, 2024

Hi @Josh Allen 

The create issue and clone issue actions for automation require selecting the project, as you note.  And, I recall there is currently no REST API clone issue function.

Some possible workarounds are:

  1. List of if / else clauses to name each project in the clone action (as you described)
  2. Using the Send Web Request action and REST API functions, get the existing issue data and then create the issue, supplying the project in the JSON.  Copying things like attachments will be more difficult (or not possible) with this approach.
  3. Write your own clone service outside of Jira, and call that from the rule

Kind regards,
Bill

Josh Allen
Contributor
May 15, 2024

Good ideas, thank you Bill. I'll see how far i can get.

Josh Allen
Contributor
May 16, 2024

Okay, i feel closer but not quite.

The first automation works great. In my template issue I add the label SEAP and it will clone the issue into the appropriate project. However, my branching doesn't seem to work. If i add the label ADB instead of SEAP, the audit log says "No Actions Performed". Probably i don't understand how branching works.

Any thoughts?

 

So looks like this:

Screenshot 2024-05-16 at 11.19.21 AM.png

Josh Allen
Contributor
May 16, 2024

I also tried this but same result, no action performed.

Screenshot 2024-05-16 at 11.49.50 AM.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 16, 2024

Are you trying to check for label values of SEAP or ACH?

If so, I believe your rule needs a different structure so it does not halt after the first condition test:

  • trigger: manual
  • branch: to current issue
    • condition: labels contains SEAP
    • action: clone issue...into "SF Event to API Proxy"
  • branch: to current issue
    • condition: labels contains ACH
    • action: clone issue...into "ACH Processor"

 

This allows each branch to proceed and the conditions to succeed or fail without impacting the others.

Josh Allen
Contributor
May 16, 2024

YES! Thank you. That was it. 

The only thing, or most simple thing, i could do was have a template issue, then add the label for the appropriate project, then run the automation so it clones into that project.

This is great. Appreciate the help.

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events