error in #controlFooter() templates/plugins/jira/macros.vm

XMLWordPrintable

    • 4.02

      I think the #controlFooter macro in templates/plugins/jira/macros.vm has some errors.

      Jira 4.2.2's code is

      #macro(controlFooter $action $description $noHeader)
          #if ($!field && $!field.id)
              #customControlFooter($action $field.id $description $!displayParameters $auiparams)
          #elseif($!customField && $!customField.id)
              #customControlFooter($action $customField.id $description $!displayParameters $auiparams)
          #else
              #customControlFooter($action '' $description $!displayParameters $auiparams)
          #end
      #end
      

      I think that the code is supposed to be

      #macro(controlFooter $action $description $noHeader)
          #if ($field && $field.id)
              #customControlFooter($action $field.id $description $!displayParameters $auiparams)
          #elseif($customField && $customField.id)
              #customControlFooter($action $customField.id $description $!displayParameters $auiparams)
          #else
              #customControlFooter($action '' $description $!displayParameters $auiparams)
          #end
      #end
      

      Also, this code is inadvertently causing this error in a lot of plugins that utilize the controlFooter macro

      2011-01-28 15:24:32,113 http-80-4 ERROR admin 924x2334x1 pdebba 0:0:0:0:0:0:0:1 /secure/admin/ConfigureSkipRoles!default.jspa [webwork.util.ValueStack] query="field" {[id="field" type="8" values=""]}
      java.lang.IllegalArgumentException: wrong number of arguments
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
              at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
              at webwork.util.ValueStack.findValue(ValueStack.java:412)
              at webwork.util.ValueStack.findValue(ValueStack.java:213)
              at webwork.view.velocity.VelocityHelper$WebWorkVelocityContext.internalGet(VelocityHelper.java:237)
              at org.apache.velocity.context.AbstractContext.get(AbstractContext.java:200)
       

              Assignee:
              Peter Leschev
              Reporter:
              Jeff Kirby
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: