Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Howto clear a custom user picker (multiple users) field

Jannik Rumsch March 11, 2022

I want to create the following process, but I'm struggling with the last step:

When a user creates a new issue it should be only visible to him (lowers the barrier of creating an issue) and be in the state <Draft>. He can work freely on it eg. edit the description or leave it for a while. Additionaly he can "invite" others to view / work on the issue and prepare it for a proposal to the product manager. As he changes the state of the issue to <Proposed> the visibility should be public (every project member).

To archieve this process I did the following tasks:

  • Create a custom field CREATORS of the type 'User Picker (multiple users)'
  • Added a post function to the transition from the issue creation to the <Draft> view to add the current user to the CREATORS field
  • Added an issue security scheme, where only the users from the CREATORS field can view an issue
  • Added a post function to the proposal to clear out everybody of the CREATORS field

When I create a new issue and set the state to <Proposed> I can't see the issue anymore, because im not listed in the CREATORS field (Works as intended).

But now im struggling:

Every issue that I have created before doing all of the above steps is visible to everybody even if the field CREATORS is empty (none).

So whats the difference between clearing this field vs. already existed before? Can I actively set this field to the state as 'already existed before'? And how can I make the issue visible to every team member without listing everyboding in the second post function?

 

Thank you for your help.

1 answer

1 accepted

1 vote
Answer accepted
Piyush A (STR)
Community Champion
March 11, 2022

you should check for issue security. Since its a cloud instance then you’ve automation,wherein you can have issue security field setup and then when the transition happens, then clear the issue security

Jannik Rumsch March 15, 2022

So I worked myself through every available automation actions. I haven't noticed an option to clear the issue security. Can you provide some additional information?

Piyush A (STR)
Community Champion
March 15, 2022

Your Process:

  • Browse/Create Permission - To all users (or roles you would like to have)
  • Your Draft state access will be covered using the issue Security Scheme attached to the project (based on Below A).
  • When moved to Proposed, make the issue open for all users (or the one with browse)

 

A. As when you create the issue security scheme, make sure the security is assigned for Reporter and your user picker custom field - AND THIS TO BE DEFAULT.

B1: Using Workflow method:

In the workflow, add a post function in the Proposed transition to 'clear the field value' of Security Level.

OR

B2.  Using Automation: (not recommended)

Try to update the field on the required transition as below. This makes the Security Level 'None'. eX. the condition would be as then issue is transitioned to the required Proposed state, the security field is cleared.

 

2021-08-09_22-39.png

 

Note: I'll suggest, use the default security level and then use the workflow method. (make sure that the workflow isn't shared to others projects OR fine to be shared if the admins/lead of the shared project are good with the changes)

Jannik Rumsch March 15, 2022

Thank you for helping me out with this. I'll just add some information for documentation purpose. 

I already completed step A, but instead of assigning the reporter in the security scheme I created a post function to add the reporter in the CREATORS. Your approach looks cleaner so I changed it. 

I interpreted your step B that you wanted me to clear the field value of the CREATORS field. This was no option for me since it made the issue 'invicible'. 

My solution: I created a post function to set the security level to 'none' (eg. 'If user is a member of the <Test> role, set issue security level to None.').

Like Piyush A (STR) likes this

Suggest an answer

Log in or Sign up to answer