creating customized field with field type checkbox by Javascript programmatically

Niko Zimmermann
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 25, 2019

I'm using 7.x server and created a customized field as field type checkbox. Want to create the options via Rest API and java script programmatically. I don't want to use plugin and maven. Only hack as java script. But do not really know in which field to place my html and js. When configure the customized field, which Field is the starting point for my code, Description or Option or else where ?

Thanks a lot in advance

Niko

1 answer

1 accepted

0 votes
Answer accepted
Michael Wohlgemuth
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.
September 25, 2019

Hy @Niko Zimmermann 

i've placed custom js and html in the description of a custom field before and it worked.

That said, i dont recommend doing that. No one will be looking in the field description to find out where the options for the customfield come from - which makes working with that field more complicated than it should be for a fellow admin. I strongly recommend setting the options via the custom field admin page.

MfG/regards

Niko Zimmermann
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 25, 2019

Aha, so the description of a custom field is one known HACK. I am just evaluating the possible ways using javascript to generate the options via REST/json. For different Definition-of-Done's in different transition screens maintaining the checkbox options by the System admin will overload her. Needs a bit relief from the project admin or the team. The options do not depend on the project but on the status as well (on the transition screen). I could do it via java/maven/install and the customfield-type module. But I read there is a second option like JIRA Toolkit Plugin which provides field types called "Message Custom Field (for view)" and "Message Custom Field (for edit)". But like I said I am just evaluating and listening now. Thank you for you recommendation

MfG/regards

Suggest an answer

Log in or Sign up to answer