Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-40831

Boolean parameters in user macros ignore default values

    XMLWordPrintable

Details

    Description

      Summary

      Boolean parameters in user macros ignore default values

      Environment

      • Confluence 5.5.1 and above

      Steps to Reproduce

      1. Create a user macro with the following Code:
        ## @param debug:title=Debug Mode|type=boolean|default=false
         
        ## Print default set
        #if($paramdebug)
        BOOLEAN VARIABLE IS TRUE 
        #end
        #if(!$paramdebug)
        BOOLEAN VARIABLE IS FALSE
        #end
        
      2. Add it to a page

      Expected Results

      'BOOLEAN VARIABLE IS FALSE' is printed on the page

      Actual Results

      The default set is ignored and 'BOOLEAN VARIABLE IS TRUE' is printed instead

      Notes

      This seems to be related to the following bug: CONF-23704. Although the issue for string variables was fixed in that ticket, booleans still seem to be affected. I've also tested the default being set for boolean variables in Confluence 5.4.3, and the default is not ignored and was actually acknowledged so the changes made might be related.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dponzio Daniel Ponzio
            Votes:
            8 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: