Forums

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

Sub-task creation when customer Bug is Resolved and Service Case ID not empty

Iro Karavasili
Contributor
September 17, 2018

Hi all,

I need your help with an issue.

When a Bug is transitioning to Resolved with Resolution=Fixed and Service Case ID not empty, a user wants to have a sub-task ticket automatically created with the following fields:

 - Summary: Dev Automation needed

 - Assignee: the developer of the parent Bug

So, here are what I have done till now:Conditions.pngValidators.pngPostFunctions.png

Firstly, I would like to know how can I create the field Summary: Dev Automation needed. See:
Subtask1.png


User wants the subtask to be created only when Service Case ID is not empty. So, how can this be done? Now, when this field is empty we take this error:

ServiceCaseIDError.png

I tested and found the following:

The assignee of the Sub-tasks was not as expected (owner was set to the project owner)

(I am new here and I am not really familiar to such requests)
Thank you in advance!
Iro

3 answers

1 accepted

1 vote
Answer accepted
Tarun Sapra
Community Champion
September 17, 2018

Hello @Iro Karavasili

It seems you are usign both addons Script Runner and also JSU.

Both are nice adorns but I have achieved a smilar functionality only using SR plugin.

Below the screenshot of the "create subtask" post-function of the addon

image.png

Tarun Sapra
Community Champion
September 17, 2018

In the condition section you can enter the condition based on your requirement

User wants the subtask to be created only when Service Case ID is not empty. So, how can this be done? Now, when this field is empty we take this error:

if(cfValues['<Service Case ID>'] ) {

return true;

} else {

 

return false

}

Tarun Sapra
Community Champion
September 17, 2018

And in the additional issue actions just set the summary

issue.summary = 'Dev Automation needed'
Iro Karavasili
Contributor
September 17, 2018

@Tarun Sapra, I filled the "condition" and "additional issue actions" fields as you said but this time subtask did not be created at all... 

subtask.png

Tarun Sapra
Community Champion
September 17, 2018

Hello @Iro Karavasili

In the condition section, it's the placeholder which I used in the code for the custom field name "Service case id" , here you have to remove the place holder and put in quotes the exact name.

Iro Karavasili
Contributor
September 17, 2018

.

Tarun Sapra
Community Champion
September 17, 2018

Glad to know it works, please accept/ upvote the answer thanks.

0 votes
Iro Karavasili
Contributor
February 12, 2019

Hello,


I would like to find a way to check if a sub-task already exists prior to creating one with the same title.

The criteria is to not create a sub-task if another one with the same summary is found.

Kind regards,
Iro

Tarun Sapra
Community Champion
February 12, 2019

Hello @Iro Karavasili

It would be great if you could create a new question instead of commenting on an old closed thread.

Thanks

Like Iro Karavasili likes this
0 votes
Iro Karavasili
Contributor
September 17, 2018

What about this problem:

When I create the bug the assignee was set automatically the project owner.

Tarun Sapra
Community Champion
September 17, 2018

When you say

" - Assignee: the developer of the parent Bug"

WHat do you mean by developer of parent bug, is it user picker custom field from which field of the parent bug will the sub-task pick up this information as to who is the developer working on the back, which field has that information?

Iro Karavasili
Contributor
September 17, 2018

I mean this field:

assignee.png

It works fine.
The problem is that the moment I create a Bug issue, automatically the assignee=project owner...

Tarun Sapra
Contributor
September 17, 2018

The default assignee is always the project lead if the setting in your Jira is such that you can't have "unassigned" issues. You can add "assignee" field on create screen to add assignee manually or use a component and make component lead as the default assignee. Possibilities are quite a lot in jira

Iro Karavasili
Contributor
September 17, 2018

@Tarun Sapra thanks a lot!

Suggest an answer

Log in or Sign up to answer