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

Scriptrunner (Workflow - Clone issue function) Set request type?!

Johan Zwart
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 7, 2024

Im trying out the “Post-Function Workflow - Clone Issue” function on a JSM Cloud project for a workflow transition.

First things first, cloning works like a charm!
Second... Can’t figure out how to set a request type on the newly cloned/created issue.


Im cloning the issue to another project and the new issue requires a request type to be displayed correctly. For now, the new issue has Request type: null…

Is it not possible to achieve this with Scriptrunners "Clone issue" in a Workflow Post-Function?

 

Edit: Figured out that an API request in the additional code snippet would probably do the trick, but i can't figure out how to fetch the key on the new issue. 
The last line in the log of a cloning is...

INFO - Created issue: KEY-123 

Is it possible to define "KEY-123" to a variable in the additional code?

1 answer

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 7, 2024

@Johan Zwart -

As described in ScriptRunner for Jira Cloud - https://docs.adaptavist.com/sr4jc/latest/features/workflow-extensions/post-functions/built-in-post-functions

Under the "clone issue" - Step 13 stated "

In the Additional Code field modify the issueInput structure before it is used as the POST body to /rest/api/2/issue to create the issue. For example, add a label, set an assignee, or update the summary of the clone."

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

Johan Zwart
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 9, 2024

Viewed the instruction but can't figure out how to modify the request type.
Can you give me an example?

Suggest an answer

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

Atlassian Community Events