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

Sven.H
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 8, 2013

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

0 votes
Answer accepted
Sven.H
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 23, 2013
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 8, 2013

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

0 votes
RambanamP
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 8, 2013

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

Sven.H
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 8, 2013

How can make this in the Adminpanel?

Which option allows this to me?

Im not a Developer.

Best regards,

Sven

RambanamP
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 8, 2013

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

0 votes
Bharadwaj Jannu
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 8, 2013

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?

Suggest an answer

Log in or Sign up to answer