lizhi1234 / databasecleanup Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mantisbt-plugins/databasecleanup
Remove old issues based on age and status
License: Apache License 2.0
This project forked from mantisbt-plugins/databasecleanup
Remove old issues based on age and status
License: Apache License 2.0
DatabaseCleanup plugin for Mantis issue tracker ============================================= The main usage for this plugin is to remove issues that reached a predefined status and age. WARNING This plugin can purge a large number of issues, along with their comments, attachments, and all other related data **without any confirmation**. Please make sure to backup your database before testing the plugin. Installation ------------ As with other plugins, it is enough to download or unpack the plugin in the plugins/ directory of your existing mantis installation Configuration ------------- All the tunables for the plugin are accessible from the Manage Plugins page <mantis_url>/plugin.php?page=DatabaseCleanup/config However, it is always possible to define configuration variables in config_inc.php; those will named: $g_plugin_DatabaseCleanup_<variable name> where the actual variable names are given below Configuration variables ----------------------- * default_expiration_period bug expiration period, valid for all projects. It is possible to use natural language like 'one year' or '6 months' as understood by the strtotime() PHP function. A value of '0' disables the plugin. * reference_date timestamp to use as reference. Can be either the string 'date_submitted' or 'last_udpdated' * minimum_status only bugs above this status will be deleted * run_as_user run script as the given user wsaas logged in. Needs delete privileges for all projects * admin_email if set, send a summary email to the administator with a CSV attachment detailing issues deleted * run_delay delay in hours between consecutive runs of the script. This is a security measure against DoS attacks * secret_key a shared secret string, used to authorize clients to run the cleanup Testing cleanup --------------- When everything is configured, it is possible to test the procedure by opening the page: <mantis_url>/plugin.php?page=DatabaseCleanup/dummy_cleanup you will be able to check if the call has all the required parameters (see below) and see the cleanup summary with the sample CSV that will be sent to the administator Running the cleanup operation ----------------------------- In order to trigger the cleanup operation, you need to call the URL: <mantis_url>/plugin.php?page=DatabaseCleanup/cleanup&key=XXXXX&sig=YYYYY where XXXXX is a random string (for security purposes, we suggest using a different one at each run) and sig is call signature, defined as: md5(secret_key + key) There is a convenient run_cleanup.sh script in the cron/ directory that can be used to trigger periodically the cleanup script
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.