#7994 Fix comments split across two threads, not all comments showing

v1.3.2
closed
sf-2 (994)
General
Heith Seewald
2015-10-05
2015-09-21
No

Google Code ticket imports can produce multiple "thread" objects with the same ref_id (pointer to a ticket). This means when viewing a ticket you get one of the comment threads, but you wont see the other comment thread associated with it.

Back in [#4506] we wrote a script to fix this (was committed internal to SF at the time). We should move this script to Allura, or even better make the get_discussion_thread code handle this situation and automatically clean it up. No manually running scripts needed, and not critical to fix the Google Code import logic then.

Related

Tickets: #4506

Discussion

  • Dave Brondsema

    Dave Brondsema - 2015-09-25
    • status: open --> review
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2015-09-25

    db/7994

    To test manually, easiest thing is to create 2 separate threads normally. E.g. take 2 tickets and post some comments on each, including attachments. Then find one thread and change its ref_id to point to the other ticket.

    // find the 2 threads.  e.g.:
    db.thread.find({app_config_id: from_url('/p/test/tickets')._id}
    // update one thread to use the same ticket as the other
    db.thread.update({_id: '31a14b04'}, {$set: {ref_id: 'forgetracker/model/ticket/Ticket#56056ff33a8da300156671d7'}})
    

    Then you've got 2 threads with the same ticket. On master if you visit the ticket page, you'll only see one thread of comments. On db/7994 they'll get merged together for you.

     
  • Heith Seewald

    Heith Seewald - 2015-09-25
    • Reviewer: Heith Seewald
     
  • Heith Seewald

    Heith Seewald - 2015-09-25
    • status: review --> closed
     
  • Heith Seewald

    Heith Seewald - 2015-09-25

    Nice solution, Dave.

     
  • Dave Brondsema

    Dave Brondsema - 2015-10-05
    • labels: sf-current, sf-2 --> sf-2
     
  • Dave Brondsema

    Dave Brondsema - 2015-12-08
    • Milestone: unreleased --> v1.3.2
     

Log in to post a comment.