I have come across a bug in the more recent versions of Confluence ( 5.5.1, 5.6.5, 5.7.3, 5.9.4. 5.9.5), where Boolean parameters always evaluate as true when used in user macros (or the user-macro module for plugins).
Is anyone else having this issue, or needing this functionality? If so, please vote for this bug: https://jira.atlassian.com/browse/CONF-40831
Yeah, I just discovered that earlier today when trying to find a workaround. Booleans in user macros were actually evaluating as true/null in earlier versions, but now evaluate as true/false. So the classic construct used below (which should work per Velocity docs), is actually only testing not_null/null:
## @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
So the result is that it worked in early versions, but now always evaluates as not_null.
So I am going to rewrite my macros using the explicit syntax you suggested.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough cough, all companies). If content calendars, marketing plans, and bu...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs