Clone Issue in 2 different project and change the same status

Anonymous January 7, 2022

Hi,

I have 2 Projects,  "Project-X" and "Project-Y".  I have to clone an issue between both the  Projects in the Jira enterprise version.

And, If I change the status of that issue in Project-X, it must also change in Project-Y.

Example:- In Project-X the issue is in ToDo State and I change it into InProgress it should automatically change in Project-Y into InProgress.

 

 

2 answers

2 accepted

2 votes
Answer accepted
Vishwas
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.
January 7, 2022

Hey @Anonymous 

This is possible via automation for Jira plugin in Jira server in case you have it ?

Please take a look at this automation answered in first comment which is very similar to your use case but the thread is for Jira cloud. But the same automation rule mentioned will work for Jira Server too.

In case if you have scriptrunner plugin we can achieve the automation there also. Have a look at this sample code and you can modify as per your requirement https://library.adaptavist.com/entity/transition-the-original-issue-according-to-the-cloned-issue 

Hope this helps !

Regards,

Vishwas

Anonymous January 10, 2022

Hi Vishwas,

Thanks for your response, But I do not have programming knowledge. I tried that code but facing errors.

I referred to this code -->  https://library.adaptavist.com/entity/copy-an-issue-to-a-new-project-and-link-to-the-original .

Can you please help me and give me the exact solution.

Vishwas
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.
January 10, 2022

Sure, which plugin do you have ?. Automation for jira or Scriptrunner ?.

Based on that will help with code

Anonymous January 10, 2022

Using both, You can help me in any plugin which will help us.

Vishwas
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.
January 10, 2022

Hey @Anonymous 

Sure, it is easier always without code :). So will try to get automation rule for you.

But one clarity, so you do clone manually or do you want that also to be automated if so based on what conditions it should get copied form Project-X to Project-Y and after that this happens rite ?

In Project-X the issue is in ToDo State and I change it into InProgress it should automatically change in Project-Y into InProgress.

Regards,

Vishwas

Like Anonymous likes this
Anonymous January 10, 2022

Hi Vishwas,

We are cloning manually and after cloning, we need these changes.

In Project-X the issue is in ToDo State and I change it into InProgress it should automatically change in Project-Y into InProgress.

Please share all automation rule steps.

Thanks & Regards,

Anonymous

Vishwas
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.
January 11, 2022

Hey @Anonymous 

Automation is ready !!

Please navigate to Settings --> System --> Global automation.

There "Create Rule" and do this configuration.

Trigger: Issue transitioned

Condition: Select JQL Condition and add a JQL for your Project X and Y

Branch: For Linked Issues

Action: Transition the issue (Copy from trigger issue)

PFA

Auto Transition Issue.png

 

Take a look at automation playground here https://www.atlassian.com/software/jira/automation-template-library#/

Let me know in case of any queries.

 

Regards,

Vishwas

Like Anonymous likes this
Anonymous January 11, 2022

Hi Vishwas,

Thank you for your support. But this rule is not changing status between parent tickets. Our requirement is that after cloning. We need to change the status of both tickets.

Example:-

1. In "Project-X" --> Ticket-A is our ticket (Status- TO DO) after cloning we move this ticket to "Project-Y" and we gave the cloned ticket name Ticket-B (Status- TO DO).

2. Now, we are changing the status of Ticket-A(Status- To DO ->> In Progress)  it must change automatic the status of Ticket-B (Status- In Progress).

Thanks 

Vishwas
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.
January 12, 2022

Hey @Anonymous 

Okay .

Send me the rule what you have configured. Also log of the automation run too.

Regards,

Vishwas

Like Anonymous likes this
Anonymous January 12, 2022

Hi Vishwas,

I follow all the steps as it is you mentioned.

Please navigate to Settings --> System --> Global automation.

There "Create Rule" and do this configuration.

Trigger: Issue transitioned (Details Kept Blank)

Condition: Select JQL Condition and add a JQL for your Project X and Y (project in(Project-X, Project-Y))

Branch: For Linked Issues

