is there some Confluence plugin or another solution (or way) to purge pages from the confluence trash bin after a specific amount of time (trash date + x days)?
Are there *any* ways to automate permanent deletion dependent on criteria such as "trashed" date, "created" date etc.?
You can empty trash periodically using the ScriptRunner app, as explained here.
As for emptying only certain pages from the trash, I don't think you can do that. It is "nothing or all".
If you need more sophisticated page lifecycle tracking (based on last modification, last view, manual markers, etc.) and automated archival, check out the Archiving Plugin.
I looked into a possible solution using the Archiving Plugin, but that doesn't seem to be an option. Problem: We needed a two-step workflow:
Step 1: User archives a page manually by assigning the "archive" tag OR a page is archived autoimatically by specific filter crieteria (OK, will work).
Step 2: The Archiving Plugin scans its own archive space to permanently delete all pages that are older than 90 days. (that one won't work)
However, Step 2 doesn't seem to be possible, as the Archiving Plugin is not able to use its own Archive spaces as input. Even after making such spaces visible by changing their status from "Archived" to "Current", the Archiving Plugin is not able to assign workflow rules to its own Archive spaces.
Or did I miss something?
(NB. you should have been added your comment as a reply to my answer in the top, not as a new answer. Now the context is somewhat lost.)
So, permanent deletion is a primary requirement? So must the content go forever?
I am asking this, because our add-on is built more with the mindset of "archive this content, so that it becomes invisible, but when it is necessary, it can be searched through, it can be viewed, it can be restored". The motto is: "don't delete, archive instead as you can never know".
Oh sorry. WIll do the next time.
Yes, permanent deletion is a primary requirement.
Basically, the requirement for now is that if the user deletes a page, it should be recoverable for x days, but not visible to the normal user anymore and not available for standard searches. After those x days, it should be deleted permanently automatically. This has legal reasons is thus a hard requirement.
In my use case, when using your plugin, archiving would be kind of a workaround for the lack of an automated way to purge the trash bin in a way that a page is deleted from the trash "x days after it has been trashed".
I think your plugin could help in that situation, if it could two two more things:
- Apply archiving rules also to already archived pages, i.e. that an "... (Archive)" space would be (optionally) visible to the archiving rules form, even if the space is set to "Status = Archived" (which would be required, too, to avoid search matches from these archives)
- If there was an additional "Archiving strategy", that takes care that content is permanently deleted. Maybe don't call it "archiving" then. ;-) In some companies, there are such (legal) requirements. If you add such features to the plugin, it could be very valuable to such companies, especially since there doesn't seem to be another available solution yet.
Thanks for elaborating the use case, Daniel!
Based on your explanation I created 2 public feature requests in our tracker and I encourage you to vote on these:
In addition to our product vision, user votes significantly affect the product roadmap.
Final note: I understand that the law requires you to permanently destroy content and that must go forever. But, those pages will be captured in Confluence backups and your database backups anyway. Is that compatible with the law?
Thanks Aron. For ease of implementation, "permanent deletion" could be implemented as another "Archiving strategy", however, my guess is that this is not too intuitive for new users, so it might be better to make this a new area on the archiving rules setup page and not list it as an "Archiving strategy", but rather a new rule what to do with a page.
The issue with backups is addressed already: No backups older than x days are kept at all. ;-)
Using ScriptRunner for Confluence as mentioned before you can establish using a Script Job what is the frequency that the check is made, meaning you can say that you want to purge the trash after 30 days of pages being in there.
Let me know if you need help with that.
How can you flush a single page from the trash?
If you cannot, then the trash cannot be used for this use case.
For example, if you put page "A" to the trash on 1 Jan, then page "B" on 5 Jan, and you completely empty the trash on 1 Feb (30 days after "A" was trashed), then "B" will also be flushed although it was 25 day old only -> PROBLEM!
We had a similar question before from other customers and unfortunately Atlassian does not provide a timestamp when a page is trashed.
What you can do to make it work is to listen to the PageTrashEvent, add a content property to the page setting the date that was trashed and then use a Script Job to go through all these pages.
Hope it was clear,
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