Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to grant permissions to former assignee

Hans-Hermann Hunfeld May 4, 2015

Hi folks,

sorry if this was already asked & answered anywhere else, but didn´t found any solution so far.

We would like to store all users which have been set to assignee of an issue during its lifecycle in order to grant them access at any time. We tried some stuff with a cf "former assignee" but this stores only one person, not more. Furthermore this has to be added manually to all workflows so we would prefer something similar to the "Participant"-field which adds all commenters of an issue.

Any ideas how to solve this problem?

Best regards,
Hans-Hermann

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
GabrielleJ
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.
May 4, 2015

In my case, I utilize the "Watcher" field and applied an Issue Security Scheme for my issues. Programatically update the "watchers" field based on the assignee (this maybe already setup in your project) then update your Issue Security Scheme/Permission Scheme so they can work/view that issue.

Hans-Hermann Hunfeld May 5, 2015

Hi Gabrielle, thanks for your reply, but we´re using the field "Watcher" differently and furthermore your suggestion have to be added in all workflows, or what did you mean with "programatically update"? Best regards, Hans-Hermann

GabrielleJ
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.
May 5, 2015

In your workflow, you can add functions to add IDs in the watcher field. This way, I have setup a project so that the only roles who can access the issue is the Project Admins, Current Assignee and Watchers.

Hans-Hermann Hunfeld May 5, 2015

Ah, okay. Understand what you did but this means to update all workflows and all re-assign steps with that function. Not really lean but working...

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.
May 4, 2015

You have got the right approach with the mention of the participants field - you need exactly what that does, but with a different algorithm behind it (one that scans the history for the assignees and puts them in the list, rather reporter/assignee/commenter)

You could write a field addon to do it (I've done almost exactly that for JIRA 3 ages ago), or use a scripted field from the "script runner" addon.

Hans-Hermann Hunfeld May 5, 2015

Hey Nic, thanks for the hint, but i couldn´t find any examples which are close to my use case, so im a bit lost in how to proceed. I created a scripted field "Former Assignee" and configured it as multi user picker. But, how to check the history for all assignees? Do you have any ideas for me? Many thanks, Hans-Hermann

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.
May 5, 2015

I'm afraid it's a bit of java-like code you need to add into the script. From (my aging and creaky) memory, you need to generate a ChangHistoryManager object, then you can use it's function "ChangeHistoryManager (Issue)" to get a list of all changes. Iterate over them looking for "field = assignee" and add both "to" and "from" into a List (that will de-duplicate them automatically). Then your result for the scripted field is that list.

Hans-Hermann Hunfeld May 5, 2015

Damn, i´m afraid that´s too much coding for me. Maybe Jamie can jump in with an example? Will add an according label to this question...

TAGS
AUG Leaders

Atlassian Community Events