How to dinamically poblate a list cf with scriptrunner and the options be different for every user

Patricia González
Contributor
February 28, 2023

Hi,

We have a select customfield that populates itselft with different options everytime a user changes a predetermined customfield. We do this with a scriptlistener with scriptrunner. 

We are now experiencing that differents users that make that action at the same time, their options are mixing, for a user A is showing the options of user B and viceversa. We understand that is because it's the same customfield. We want this options to be different for every user and project.

We are thinking about making different contexts. Has anyone done something similiar to this? It is possible to create a context with a script? It is recomendable? Is there other possible options?

Regards,

-Patricia

1 answer

0 votes
Nic Brough -Adaptavist-
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.
February 28, 2023

Field option lists are held in contexts, and those contexts apply by project and/or issue type.  They don't change by user.

The best I can suggest here is:

Have a single context, with all the possible options in it, and then use Behaviours to remove options from the list depending on the active user.  This does make for a messy script (you'll need to have lots of if's and you'll want to be editing it every time any user changes status (starts, leaves, moves role, etc)

But what I really want to ask is "why?"  What leads you to want to have different lists of options in the same field depending on the user?  Would it not be easier to have several fields and ask your people to only fill in or amend the fields that are theirs?

Suggest an answer

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

Atlassian Community Events