Sub-tasks - Copy fields content from parent to sub-task

Anette Noll March 29, 2023

Hi all,

I'm stuck with the following problem.

Intention is to create sub-task

Jira1.PNG

 

and copy certain fields content from parent task to sub-tasks.

As long as task as well as sub-task are in status in progress this works;
but not in status backlog.

Jira2.PNG

I can create a sub-task when task is in backlog but field content will not be copied to sub-task, although both status have same conditions etc.

Condition and postfunction of transition 1 and 2 are:

Jira3.PNG

 

Jira4.PNG

I gave exactly the same condition and postfunction to backlog transitions (3). But it only works in the moment both (task and sub-task) are in status in progress.

What haven't I considered?

 

 

2 answers

1 accepted

2 votes
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2023

Hi @Anette Noll 

on which transition did you put the post function? The Create transition ?

Anette Noll March 30, 2023

Hi @David Fischer 

I put it on the transition marked with 1 and 2.

Also tried to put it on the create transition (3), but result is that sub-task fields do not update at all, doesn't matter in which status.

Jira2.PNG

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2023

Can you please explain what you're trying to achieve exactly?

If you are trying to copy certain fields from the main issue to each sub-task when it is created, then you just need the post function on the Create transition of the workflow that applies to sub-tasks (which may or may not be the same as the one that applies to main issues).

Then, the configuration of the post function needs to be modified, because right now you're copying fields from the main task to every sub-task, whereas if you put the post function on the Create transition, the "current issue" will be the newly created sub-task so you'll want to copy from the "Parent issue of the current sub-task" to the "Current issue".

Also, you probably don't need a Shared Action for that, you can put the Copy Issue Fields post function directly on the Create transition.

Anette Noll March 30, 2023

I would like to achieve that although main issue is in backlog and sub-task is created fields content is copied from main issue to sub-task.

I tried exactly what you described: put a copy issue fields post function directly on the create transition. But it doesn't copy. 

Jira6.PNG

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2023

You did not update the source and destination issues as I suggested

Anette Noll March 30, 2023

Now it works!

Thank you so much for sharing your expertise.

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2023

Hi @Anette Noll 

I see that you are using JMWE. The latter provides a log for all post functions. Can you please check inside it to see the error it produces and paste a screenshot of it?

Anette Noll March 30, 2023

Hi @Alex Koxaras _Relational_ 

no errors are produced

Jira5.PNG

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2023

@Anette Noll can you please explain the steps you take in order to copy the fields from parent to child?

E.g.

  1. you click the create subtask button
  2. On the parent you click the self transition (from backlog to backlog), or the global transition

In addition you have to also reply to what @David Fischer asked, about the placement of that PF. In which transition did you place it?

Anette Noll March 30, 2023

@Alex Koxaras _Relational_ This what I do:

1. Create task (task is in backlog)

2. Create sub-task (sub-task is in backlog)

No way to update sub-task fields

3. Transition of task into status In Progress

Sub-task fields are updated automatically (still in status backlog)

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 30, 2023

@Anette Noll if the subtasks are updated automatically when transition the issue to in progress, then you either there is a post function running, or you have created an event.

When you are in the backlog and you create a subtask from a task, then you have to run a transition to update the subtask. So in your case, after creating the subtask, to you click on any transition (e.g. the self transition named 3 on your picture)? Is there the same PF included in that specific transition?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events