-
Type:
Bug
-
Resolution: Not a bug
-
Priority:
Low
-
Component/s: Confluence Automation
-
1
-
Severity 3 - Minor
Issue Summary
The IF logical condition smart value is not working when validating the presence of Labels on Confluence pages.
For example, if you are looking for page with the label "test".
While the page.labels.name.contains("test") smart value seems to work fine (returns TRUE), the same expression within an IF condition – if(page.labels.name.contains("test"),"true","false") – fails.
Also, it seems the logical condition works in the IF when providing the exact position within the "labels" list (using a get(0) if the only label, for example): if(page.labels.get(0).name.contains("test"),"true","false").
This feature is particularly useful when filtering lists (i.e. Lookup Pages) for actions like Send Email. Other branches, like "Related entitles", allow the filter using CQL but do not include additional page fields like Author, URL, Status or any Dates, that are often used when sending automated emails about pages.
Steps to Reproduce
- Create a Confluence page, publish it and add the label "test" to it.
- Create a new rule with "Manual trigger from page"
- Add a "Log action" step with the following value: {{page.labels.name.contains("test")}}
- Add another "Log action" step with the following value:
{{if(page.labels.name.contains("test"),"true","false")}} - Go to the page and trigger the rule manually.
- Check the Audit log for the rule.
Expected Results
Audit Logs show "true" for bot "Log action" steps.
Actual Results
Only the first "Log action" shows "true", but the second (using IF) shows "false".
Workaround
Currently, the only workaround for this is changing your rule to use a different filter for pages, for example, "Branch / related entities" and filter page labels via CQL.
This workaround may not apply if you need to filter other criteria from fields not available on "Branch / related entities", like page Status, Author, etc.