Facing Problem in Custom Field of jira

amit anand June 21, 2021

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
AUG Leaders

Atlassian Community Events