• Empty trash on file age basis

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #2628  by ribizli
 
Dear Support,

could you give me some hint, how can we implement the following feature?

The deleted files in the trash should be purged if they are longer than a specified time (e.g. 1 month) there.

We would like to prohibit the purge for the users, but don\'t keep the deleted files forever.


Is it possible to implement a feature like this?

Thanks in advance.
 #2637  by ribizli
 
I\'ve figured out and implemented a solution:
  1. on deletion of files or folders a new date attribute is added to the Node
  2. this date attribute is set to the current date
  3. a new retain.trash setting is introduced in OpenKM.cfg
  4. on \'Purge All\' only that entries will be deleted, which have older date than the days specified in the config
Additionally I\'ve introduced a scheduled task, which runs daily and purges the trash of all users (obviously removing only the old entries). So the users don\'t have to care about cleaning.


PS: One challenge - The new JRC attribute has to be registered in the current repository, so I\'ve put a DirectRepositoryModule.registerCustomNodeTypes() call into the init() method of the RepositoryStartupServlet. This will either register or re-register all attributes. After the next restart the call can be removed.
 #3904  by pavila
 
May be we can include these changes into the OpenKM source? Perhaps it sounds insteresting for more people.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.