It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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 Oct 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 Oct 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 Eda Jul 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 Eda Jul 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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

665 views 7 0
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you