Is there a way to create sub-tasks for each of the selected issue fields? What should the Custom field type be?

Vishali
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 16, 2012

Is there a way to create sub-tasks for each of the selected issue fields? What should the Custom field type be?

2 answers

1 accepted

1 vote
Answer accepted
Bhushan Nagaraj
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 16, 2012

Adding to Nic's answer and my understanding of what you are trying to do:

In the parent task, you have a custom field called "Create Subtasks?" with two checkbox options "Yes" and "No".

Now if the "Yes" option is checked you want to be able to create subtasks to this parent issue.

Very basic answer would be you write a workflow post-function to do this.

And by your statement "needs to create sub-tasks and assign to various users", I am assuming you have a few custom fields of user select type.

Again the whole answer is based on assumptions :) . The question is not clear enough.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 16, 2012

Exactly, it's all a bit too vague for us to construct a decent answer. I would also have guessed that you wanted something like what @nbhushan has suggested, but we can't assume that from your question or comment (and I've been caught out making assumptions like that before, ending up giving completely inappropriate advice because the questioner wasn't clear)

Vishali
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 16, 2012

Nic/nbhushan,

I have a transition called Terminate User. On clicking the button, I am presented with the screen where I have the field 'Retrieve Equipment', 'Retrieve Keys Issued', 'Terminate access to so and so account' etc., All these tasks should be done by different persons.

When the main person who is doing this transition 'Terminate User' selects or chooses the above mentioned fields, automatically sub-tasks should be created and should be assigned to respective owner. Can this be achieved? If yes, what type of fields should I use in the screen to achieve this? After this post, I have also looked at create-on-transition plugin but am not completly sure on how to do this.

I hope I am clear this time. Thank you for your time and help.

Vishali
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 16, 2012

Thank you for your response. I shall take a look at it.

Dieter
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 16, 2012
As i understand the csot plugin it should allow you to define the subtask assignee as the value of a user picker custom field in the parent issue. just use %customfieldname% as the valur of the subtask assignee

haven't tried it yet but the documentation at https://bobswift.atlassian.net/wiki/display/CSOT/Create+on+Transition+Plugin+for+JIRA?desktop=true tells to do it that way.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 16, 2012

Ah, now that's clear. You want something that will create one sub-task for each "ticked box". The plugin Dieter points you at will do MOST of the work, most importantly, the harder bit of creating the issues.

However, it's not quite what you need. If you add (say) three copies of it, it will create three subtasks every time you run it. It does NOT read another field to decide whether to run, it simply creates a task every single time it runs.

You'll need some extra code that will read your custom field and decide whether to trigger the sub-task creation.

Dieter
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, 2012
Your point is right, Nic. But instead having a tick box one might also have two transitions, one that creates subtasks and one that does not. The one that does not create subtasks would not have the user picker fields on the screen. One might also think of creating a set of transitions, each one having a set of user picker fields serving as source for subtasks. Using JSU one could write validators that make sure all these user picker fields are not empty.Using groovy one could implement a validator that makes sure users are not duplicated over the user picker fields (separation of duties)
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 17, 2012

Indeed.

You could also leave the boxes off the screen entirely and put in a transition back to the same status. One for each subtask type that needs doing, which uses the CSOT and then sets the tick-box, and another transition that has conditions like "not allowed if sub tasks are open" and "not allowed if there are no subtasks"

I think there's a lot of options, but to get to the exact requirement, there's going to be a little bit of coding somewhere.

Vishali
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.
June 5, 2013

Thank you so much for all of your suggestions. The requirement changed and I have chosen groovy script to do this.

Regards,

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 16, 2012

I'm not sure the question makes a lot of sense.

I understand you want to create sub-tasks, but what has that got to do with fields? A sub-task belongs to an issue, you create them by adding them to issues, they have nothing to do with fields.

To expand the questions: Where are you selecting issue fields? What does a "selected" field do? What's the expected behaviour? What triggers a sub-task?

Vishali
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 16, 2012

Nic,

I should have a checklist which when selected/completed and transitioned to next step needs to create sub-tasks and assign to various users. Custom fields are on the issue screen.

Thank you.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 16, 2012

But what have the fields got to do with the subtasks? A check list is a field, or set of fields. Nothing to do with sub-tasks. Please explain the behaviour you are looking for?

Suggest an answer

Log in or Sign up to answer