I'd was trying to integrate another system with Jtrack. Mi requirement was to generate automatically the project items to be tracked from another system database.
The problem I found is how the sequence number is generated by the JtrackImpl class, in the StoreItem method. It is automatically generated. In some case cases that would not be desired. In my case, when the items are generated from the other system, the control of how sequenceId is generated must remain in the source system.
To satisfy this requirement, I modified the next classes:
- info.jtrac.JtracImpl: I created a new StoreItem method that disables/enables the automatically generation of the sequenceId of the iTem, depending on a new parameter (generateSequenceId : boolean).
I modify the original method to call the added method (with generateSequenceId = true).
- info.jtrac.Jtrac interface: to add the new method to it.
Using the new method, another module can have the control on how the sequenceId is generated when a new item is inserted in Jtrack. The sequenceId can be stored in the external module in order to allow other operations after the item was inserted on Jtrac.
In the previous message I forgot mentioning that I attached the modified java source code with the message.
Best Regards.
Another modification would be to modify the configuration of the projects, allowing the configuration of how Jtrac functions, specifying when the sequenceId must be generated automatically by Jtrac and when not. When the configuration is not generated automatically by Jtrac, the ID must be specified manually, and Jtrack should validate that there is not a duplicated ID.
Best Regards.