The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Custom field (check boxes) automatically change with reporter

Umar Maroof
Contributor
December 25, 2022

I have a Issue type where different reporters create issues and in that issue type I have Check boxes custom field where different option apperas.

Can I Change the  option of these check boxes according to the reporter.

Like if Repoter A wants to create the issue the options in that custom field are different 

and if Reporter B want to create the issue the options appear different in that custom field (check boxes)

 

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Santhosh Kumar Arogyaswamy
Contributor
May 15, 2024

Hi,
I have tried based on the issuetype, the checkboxes option to change. Please see the below code. I think you can easily modify this code for reporter as well.

 

def cf = getFieldById("customfield_xxxx") //Checkboxes fieldid
def issuetype = getIssueContext().getIssueType().getName()

switch (issuetype) {
    case "Epic":
        cf.setFieldOptions(["a","b"])
        break
    case "Story":
        cf.setFieldOptions(["c"])
        break
}
0 votes
Farhana Saffi
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!
December 25, 2022

Hi Umar

If this is for Server, you can use Behaviour from ScriptRunner.

If this is for Cloud, unfortunately this does not comes natively with Jira Cloud. Do note that ScriptRunner Behaviour is also not available in Jira Cloud and your requirement can't be achieved via Automation.

ProForma: Forms & Checklist for Jira app should meet your requirements. However, Cloud version of this app is yet to be available.

I would recommend you to change the way you set up the field. You can use cascading select list. This way, you can generalize it and set the options based on roles and not specific users.

Hope this helps.

0 votes
Vamsi Kandala
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.
December 25, 2022

Hi @Umar Maroof,

Like @Nic Brough -Adaptavist- suggested, it is not a good practice to have options change by the user. 

But, if your requirement still needs this change, I would suggest to check 'ScriptRunner' documentation and use 'Behaviors'.

Hope this helps.

Thanks,
Vamsi 

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 Champions.
December 25, 2022

Jira does not have fields that change options by user (it's not a good thing to do in a collaboration tool)

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events