I am trying to automate the notification about incomplete tasks assigned to the person. In the scope of this notification, I want to mention the Confluence page where the particular incomplete task is located.
Does anybody know if that is possible using current Confluence Automation tools or is it planned for future releases?
Thanks in advance,
Helen
You should be able to use smart values for this! See our documentation on smart values here: https://support.atlassian.com/cloud-automation/docs/smart-values-in-confluence-automation/
Note that the smart values may differ depending on which components you are using in the rule. If you are using the task-related triggers, all the {{page}} and {{task}} smart values should be available. If you are using the task branch with something like a scheduled trigger, then only the {{task}} smart value will be available by default.
edit: Jump to the comment with the rule structure that fully addresses this use case https://community.atlassian.com/t5/Confluence-questions/Re-Re-Confluence-Automation-How-to-get-a-page-URL-or/qaq-p/2691616/comment-id/312607#M312607
Hi @Trev Angle ,
I am using a task branch - for all incomplete tasks I am sending the notification. So I need to:
1) Know the page URL or ID where the incomplete task is located
2) Check that this page is located in the specific section and send a notification if that's the case
I couldn't find any smart value that could resolve my issue. That is why I'm asking the community. Probably this is something Atlassian should enhance in future releases.
Thanks,
Helen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for replying so late, but I'm happy to say that the task branch now outputs the {{page}} smart value for whichever page the task is on! I think that will address your issue.
See more in this community post: https://community.atlassian.com/t5/Confluence-articles/MANY-New-Smart-Values-Added-to-Automation-for-Confluence/ba-p/2588511
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Trev Angle ,
Thanks for the update.
With the new outputs of the task branch, it does resolve my point #1 now, however, the second one remains outstanding - "2. Check that this page is located in the specific section and send a notification if that's the case".
So my goal is to collect all uncompleted tasks from only those pages that are located under specific pages (e.g. collect incomplete action points from all Retro pages).
Inside the Task branch, I tried to add various conditions none of which are working. Here are some examples I tried (xxx, qqq, www and eee below are just the ids of the pages):
CQL condition: ancestor = xxx
CQL condition: {{page.parent.id}} IN (qqq, www, eee)
CQL condition: {{page.parent.id}} IN ("qqq", "www", "eee")
CQL condition: {{page.parent}} IN (qqq, www, eee)
CQL condition: {{page.parent.id}} = qqq OR {{page.parent.id}} = www OR {{page.parent.id}} = eee
CQL condition: {{page.parent.id}} equals qqq OR {{page.parent.id}} equals www OR {{page.parent.id}} equals eee
e.g.
In the case of an ancestor, it doesn't return anything at all. In all other cases, the rule breaks with an error that is hard to understand:
Could you please advise if there is a plan to support more comprehensive syntax in the Task branch in future?
Thanks,
Helen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately the CQL condition doesn't work to filter results from the task branch, you have to use the smart value condition. I would try using the {{page.parent.id}} smart value in that condition to filter the tasks. You can put multiple conditions in a row to check for multiple parent pages.
edit: using two conditions in a row like this doesn't actually work, please see the rest of this thread to see some rule structures that will work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trev,
Sadly this approach doesn't work for me. It just does nothing - not even adding a value to the audit log for the page parent, as well as not sending a Teams message.
This is all I get in the Audit log:
I appreciate any help and will be happy if the Atlassian team adds similar branch rules and conditions that we have in Jira. That will simplify life a lot!
Thanks,
Helen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oops that rule structure I recommended is flawed. The page would need to have two different parents to make it through both conditions, which doesn't make sense.
Here's a new rule structure which should work because I actually tested it this time (sorry!)
I would recommend copying and pasting this into your smart value condition and then only changing the numbers to match the parent IDs you want (make sure you don't leave out the quotation marks!):
{{or(page.parent.id.equals("1540097"), page.parent.id.equals("327868"))}}
Here's the documentation for the or() function with smart values: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#or
And the documentation for the .equals() function: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#equals-string-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Trev,
Thank you for bringing a new idea! I tried this approach as well. Unfortunately, there was no luck. The rule just doesn't go beyond the IF condition.
From the screenshot above it's clear that there is no second Audit Log comment that had to be added after passing the IF condition, so I assume the root cause is still there.
Will appreciate any help or advice!
Thanks,
Helen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hm I think it's because the or() function only works if you pass in two values. We could try composing several or() functions but I think that's overkill.
Regular expressions will probably be the easiest approach. I just tested it and it should work the same as before, except you can have more than two parent pages. The rule will have the same basic structure and just the comparison condition needs to change.
In the first field, put the smart value {{page.parent.id}}
For the condition, pick exactly matches regular expression
In the second field, copy and paste the regular expression (1540097|327868|123456|56789) and replace the numbers with the parent IDs you want. If you need more IDs, just be sure to separate each number with a pipe symbol |
Let me know if that works for you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trev,
This solution works perfectly! Thank you a lot for your effort in helping me resolve my issue!
Best wishes,
Helen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.