Forums

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

How to restrict users to invite new people to Jira Cloud?

milagros.pinero
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 27, 2023

A Basic user from my company has the ability to invite whoever he wants to the Jira Cloud instance by adding his/her email through the assignee field on any ticket . How do I restrict new user creation only to admins?

1 answer

0 votes
Krisztian Kovacs
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 Champions.
October 10, 2018

Hi @Alvin,

What I've done in the past was setting up a custom field where users were collected from a group and the copied the username from that field to the assignee (also removed assignee from fields).

Does that make sense?

I wonder if that approach would help you. Let me know what you think.

Cheers,
Krisz

Alvin
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 Champions.
October 10, 2018

Hi @Krisztian Kovacs, I foresee what have you done and I think that really made sense. did you still have the sample code? and where it had been used? behavior ? post functions? thank you

Krisztian Kovacs
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 Champions.
October 10, 2018

Hi @Alvin,

unfortunately it was very specific for a client, but here is the gist of it:

  1. remove assignee from appropriate screens
  2. create single select customfield
    1. have scriptrunner collect users in group
    2. this could be a manual though if your users don't change
  3. use a post function to update the assignee field using the username stored in the single select field

I think I had to go really fancy and use "George Smith - g.smith@company.com" format in the single select field, so I ended up parsing that and used the email address to look up the user object and then put that in the assignee field.

Does that make sense at all?

Cheers,
Krisz

Alvin
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 Champions.
October 10, 2018

Hi @Krisztian KovacsOhh I see. I got the point but what do you mean by appropriate screens? because on the #3 how can I update assignee if it is removed from the screens. Thank you

Krisztian Kovacs
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 Champions.
October 11, 2018

The script will do it for you, based on what user is in the field. The idea is to completely replace the assignee field with your own.

Alvin
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 Champions.
October 11, 2018

Hi @Krisztian Kovacs 

I need the assignee user picker to be populated everytime the group change. is it possible on post function? or should I use listener? or behavior?

Krisztian Kovacs
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 Champions.
October 11, 2018

It depends on when you change the group. If it's on the edit screen then behaviour, if it changes somewhere else, you could use a listener. 

I'd expect users to change the field on the edit and create screens, so I'd use a behaviour to update the assignee field. 

Alvin
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 Champions.
October 11, 2018

Hi @Krisztian Kovacs , but post functions and behavior have different syntax right? 

Suggest an answer

Log in or Sign up to answer