Help me, How to automate this?!
Asked by Chaitawat Luckanasriwongs:

I want to automation this  
When I complete the sprint, clone the story issue to other board, where status is done. This part I can solved it as you can see in the picture below.![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/339649i303E3D762C86B2EC/image-size/large?v=v2&px=999 "Capture.PNG")  
But the main point is the parent issue or epic is still link to the source board, which is not right, it should create a new epic with the same summary on destination board, if it doesn't existed. So from this pain point, my thinking of this solution is I have to make this automation to check the existing of the parent issue or epic on the destination board before cloning epic, but if it exist, not proceed. Then clone the issue or story issue to destination board.

S  
So condition would be like this  
When sprint complete, issue with status done must be cloned to other board, by condition if  
1. epic of particular story is not existed on destination board, create new one.  
2. epic of particular story is existed on destination board, do nothing.  
Then clone story issue, and the link to new epic with the same summar


Answers:
author: Marc - Devoteam
body: HI [@Chaitawat Luckanasriwongs](/t5/user/viewprofilepage/user-id/5559153)

This is a request that will still cause mishaps when configured.

My initial question is why, are you doing and what is the requirements for these actions?

Why duplicate information that is in the system and you can simply search for?

comments: author: Chaitawat Luckanasriwongs
body: Hi [@Marc - Devoteam](/t5/user/viewprofilepage/user-id/3796976)   
I need this because my organization divided product process into two part and two board, design sprint and development sprint. So I just want the story card from design sprint that is completed and approved, to auto duplicate to other board, so I don't have to double work.


author: Marc - Devoteam
body: Hi [@Chaitawat Luckanasriwongs](/t5/user/viewprofilepage/user-id/5559153)

So for my understanding.

You clone the story for development when the story for design is done, that story is in state done, yes?

You could still clone the issue and link it to the source Epic, why a new Epic as the Epic is completed when Design and Development are done

It would change the setup.

Have an new project where all Epics are made, this can be a kanban project.

Have a project for the development and a project for the design team.

The can still create there own stories, or you clone them via automation , but they are linked to a singe Epic.

Make sure both teams have at least browse permission on the Epic project and adjust the filters on the teams project to be able to see the epics as well.

This will give a more clear view and you don't end up with duplicate Epics


author: Chaitawat Luckanasriwongs
body: I want to link to new epic because it's not display on timeline board and I can't plan to roadmap.  
The roadmap of this project also separate, design roadmap and development roadmap.  
My organization run working process as agile, scrum. but reporting to stakeholders from mother company, they only understand waterfall. So that's why it is mandatory. :(


author: Marc - Devoteam
body: Hi [@Chaitawat Luckanasriwongs](/t5/user/viewprofilepage/user-id/5559153)

I would try to see, how the orgnization can be influenced being more agile

The problem is within the automation you need to sear on text, text searching in Jira is fuzzy and no strict.

You could, in your automation, ry of the Epic you need to define the Epic of your issue and create a variable that stores the summary of the Epic.

The do a lookup in the other project if there is an Epic with the summary equals the variable created.

If this exists do nothing, if not exist, create an Epic


author: Chaitawat Luckanasriwongs
body: ![Screenshot 2024-08-02 172349.png](https://community.atlassian.com/t5/image/serverpage/image-id/339660i04E747DAA3D80079/image-size/large?v=v2&px=999 "Screenshot 2024-08-02 172349.png")

At this point, what should I pick and if it need to be lookup issue, can you help me with the JQL?


author: Marc - Devoteam
body: Hi [@Chaitawat Luckanasriwongs](/t5/user/viewprofilepage/user-id/5559153)

You need first to create a variable.

The variable should be the summary of the parent.

The JQL in the lookup should be project = "CM - dev" and type = Epic and summary \~ {{\<variable\>}}


author: Chaitawat Luckanasriwongs
body: So first, I select then and use action "Lookup JQL"?  
Then type this in the JQL prompt field.

project = "CM - dev" and type = Epic and summary \~ {{\<variable\>}}

Am I understanding correctly?


author: Marc - Devoteam
body: Hi [@Chaitawat Luckanasriwongs](/t5/user/viewprofilepage/user-id/5559153)

No, you to create a variable and use this variable in the lookup.

This article should help you.

[Automation-for-Jira-Create-variable-New-component](https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Create-variable-New-component/ba-p/1448118)


Tags: cloud

jira-cloud