wiki:linux/trac

Configuration, Installation, Permissions, Plugins, Repository


Remove ticket

The Trac UI includes no possibility to remove a ticket. But via the interactive Trac administration console you can do it:

$ trac-admin [PATH_TO_ENVIRONMENT]/
Welcome to trac-admin 1.0.9
Interactive Trac administration console.
Copyright (C) 2003-2013 Edgewall Software

Type:  '?' or 'help' for help on commands.
        
Trac [PATH_TO_ENVIRONMENT]> ticket remove 65
Ticket 65 and all associated data removed.

Or simply by this command:

$ trac-admin [PATH_TO_ENVIRONMENT] ticket remove 65

Remove several tickets

Deleting trac tickets created since a certain date until today

By using this script you can use several tickets:

#!/bin/bash

ticket=100
end_ticket=140

while [ $ticket -le $end_ticket ]; do
    trac-admin /path/to/env ticket remove $ticket
    ticket=$(( $ticket + 1 ))
done

Note: Ctrl-C will not stop the script but only the trac-admin script. Use Ctrl-Z instead.

Last modified 2 years ago Last modified on Apr 20, 2017, 6:03:35 PM