Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-25036

error in edit-multicheckboxes.vm

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 4.4.1, 5.0
    • 4.3.4
    • Issue - Fields
    • jira commercial enterprise standalone

    Description

      There is an error inside edit-multicheckboxes.vm
      In the non-aui else block, the

       #if ($selectedValues && $selectedValues.contains($option.value)) #else ... #end 

      should be inside the

       #foreach ($option in $configs.options) 

      loop

      This drastically affects plugins that edit radio and check box fields

      needed patch:

      
      Index: atlassian-jira/WEB-INF/classes/templates/plugins/fields/edit/edit-multicheckboxes.vm
      ===================================================================
      --- atlassian-jira/WEB-INF/classes/templates/plugins/fields/edit/edit-multicheckboxes.vm	(revision 484670)
      +++ atlassian-jira/WEB-INF/classes/templates/plugins/fields/edit/edit-multicheckboxes.vm	(working copy)
      @@ -1,3 +1,6 @@
      +
      +## altered by Palm. See bug JRA- todo
      +
       #if ($!displayParameters.get('theme') && $!displayParameters.get('theme') == 'aui')
           $!{auiparams.put("controlHeaderType", "checkbox")}
           $!{auiparams.put("fieldsetClass", "group")}
      @@ -15,12 +18,12 @@
       #else
           #customControlHeader ($action $customField.id $customField.name $fieldLayoutItem.required $displayParameters $auiparams)
               #if ($value) #set ($selectedValues = $value) #end
      -        #if ($selectedValues && $selectedValues.contains($option.value))
      -            #set ($checked = ' checked="checked" ')
      -        #else
      -            #set ($checked = "")
      -        #end
               #foreach ($option in $configs.options)
      +            #if ($selectedValues && $selectedValues.contains($option.value))
      +               #set ($checked = ' checked="checked" ')
      +            #else
      +               #set ($checked = "")
      +            #end
                   <input$!{checked} class="checkbox" id="${customField.id}-${velocityCount}" name="${customField.id}" type="checkbox" value="${textutils.htmlEncode($option.value)}" />
                   <label for="${customField.id}-${velocityCount}">$option.value</label>
                   #if($velocityCount != $configs.options.size())<br />#end
      

      Attachments

        Issue Links

          Activity

            People

              mlassau Mark Lassau (Inactive)
              adc6ee404f6d Jeff Kirby
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: