Hi,

I spent some time the last few days writing a duplicate plug-in because
I needed one from work.

In a nutshell, it works using three custom fields dup_of, dups, and
dup_count, where dup_of is the actual value that a user sets/changes,
and dups and dup_count get set through the ITicketChangeListener.

Originally I had hoped to only need dup_of on the duplicate ticket and
calculate everything else on the fly, but that would make it impossible
to do the reports and queries.

The plug-in also handles dup trees, that is to say, if 3 dups 2 dups 1,
then 3 shows up in 1's dups list and count.  The idea there is that it
should be easy to correct a mistake in dupping (by redupping 2 to 4 for
example) but still be able to produce useful reports using the dup_count
on the master tickets.

I've added a test suite as well, and over the weekend used the ticket to
retriage our company incident database, and added tests and fixes to the
plug-in each time I ran into something I hadn't thought of.

You can get the plug-in from
https://thomas.apestaart.org/thomas/trac/browser/tests/trac/tracdupplugin/

If nobody complains, I'll register it on trac-hacks.

This is my first serious plug-in attempt for trac, so feel free to be
nice and eview and give me some pointers if the plug-in is ok, or be
rude and drill me into the ground if my plug-in skills are beyond
redemption :)

I have a small list of questions, if anyone has time, related to the
plugin:
- how to disallow editing of dups and dup_count field ?
- how to show dup_of and dups as a trac link (with #) everywhere ?
- how to avoid the nasty time.sleep(1) hack ?
- how to integrate trac's logging with unittest logging correctly ?
- how to make report sort by dup_count numerically instead of
alphabetically ?
- should my strings be unicode or not ?
- how to add an action on the ticket web page to resolve as a duplicate
of ...

Thanks,
Thomas


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to