Change Custom Field

Preston Warden April 2, 2020

How can I change all of a specific custom field that says "none"?

 

I want to change all of these to "no".

2 answers

1 accepted

1 vote
Answer accepted
Bill Sheboy
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.
April 2, 2020

Hi @Preston Warden 

To clarify, do you want to change the value of a custom field which is already set for several existing issues? Or something else?

If so, defining a filter to identify the issues and then using bulk change would work.

Best regards,

Bill

DORIAN KERSCH April 2, 2020

This is a good clarifying question. I assumed he meant the dropdown when someone is selecting it. 

Preston Warden April 3, 2020

Sorry for the delay. This field is all set. Thank you.

0 votes
DORIAN KERSCH April 2, 2020

What version of JIRA server are you on?

Are you okay with using javascript in the banner or want another solution?

Preston Warden April 2, 2020

I only need to change the fields that were inputted before the defaults were active. This won't be a regular running schedule.

DORIAN KERSCH April 2, 2020

Totally. The recommendation depends on the JIRA version and if you are okay with using javascript in the banner though!

Preston Warden April 2, 2020

Jira was successfully upgraded to version 8.5.3 on 16/Mar/20 at 11:45 AM.

 

And yes I suppose. I am not good with Java though.

DORIAN KERSCH April 2, 2020

 

Option 1 (add javascript to the announcement banner): Change the customfield_XXXX to be the one you have. 

AJS.$(document).ready(function() {
AJS.$("input[name=customfield_11170]").blur(function() {
< !--"customfield_10768"
Field that is placed before the Select Box field, who will triggered the codition.-- >
var objoptions = document.getElementsByName("customfield_11170")[0].options; < !--"customfield_11170"
Select Field-- >
if (objoptions[0].text == "None") {
document.getElementsByName("customfield_11170")[0].text == "No";
}
});
});

Note: I got this code from https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-Remove-quot-None-quot-from-select-list-options/qaq-p/518812 (Disclaimer: I haven't tested this in a long time. I used  to use it in pre-8 world).

 

So option 2 (modifying system files. Don't recommend):

https://confluence.atlassian.com/jirakb/remove-the-none-option-from-a-select-list-custom-field-in-jira-server-144212308.html

Suggest an answer

Log in or Sign up to answer