Roundup Tracker - Issues

Message7228

Author rouilj
Recipients rouilj
Date 2021-05-12.02:02:23
Message-id <1620784943.96.0.1328774327.issue2551133@roundup.psfhosted.org>
In-reply-to
In https://wiki.roundup-tracker.org/RemovingUsers deleting journal
entries for a user is part of clearing PII from the user.

Currently this needs to done using database commands (SQL).

This should be doable using roundup-admin.

Enhance the roundup-admin pack command to accept one or more
designators or classes to prune journal entries for those
objects or all objects in the class.

  roundup-admin pack 0d user5

remove all journal entries for user5 starting now all the way
back to the create entry. The create entry will not be deleted.

  roundup-admin pack 0d keywords

delete all journal entries except the create entry for all keywords.

   roundup-admin pack 1y

delete all journal entries (except create entries) older than 1
year ago for all items in the database (this is the current
functionality).

Changes to: admin.py: do_pack,
            backends/rdbms_common.py: pack,
            backends/back_anydbm.py: pack

pack methods get new parameter array of designators. Use 
hyperdb::splitDesignator to split into (class, id) tuples.
Sort by class and create array of id's.

Select/iterate over history for each class deleting matching id's.
For sql use: 'WHERE column_name IN (id1, id2, ...);' clause.

Basically process journal entries for a class once in anydbm
and use only one select statement for sql.
History
Date User Action Args
2021-05-12 02:02:23rouiljsetrecipients: + rouilj
2021-05-12 02:02:23rouiljsetmessageid: <1620784943.96.0.1328774327.issue2551133@roundup.psfhosted.org>
2021-05-12 02:02:23rouiljlinkissue2551133 messages
2021-05-12 02:02:23rouiljcreate