Forums

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

Facing Problem in Custom Field of jira

amit anand June 21, 2021 edited

We have upgraded jira from v8.5.3  to v8.13.7 and after upgrade i am facing problem in some of custom fields.

This is mainly into multi select field.

jira_custom.JPG

2 answers

1 accepted

0 votes
amit anand June 21, 2021

I can see script is not compiling and getting below error.

 

The script could not be compiled: <pre>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script10.groovy: 1: unexpected token: < @ line 1, column 1. <script type="text/javascript"> ^ 1 error </pre>.

 

 

Below mention is code.

 

<script type="text/javascript">

(function($) {

    AJS.$("#customfield_11000 option[value='-1']").remove(); //Removes the default value "None"

    function convertMulti(id){

        if (AJS.$('#'+id+"-textarea").length == 0){

            new AJS.MultiSelect({

                element: $("#"+id),

                itemAttrDisplayed: "label",

                errorMessage: AJS.params.multiselectComponentsError

            });

        }

    }

 

    AJS.toInit(function(){ 

        convertMulti("customfield_11000");

    })

 

    JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) {

        AJS.$("#customfield_11000 option[value='-1']").remove();

        convertMulti("customfield_11000");

    });

})(AJS.$);

</script>

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.13.7
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events