Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-79253

Using CQL in "If / else block" conditions doesn't always work

      Issue Summary

      When creating an automation rule, users may add "If / else block" conditions. When using CQL, it may not always work. The status in the audit log will appear as "NO ACTIONS PERFORMED".

      We've encountered this issue when using CQL with labels in newly created pages. 

      Steps to Reproduce

      1. Create a page and add labels to it.
      2. Create an automation rule.
      3. Select any trigger (e.g. page commented)
      4. Select an If condition.
      5. Use CQL (e.g. type = page and label = "test")
      6. Select an action.

      Expected Results

      The rule should always perform actions

      Actual Results

      The rule does not always perform actions. The status will appear as "NO ACTIONS PERFORMED".

      Workaround

      Use the smart values instead.

            [CONFCLOUD-79253] Using CQL in "If / else block" conditions doesn't always work

            Pinned comments

            Hello, we are closing this bug ticket as Won't Fix for now.

            CQL is eventually consistent, which means that when an Automation rule triggers and CQL is used to try to inspect some aspect of the data that was just changed, it's possible that CQL sees the old representation of the data. We have introduced a small delay (up to 10s) into the CQL condition that tries to help reduce false negatives, but it is not a guarantee that the changes will be visible to CQL.

            We would advise that you use alternatives to CQL when working with freshly changed data, so specifically using either the smart value condition or the page condition. We understand a lot of users use the `ancestors` field within CQL in the CQL condition today, so we are working on adding ancestor support to the page condition shortly to provide a way to assert whether or not a page is under certain content within the content tree.

            If you have use cases that cannot be satisfied through smart values or the page condition, please leave suggestions for us to consider for future components and component enhancements.

            Alex Williams added a comment - Hello, we are closing this bug ticket as Won't Fix for now. CQL is eventually consistent, which means that when an Automation rule triggers and CQL is used to try to inspect some aspect of the data that was just changed, it's possible that CQL sees the old representation of the data. We have introduced a small delay (up to 10s) into the CQL condition that tries to help reduce false negatives, but it is not a guarantee that the changes will be visible to CQL. We would advise that you use alternatives to CQL when working with freshly changed data, so specifically using either the smart value condition or the page condition. We understand a lot of users use the `ancestors` field within CQL in the CQL condition today, so we are working on adding ancestor support to the page condition shortly to provide a way to assert whether or not a page is under certain content within the content tree. If you have use cases that cannot be satisfied through smart values or the page condition, please leave suggestions for us to consider for future components and component enhancements.

            All comments

            Hello, we are closing this bug ticket as Won't Fix for now.

            CQL is eventually consistent, which means that when an Automation rule triggers and CQL is used to try to inspect some aspect of the data that was just changed, it's possible that CQL sees the old representation of the data. We have introduced a small delay (up to 10s) into the CQL condition that tries to help reduce false negatives, but it is not a guarantee that the changes will be visible to CQL.

            We would advise that you use alternatives to CQL when working with freshly changed data, so specifically using either the smart value condition or the page condition. We understand a lot of users use the `ancestors` field within CQL in the CQL condition today, so we are working on adding ancestor support to the page condition shortly to provide a way to assert whether or not a page is under certain content within the content tree.

            If you have use cases that cannot be satisfied through smart values or the page condition, please leave suggestions for us to consider for future components and component enhancements.

            Alex Williams added a comment - Hello, we are closing this bug ticket as Won't Fix for now. CQL is eventually consistent, which means that when an Automation rule triggers and CQL is used to try to inspect some aspect of the data that was just changed, it's possible that CQL sees the old representation of the data. We have introduced a small delay (up to 10s) into the CQL condition that tries to help reduce false negatives, but it is not a guarantee that the changes will be visible to CQL. We would advise that you use alternatives to CQL when working with freshly changed data, so specifically using either the smart value condition or the page condition. We understand a lot of users use the `ancestors` field within CQL in the CQL condition today, so we are working on adding ancestor support to the page condition shortly to provide a way to assert whether or not a page is under certain content within the content tree. If you have use cases that cannot be satisfied through smart values or the page condition, please leave suggestions for us to consider for future components and component enhancements.

            Logi Helgu added a comment -

            I agree that this should be considered more severe than minor.

            Even though there is a workaround (smart values) then this totally undermines the usage of automations.  When I recently started trying them out I just used the CQL since I'm used to it (hadn't checked out the smart values and didn't see the value to learn something new since I knew the CQL)...then when the automations don't work I immediately thought "we'll this is just broken".  So you might have people like me who are looking into the automations via CQL and finding that they are not reliable and loose faith in them.  So I would say this is major severity and should be address (or even remove the CQL option if you focusing on the smart values and aren't giving the CQL option any love

            Logi Helgu added a comment - I agree that this should be considered more severe than minor. Even though there is a workaround (smart values) then this totally undermines the usage of automations.  When I recently started trying them out I just used the CQL since I'm used to it (hadn't checked out the smart values and didn't see the value to learn something new since I knew the CQL)...then when the automations don't work I immediately thought "we'll this is just broken".  So you might have people like me who are looking into the automations via CQL and finding that they are not reliable and loose faith in them.  So I would say this is major severity and should be address (or even remove the CQL option if you focusing on the smart values and aren't giving the CQL option any love

            We've made a modification to the CQL condition to try to match again after a delay to help avoid the false negatives users are seeing. Please let us know if you continue to see this issue and we can make additional adjustments. In particular, if you continue to see this issue, letting us know the type of CQL condition you're looking for will help us pinpoint where the delay in search-ability is happening (e.g. checking pages have certain labels, checking for macros, checking for text in the page body, etc.)

            Alex Williams added a comment - We've made a modification to the CQL condition to try to match again after a delay to help avoid the false negatives users are seeing. Please let us know if you continue to see this issue and we can make additional adjustments. In particular, if you continue to see this issue, letting us know the type of CQL condition you're looking for will help us pinpoint where the delay in search-ability is happening (e.g. checking pages have certain labels, checking for macros, checking for text in the page body, etc.)

            I believe this is should be higher priority then Low. 

            The page published and page copied trigger consistently do not work with CQL due to this bug. If you need to build a condition based on Ancestor then CQL is your only option. 

            You also do not have a pause / wait block that can be used. 

            As a workaround I added a branch that created a variable based on inactive pages and that seemed to fix the issue by introducing a slight delay. 

            Hassan Mahmud added a comment - I believe this is should be higher priority then Low.  The page published and page copied trigger consistently do not work with CQL due to this bug. If you need to build a condition based on Ancestor then CQL is your only option.  You also do not have a pause / wait block that can be used.  As a workaround I added a branch that created a variable based on inactive pages and that seemed to fix the issue by introducing a slight delay. 

            Dave Fey added a comment -

            I am having the same issue but only for Page creation.  Just looking at sending an email when a page is created under a parent.  The logic checks out, "No Actions Performed" is the response when a child page under the parent is created.  If I change the trigger to Page update, using the same logic, I get an email.  Something is definitely not working as expected.

            Dave Fey added a comment - I am having the same issue but only for Page creation.  Just looking at sending an email when a page is created under a parent.  The logic checks out, "No Actions Performed" is the response when a child page under the parent is created.  If I change the trigger to Page update, using the same logic, I get an email.  Something is definitely not working as expected.

            https://getsupport.atlassian.com/browse/PCS-178565

            Customer is reporting the issue as the Automation does not work everytime. Sometime is shows as "SUCCESS" and some times it showing as "NO ACTIONS PERFORMED".

            The Work Around suggested in the channel to add more components in the rule between the trigger and the condition. I have attempted in the internal Confluence instance and it doesn't seem to work all the time.

            https://atlassian.slack.com/archives/C01D2BE796F/p1685119941917789

             

            Shivconfluence added a comment - https://getsupport.atlassian.com/browse/PCS-178565 Customer is reporting the issue as the Automation does not work everytime. Sometime is shows as "SUCCESS" and some times it showing as "NO ACTIONS PERFORMED". The Work Around suggested in the channel to add more components in the rule between the trigger and the condition. I have attempted in the internal Confluence instance and it doesn't seem to work all the time. https://atlassian.slack.com/archives/C01D2BE796F/p1685119941917789  

              57d028c6506e Alex Williams
              9574dabfb3a9 Matheus Z
              Affected customers:
              23 This affects my team
              Watchers:
              33 Start watching this issue

                Created:
                Updated:
                Resolved: