I'm trying to build a rule in our space that will a) archive pages that have been inactive for over a year and b) notify the page owner that their pages have been archived. I started with the "archive inactive pages" and "notify owners of inactive pages" templates and have been modifying and testing it, but I'm running into some problems I don't know how to resolve.
Some factors I'm working with:
- I need to be able to exclude (or include) sections of spaces where content shouldn't be archived.
- The email notification is necessary because the auto-notification Confluence sends doesn't provide any context and, knowing my users, a nonzero percentage of them will freak out when they get it. So I need to be able to send a custom message on archival.
- Purchasing additional modules isn't a viable option right now.
Currently the flow looks like this:
Problem 1: The flow is wrong.
Here's how I would want the flow to work:
1. Identify inactive pages.
2. Apply exclusions or inclusions, if they're present.
3. Archive pages that fit the criteria.
4. Send the owner of those pages an email informing them of the archival.
Here's how the flow actually works:
1. Identify inactive pages.
2. Apply exclusions or inclusions.
3. Archive pages that fit the criteria.
4. Send the owner of the pages identified in step #1 an email informing them all pages have been archived, regardless of exclusions/inclusions and if those pages were actually archived or not.
How do I get that second branch to pull the "pages archived in step 3" value, rather than the value in step 1?
Problem 2: The "If" condition isn't working.
This one is set up very simply so I don't know how it's going wrong. It should be comparing the parent page of each inactive page to the specified ID and seeing if there's a match. I know it should be pulling up results, based on what I've configured. However, every time I run it, I get the "Unable to render smart values when executing this rule: Failed to get value for page.parent.id" error and it doesn't identify any pages at all.
I had this rule working correctly in my personal space, but when I duplicated it into a communal space, now it doesn't work, and I have no indication of what's causing the error.
I'm hoping someone can give me some insight here - I've reached the limits of what little documentation I can find. Thanks!
Although I have not specifically tried your scenario, I wonder if both of those steps can be done in one rule...
Reviewing the original article when those smart values and rule templates were added, it seems one may perform the page archive or the batched-notification, but not both together. You may need to try this in a test site with a smaller sample size to confirm this, or check with the Atlassian Support team.
There is not a lot of documentation for this Confluence automation feature where the first "branch" looks like a branch, but sometimes it is not one as it merely feeds to populate the owner and author smart values for batch notifications.
For the condition you are checking, I wonder if that page data is present in order to perform the test. You could validate that with a test rule, again based on the template:
Then run the rule from the editor and check the log for the values.
Kind regards,
Bill
I updated it with the log action, and still got the same error:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information, @erica_bogosian
And...I forgot that unlike Jira rule smart values, Confluence ones are less forgiving when an object / attribute is missing. To workaround this, a smart values condition with a conditional block is needed to first test if the parent exists.
For example:
That first value in the condition confirms a parent exists before trying to access parent.id attribute.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, it's not erroring anymore, but it's still turning up nothing even though I know there are inactive pages in that section.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is curious; when I did a similar test filtering for a specific parent ID value, it found them and logged the values.
Have you tried adjusting the timeframe for the branch to confirm inactivity within that timeframe? Please note this is what the documentation states that branch does, with italics added by me:
For each inactive page
A For each inactive page branch executes a condition or action on 1,000 pages that align with the criteria you select. An inactive page is any page that has not been viewed in the specified time period. The view history includes updates and comments made to the page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, the rule is set to pull anything with no activity in the last 7 days, and according to content manager, none of the pages in that section have had activity for at least two weeks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am out of ideas to check for this symptom. As you appear to be the Product Admin for a paid license, I recommend submitting a ticket to Atlassian Support to take a look. They may see something we are missing.
https://support.atlassian.com/contact/#/
When you hear back from them, please post what you learn to benefit the community. Thanks!
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.