We have noticed with our system (Using Test Director) that when users create in interim code review topic so that they can quickly look over their changes so see it there are any obvious clangers, when they delete the review (as it was only ever meant to be temporary - the proper review will be generated later for general review) that the link in Test Director still remains.
We would like to be able to delete that link when the topic is deleted (As the http link will now point to nothing.
I can happily do the changes to support this for Test Director but I was just wondering which approach you would prefer?
Choices that I can think of are:
1) In BugTracking.pm method topic_changed update call to bug_db_connection->update_bug to take the topic_state and then update TestDirectorConnection.pm to delete the link rather than add a new one if the topic_state is set to "delete".
2) In BugTracking.pm method topic_changed update the code to see if the topic_state is "delete" and call a new interface on the "bug_db_connection" which handles deletes. This would require all the BugTracker types to implement this new interface (default for this new interface would be to call the existing update_bug so that the behaviuor is the same).
3) Add a new interface to Codestriker::TopicListeners::Manager (i.e. topic_deleted) which is called from SubmitEditTopicProperties.pm when a topic is deleted (instead of topic_changed) and then cascade this change all the way down as detailed in option 2.
Which do you think you would prefer? I have posted this in the patches directory as I hope to add a diff file very soon - just need to know which approach you would prefer. Option 1 is most probably least work and least impact to other systems, but I thought I'd see what you thought.