Want to create sub-tasks based on Component/s Value

Software Asset Management October 17, 2016

We have a requirement where we have to create sub-tasks when Component/s field value is 'XYZ'. I am not able to find anything in post functions or script runner.

2 answers

1 accepted

0 votes
Answer accepted
Vasiliy Zverev
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.
October 17, 2016

Try this:

  1. add post-function
  2. Script post-function
  3. Create a sub-task

In condition 

import com.atlassian.jira.bc.project.component.ProjectComponent
import com.atlassian.jira.component.ComponentAccessor

for(ProjectComponent projectComponent: issue.getComponentObjects()){
    if(projectComponent.getName().equals("xyz"))
        return true
}
return false
0 votes
Bharath Kumar October 18, 2016

You can use the Create on Transition for JIRA plugin you can easily create issue and also sub-tasks, if you are planning to use the add-on I can help you with the post function, I am already using the add-on for the same functionality that you are asking for.

Prasad Andrews July 17, 2017

Hi @Bharath Kumar9Bharath Kumar,

Could you please me on the below requirement?

My requirement is that I would need the below option added under the program management in JIRA. Design Change/Update.
For the above option, below should be the checklist criteria
1. If the change is for Program Level, Program/Multi-tenant name is mandatory and it should automatically provide an option to select whether there any fee changes required for this change. If yes for fee change, there should be a .xlsx attachment mandatory.

Upon creating the ticket it should automatically link the ticket as sub-task to the Program or Multi-tenant Main ticket.

2. If the design code change is for a Particular BP, BP ID(Custom Field) is mandatory and it should automatically provide an option to select whether there any fee changes required for this change.
If yes for fee change, there should be a .xlsx attachment mandatory.

Upon creating the ticket it should automatically link the ticket as sub-task to the BP’s Main ticket based on bp id.

Prasad Andrews July 17, 2017

For this Requirement, i have done the below changes in my Test Environment:

As per the client requirement, i have made the changes below:
I have created new Issue Type “Design Change/Update” and created the fields “BP ID, Fee Values, Program Name”. As requested I have mandatory the fields also I have created the one more field called Fee Changes Required with options “Yes/No” We can’t mandatory the attachment field because it’s a Default. So I have updated the comments under Fee Changes Required field that If fee change is required then they will select the option YES and attach the .xlsx file.Requiremet.PNG

But here my questions is – 
As per the requirement - Upon creating the issue, it should automatically link the ticket as sub-task to the BP’s parent issue based on bp id (Custom Field ID).
Here BP ID is Field.
Is this possible???

Please help me on this.................

Suggest an answer

Log in or Sign up to answer