| | 26 | |
|---|
| | 27 | === For Trac 0.11 === |
|---|
| | 28 | |
|---|
| | 29 | If upgrading from 0.10, you'll need to convert the data using the `migrate_pending_attrib_to_status.py /path/to/tracenv` script which is included. |
|---|
| | 30 | |
|---|
| | 31 | Set up your ticket workflow to include a 'pending' status (see the following example): |
|---|
| | 32 | {{{ |
|---|
| | 33 | [ticket-workflow] |
|---|
| | 34 | pending = new -> pending |
|---|
| | 35 | pending.permissions = TICKET_MODIFY |
|---|
| | 36 | }}} |
|---|
| | 37 | |
|---|
| | 38 | Specify a status for tickets to be moved to |
|---|
| | 39 | {{{ |
|---|
| | 40 | [ticket] |
|---|
| | 41 | pending_removal_status = new |
|---|
| | 42 | }}} |
|---|
| | 43 | |
|---|
| | 44 | Install the !PendingStatusRemovePlugin to have the pending flag automatically removed when the reporter responds. |
|---|
| | 45 | {{{ |
|---|
| | 46 | <CHECKOUT THE SOURCE AND GO TO THE 0.11/removependingplugin DIRECTORY> |
|---|
| | 47 | setup.py bdist_egg |
|---|
| | 48 | cp dist/RemovePendingStatusPlugin-x-y-z-py2.4.egg $TRAC_ENV/plugins |
|---|
| | 49 | }}} |
|---|
| | 50 | You'll also need to enable the Plugin in your `trac.ini` file: |
|---|
| | 51 | {{{ |
|---|
| | 52 | [components] |
|---|
| | 53 | removepending.* = enabled |
|---|
| | 54 | }}} |
|---|
| | 55 | |
|---|
| | 56 | To enable the automatic closing of tickets, you'll need to set up a script to be run by cron. Mine looks like this:[[BR]] |
|---|
| | 57 | {{{ |
|---|
| | 58 | #! /bin/bash |
|---|
| | 59 | |
|---|
| | 60 | TRAC_ENV=/somewhere/trac/project |
|---|
| | 61 | SCRIPT_DIR=$TRAC_ENV/localscripts |
|---|
| | 62 | LOGFILE=$SCRIPT_DIR/close_old_pending.log |
|---|
| | 63 | |
|---|
| | 64 | date >> $LOGFILE |
|---|
| | 65 | |
|---|
| | 66 | python $SCRIPT_DIR/close_old_pending.py -p $TRAC_ENV -d 14 >> $LOGFILE 2>&1 |
|---|
| | 67 | }}} |
|---|
| | 68 | |
|---|
| | 69 | === For Trac 0.10 === |
|---|