Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Clone Issue in 2 different project and change the same status

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

1 accepted

1 vote
Answer accepted

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

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.

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

Based on that will help with code

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

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

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

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

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 

Hey @Anonymous 

Okay .

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

Regards,

Vishwas

Like Anonymous likes this

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

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

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

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 Anonymous likes this

Hi @Vishwas N M,

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

For your support and quick responses.

Thanks & Regards,

Anonymous.

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

Hi @Vishwas N M 

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.

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

Hi @Vishwas N M 

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.

Hey @Anonymous 

Glad that i'm helpful :)

Great to hear it works !

 

Regards,

Vishwas

Hi @Vishwas N M 

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.

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

Hi @Vishwas N M 

 

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.

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

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you