donderdag 15 oktober 2009

using JTrac as issue tracking system

We wanted some simple tracking system. Some out of the box and easy to use application. Because I have experience working with Trac this was my first choice. But on my current project we lack a Python installation so setup would require setting up a python environment first... Something similar in Java would be easier... and that would be JTrac indeed :D.

JTrac also has support for custom fields and a custom ticket workflow. Are very similar to Trac but in java an distributed as a war that we could deploy on our already running glassfish servers.

Until now we have only found one problem with version 2.1.0. Some tickets showed duplicate identities. It is already described in this topic so solution was fairly simple. And as it seems a new version have fixed this problem for ever.

I quote the solution:
I'm pretty confident this will be addressed in the next version, some work went into re-doing how the next sequence number is generated. You can check the SVN commit logs if you need more details.

Thanks all who posted information. It all helps. An update I received over e-mail from Maurizio (who reported the problem on restart) is at least in that scenario - the problem is fixed.

New installations of JTrac will also enforce a unique constraint at the database level - for the combination of 2 columns on the "items" table. Existing users can easily do this on their existing databases.

The columns on the "items" table are "space_id" and "sequence_number"

For HSQLDB and MySQL you can add a constraint as follows:
alter table items add constraint con_items_space_seq unique (space_id, sequence_num);
This command will of course fail if the table still contains duplicates. To find duplicates, you can run this query:
select a.id from items a, items b where a.space_id = b.space_id and a.sequence_num = b.sequence_num and a.id > b.id;
You can select more columns in the above query to get more info as to which rows are duplicated. But the above query can be easily used as a subquery to delete the duplicate records. To take care of referential integrity, you have to delete the history table entries first:
delete from history where item_id in (
select a.id from items a, items b where a.space_id = b.space_id and a.sequence_num = b.sequence_num and a.id > b.id
);
and then:
delete from items where id in (
select a.id from items a, items b where a.space_id = b.space_id and a.sequence_num = b.sequence_num and a.id > b.id
);
And now you can add the unique constraint.

Geen opmerkingen:

Een reactie posten