Using Scriptrunner to create Subtasks

Thomas Gschwendner
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!
September 26, 2019

We are using Scriptrunner's Clone Function to clone tickets from our Service Desks into different projects and then the create a subtask functionality.

So now i put this snippet in to prefill the original and remaining estimate:

issue.setOriginalEstimate(10800l)
issue.setEstimate(10800l)
issue.setDescription('')
issue.setPriorityId("10003")

Now i would like to use the labels frontend and backend in the service desk tickets

to change this function like this:

if label = frontend

issue.setOriginalEstimate(3600l)
issue.setEstimate(3600l)
issue.setDescription('')
issue.setPriorityId("10003")

 

if label = backend or not filled in

issue.setOriginalEstimate(10800l)
issue.setEstimate(10800l)
issue.setDescription('')
issue.setPriorityId("10003")


Would be great if anybody could help me along with this. Thanks a lot!

 

0 answers

Suggest an answer

Log in or Sign up to answer