Version 2 (modified by Terry Brown, 11 years ago) (diff)


Reschedule milestones on a new timeline


This isn't a normal Trac Hack, but a small standalone python program that stretches or compresses milestones between new start and stop dates, keeping the time allocations for each the same, proportionally.

Usage: [options]

Fit Trac milestone due dates into a new time range, preserving relative

  -h, --help            show this help message and exit
  -D DBTYPE, --dbtype=DBTYPE
                        database type: sqlite (default), postgres, mysql
  -d DSN, --dsn=DSN     connect spec, eg. 'user=foo dbname=bar',
                        or a filename for sqlite systems
  -s START, --start=START
                        new start date YYYYMMDD
  -e END, --end=END     new end date YYYYMMDD
  -o OLD, --old=OLD     old start date YYYYMMDD
  -S SCHEMA, --schema=SCHEMA
                        name of schema containing milestone table
  -c, --commit          commit changes to table

Bugs/Feature Requests

Existing bugs and feature requests for ReScheduleScript are here.

If you have any issues, create a new ticket.


Download the zipped source from [download:reschedulescript here].


You can check out ReScheduleScript from here using Subversion, or browse the source with Trac.


python --dsn 'user=someuser host=localhost dbname=trac' \
  --old 20071101 --start 20071203 --end 20090630 --dbtype postgres

would reschedule the milestones for a project that originally started 20071101 and ran until the due date of the last milestone to run instead between 20071203 and 20090630, which the same proportional allocation of time for each milestone.

Recent Changes

8516 by rjollos on 2010-08-30 00:50:24
Added revision info to macro.
3541 by TerryBrown on 2008-04-22 15:20:45
Do not change completed milestones, added verbose flag and option to include rescheduling history in milestone description.
2828 by TerryBrown on 2007-11-27 04:30:01
Removing 0.10, didn't mean to create it


Author: TerryBrown