How can i add an #Assignee# without overwriting the old #Assignee# by postfunction

Hi Everyone,

i have this situation.

When i create a subtask within an issue and push the Create-Button, the postfunction runs in the background.

The following parsed text will be copied to “Parent's IM-Hauptaufgabe zusätzlich sichtbar für:"#Assignee#

Link to Screenshot

“IM-Hauptaufgabe zusätzlich sichtbar für:” is from Fieldtype “Multi User Picker “

When creating another subtask in the same issue, the new #Assignee# overwrites the old #Assignee# !

How can i add an #Assignee# without overwriting the old #Assignee#?

 

Example:

- Issue Assignee is Mr.A

Mr.A create more subtasks now

-- Subtask Assignee is Mr.B (in background copy User Mr.B in the field "IM-Hauptaufgabe zusätzlich sichtbar für:" )

-- Subtask Assignee is Mr.C (in background copy User Mr.C in the field "IM-Hauptaufgabe zusätzlich sichtbar für:" )

-- Subtask Assignee is Mr.D (in background copy User Mr.D in the field "IM-Hauptaufgabe zusätzlich sichtbar für:" )

I need in field "IM-Hauptaufgabe zusätzlich sichtbar für:" this value now

Mr.B,Mr.C,Mr.D,

 

Sorry, i have not more Karma.

I’m a beginner in learning English.

Her a update to my Question.

Hi Everyone,

thanks for the great help.


Maybe my explanation was a little confusing, I will try another way now.

For that purpose, please forget everything about the "post-function" for now. :-)

I created a project with the following permission requirements.

If someone gets assigned to a sub-task, he/she cannot see the parent issue.


In order for this someone to see the parent issue, the assignee is put into the custom field "IM-Hauptaufgabe zusätzlich sichtbar für" during the creation of the sub-task.

Being in this field allows the person to browse projects.

Being in this field allows the person to browse projects.

This also allows the assignee of the sub-task to see the parent issue.

And this works without any problems.

However, once I have more than one subtask, this custom field is overwritten, meaning only one of the sub-task assignees can see the parent issue.

What I need is a custom field where I can ADD new assignees from sub-tasks instead of REPLACING them when I create new sub-tasks. Sort of like a multi-value field for persons.


Example:

-‭ ‬Issue Assignee is Mr.A


Mr.A create more subtasks now


--‭ ‬Subtask Assignee is Mr.B‭ (‬in background copy User Mr.B in the field‭ "‬IM-Hauptaufgabe zusätzlich sichtbar für:‭" )


--‭ ‬Subtask Assignee is Mr.C‭ (‬in background copy User Mr.C in the field‭ "‬IM-Hauptaufgabe zusätzlich sichtbar für:‭" )


--‭ ‬Subtask Assignee is Mr.D‭ (‬in background copy User Mr.D in the field‭ "‬IM-Hauptaufgabe zusätzlich sichtbar für:‭" )


I need in field‭ "‬IM-Hauptaufgabe zusätzlich sichtbar für:‭" ‬this value now


Mr.B,Mr.C,Mr.D,





I hope this was less confusing :P

4 answers

1 accepted

if I'm not wrong, I understood the scenario as

when you want to create the second subtask with some assignee, IM-Hauptaufgabe zusätzlich sichtbar für: of parent is getting overwritten with 2nd subtask assignee.

I think your postfunction is from Workflow Toolbox plugin.

you want your parent Assignee be first subtask assignee?

if you are setting value for multiuser picker then first you need to get existing field value it will return List or collection of user object for that list you need add new value/assignee and then need to update the custom field

How can make this in the Adminpanel?

Which option allows this to me?

Im not a Developer.

Best regards,

Sven

what is the post function you are using to copy from subtask to parent issue?

0 vote

Just to be clear, as I read part of the question as "I want to add an assignee to an issue, not replace". An issue can only have one assignee. You can't add others, the assignee is a single user.

Obviously, sub-tasks can have their own assignees, so I'm hoping that's what you mean

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

130 views 0 3
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you