Action: Transition the issue (Copy from trigger issue)

 

PFA

Branch .png

Screenshot from 2022-01-12 16-01-51.png

 

Project automation - NETGEAR JIRA.pngLOg.png

Vishwas
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.
January 12, 2022

Does this issues have a link, can you please go the issues and check what kind of linking is there between them. Is it "clones" and "is cloned by" ?

Like Anonymous likes this
Anonymous January 12, 2022

Yes, Vishwas the linking between them  "is cloned by".

Vishwas
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.
January 12, 2022

Figured out the issue, you need to put the both project x and project y in the scope of automation. Like this

Scope_automation.png

Let me know how it goes

Like # people like this
Anonymous January 12, 2022

Hi @Vishwas,

Now our rule is working fine and giving the correct output. Thanks a lot !

For your support and quick responses.

Thanks & Regards,

Anonymous.

Vishwas
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.
January 13, 2022

Hey @Anonymous 

Glad I was helpful !

Please feel free to upvote and accept the answer, in case it has helped to solve your requirement 

Regards,

Vishwas

Like Anonymous likes this
Anonymous January 13, 2022

Hi @Vishwas 

Sorry, One more small doubt, can we do a vice-versa status change?

Example -

This is working fine that we are changing in Project-X it automatically changes in Project-Y.

But can we do small changes in the rule,  that we are changing in Project-Y it automatically changes in Project-X?

Regards,

Anonymous.

Vishwas
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.
January 13, 2022

Hi @Anonymous 

Sure, we can do that. Just add one more option in "For Linked Issues" as clones.

So your "For Linked issues" branch should include "is cloned by", "clones". Then both ways the auto transition will work, but only check point is both Project issues should have same workflow.

Regards,

Vishwas

Like Anonymous likes this
Anonymous January 13, 2022

Hi @Vishwas 

Thanks, Great!

It is working exactly as per our requirement we need now, actually, I tried that myself but because of a different workflow, it didn't work.

Regards,

Anonymous.

Vishwas
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.
January 13, 2022

Hey @Anonymous 

Glad that i'm helpful :)

Great to hear it works !

 

Regards,

Vishwas

Anonymous January 17, 2022

Hi @Vishwas 

That rule was attached to one project. Here we have a different thing. We have the same case but workflows are different. For the same case, we have to write a script. We can't do it with the Automation rule. As I told you I do not have programming knowledge so help me to write a script.

 

Regards,

Anonymous.

Vishwas
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.
January 17, 2022

Hey @Anonymous 

You mean the status are different rite in both projects ?

In that case we can do it in automation for Jira rules itself. You just have to write a If else condition for each status. Trigger will be same but in the branch we need to add a if-else condition which captures the condition for status in JQL and in action we have to add change the status to particular status rather than adding "Copy from Trigger Issue".

Regards,

Vishwas

Like Anonymous likes this
Anonymous January 17, 2022

Hi @Vishwas 

 

I got your point but can you please share one example then I can able to trigger.

like we have -->   Project-X --> To Do --> Inprogress --> Done

Project-Y -->  Inprogress --> Open --> Closed

Now we have a case to apply.

Regards,

Anonymous.

0 votes
Answer accepted
Vishwas
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.
January 18, 2022

Hey @Anonymous 

Sure I have tried the automation one way, like from Project X to Project Y.

You can write 2 automations like the ones shown in below.

Notice that I have given condition in JQL for one project if status is so and so then for branch in linked issues in other project of type "cloned by" change the transition to so and so.

In another rule you may have to write other way around providing other project in JQL and status, important is in branch for linked issues of type "clones"

Auto_Transition_1.pngAuto_Transition_2.png

 

Let me know in case of any doubts.

 

Regards,

Vishwas

Anonymous March 2, 2022

Hi @Vishwas ,

 

Can you please help me out?

I have another issue, Can I share it with you here  ???

Vishwas
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.
March 2, 2022

hey @Anonymous 

I would advise to create a new question in community !!

You will get more visibility and more experts will be able to suggest

Suggest an answer

Log in or Sign up to answer