Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#16 Delete code review link on bug when Topic is deleted.

closed-accepted
nobody
None
5
2008-02-28
2008-02-20
rob_webset
No

Hi David,

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.

Thanks

Rob

Discussion

  • David Sitsky
    David Sitsky
    2008-02-20

    Logged In: YES
    user_id=208928
    Originator: NO

    Option 1 sounds fine - although it will be impossible to implement for Bugzilla, since comments can't be deleted.

    Just curious - if the user is only creating a temporary topic, why are they setting the bug ID field?

    Cheers,
    David

     
  • rob_webset
    rob_webset
    2008-02-21

    Logged In: YES
    user_id=1137102
    Originator: YES

    OK, only a few minor tweaks needed to support this one, should be a pretty easy merge :-)

    Users are entering the BugID because they are generating code reviews from the BugID (You knew I'd say that didn't you!)

    Thanks

    Rob

    File Added: delete_topic_link.patch

     
  • rob_webset
    rob_webset
    2008-02-21

    Delete Topc Link Patch

     
  • David Sitsky
    David Sitsky
    2008-02-22

    • status: open --> closed-accepted
     
  • David Sitsky
    David Sitsky
    2008-02-22

    Logged In: YES
    user_id=208928
    Originator: NO

    I thought so. :)

    Anyway - its all checked in now.

     
  • rob_webset
    rob_webset
    2008-02-28

    Missed call in BugTracker.pm

     
    Attachments
  • rob_webset
    rob_webset
    2008-02-28

    Logged In: YES
    user_id=1137102
    Originator: YES

    Sorry, missed one bit in BugTracker.pm.

    Patch attached.

    Thanks

    Rob

    File Added: BugTracking.pm.patch

     
  • rob_webset
    rob_webset
    2008-02-28

    • status: closed-accepted --> open-accepted
     
  • David Sitsky
    David Sitsky
    2008-02-28

    • status: open-accepted --> closed-accepted
     
  • David Sitsky
    David Sitsky
    2008-02-28

    Logged In: YES
    user_id=208928
    Originator: NO

    Ok - have put in your extra patch.