Forums

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

Cloning an issue from JSM to JS

Tamara March 10, 2023

Hello,

I have a question about an automation from Jira Service Management to Jira Software.

I explain the context:
When an issue is opened from the JSM portal and enters the waintg for support queue, we escalate it to the appropriate project once we analyse the issue.
I have an automated system that works well for me, which is:

When we go from "waiting for support" to "escalated" it clones the issue and creates it as an issue type bug. So far so good.

The problem is that the clone should go to the project I choose (usually a project with a client name) but it clones to the same JSM project.

I include a condition that is the name of the client project in question but it still clones the issue in the JSM project.

I hope you can help me because otherwise I can't use JSM properly.

 

 JSM automation.png

Best regards.

3 answers

3 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
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 10, 2023

Clone does what it implies - makes a copy of the original.

Moving an issue to a different type or project is a structural thing that cannot be automated - a human really needs to look at the issue when you move it.

Generally, you should not be trying to clone issues into other projects (and if you do, you need to "clone and move"), the best thing to do when a request leads to a development issue being raised is use "create linked issue"

Tamara March 13, 2023

As you say, you are absolutely right, I don't really want to make a clone, but I want a new bug-like issue to be created in the project I am scaling it to, linking the one created by the client in Jira Service Management.

This automation was made for me by a consultant some time ago and now when I make changes and changes, I don't know how to go back to the original,
And I think I remember that I had the variable "project" because when the incident was escalated to project "A", it had the prefix ESCALATE-ITSMXXX.
Any other suggestions? I don't mind starting the automation from scratch.

Like Nic Brough -Adaptavist- likes this
0 votes
Answer accepted
Alex Koxaras -Relational-
Community Champion
March 10, 2023

Hi @Tamara 

You can achieve that by using smart values. In order to achieve this you have to make a few steps first:

  • Create a Project List field
  • Create a new screen and add the above created field
  • Add this screen to your transition from a status to escalated
  • Make this field mandatory by adding a validator (optional)
  • Create the rule which I describe later on

When the user transitions the issue to escalated, he/she will have to pick a project to clone the issue to:

clone to 01.png

 

Create your rule like below. Please update your trigger to the issue transitioned (ignore mine, because I set it to "issue updated" so that I can make a few tests).

Create a variable (e.g. "myProject" which will store the if of the project which the user will select on the previous image :

create variable.png

 

Add an IF component, just to check if the project list field is populated

copy only if not empty.png

 

Go ahead with your clone component and place the smart value {{myProject}}, which is the name of the variable you created in the first place.

clone issue with smart variable.png

 

I've tested it and works fine. One thing you have to take into account, is that the actor of that rule must have the create/edit issue permission on the target project. Additional permissions might be needed. 

Let me know if you got this thing working!

Tamara March 13, 2023

Do I only have to create the variable as you indicate or do I have to take into account something else?

Finally, it is as @Nic Brough -Adaptavist- say, I should not clone the issue but create an equal bug in the scaled project and also link it to the original one.

0 votes
Answer accepted
Fazila Ashraf
Community Champion
March 10, 2023

Hi @Tamara 

If i understand you right, you have to set the condition first, like 

 

if Client = A

then 

Clone issue to "Project A" (instead of 'same project as trigger')

 

Let me know if i misunderstand or miss something.. 

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