mozilla-it / bugzilla-kanbanize

Sync Automation between Kanbanize and Mozilla
0 stars 1 forks source link

Deal with whiteboard changes better when the Kanban block is removed #9

Closed floatingatoll closed 8 years ago

floatingatoll commented 8 years ago

There are three similar scenarios we need to plan for:

If there's an open card linking to the bug, restore the whiteboard status link to the card. Otherwise, file a new card.

This means that someone is trying to remove a bug from Kanban by altering Bugzilla fields. Let's honor that request. In both of these cases, we can detect that the bug had the Kanban link removed after we linked to the bug in the card, and treat that as an opportunity to clean up. In this scenario:

That should drastically simplify the process of de-assigning Kanban from bugs we send off to other queues, and remove all of the complications that we run into today with it recreating cards and all sorts of nonsense.

floatingatoll commented 8 years ago

As a side effect of this change, Kanban will stop filing duplicate cards when the whiteboard status is cleared, since it will find the card that links to the bug and reuse it.

floatingatoll commented 8 years ago

Pull #16 fixes the tendency to file duplicate cards rather than reusing existing cards.

floatingatoll commented 8 years ago

c72ec986e893ba3bb27e7ad7040054adf3741d28 adds the necessary framework for tracking where we learned about a bug, so that we can make the more intelligent decisions listed above.

floatingatoll commented 8 years ago

Pull #17 fixes an issue with source logging for Kanban.

floatingatoll commented 8 years ago

Merged #17, so that we now ignore blank whiteboard when a card references a bug that's been moved out of our watched components, is not cc'd to kanban in the bug, and has had the kanban link removed from the whiteboard.

floatingatoll commented 8 years ago

Merged #21, which implements some of the above logic. We now close cards that reference bugs that left our components and aren't CC'd, because that means we can't track that bug anymore. If the bug returns to our components later, it will link the bug to the closed card. It ought to reopen the closed card, but that's not implemented yet.

[Wed Jun 08 05:28:38 2016] [WARN] Bug 1234 came from an open card, but whiteboard is empty; closing the associated card(s).
[Wed Jun 08 05:28:38 2016] [INFO] [ 198/ 640] Card 3072 - Bug  1234 - [card] kanbanize test bug ** [closed card 3072 for goneaway bug 1234] **

[Wed Jun 08 05:41:19 2016] [WARN] Bug 1234 already has a card 3072, updating whiteboard
[Wed Jun 08 05:41:20 2016] [WARN] [notimplemented] Should be reopening card 3072 and moving back to ready
[Wed Jun 08 05:41:20 2016] [INFO] [ 198/ 640] Card 3072 - Bug  1234 - [search] kanbanize test bug ** [bug updated] **
floatingatoll commented 8 years ago

We use the cc: function extremely rarely, and should use it less so going forward. If work is ours, it's our bug. If it's not, the human being should remove the cc when clearing the whiteboard. Otherwise, kanban will reintroduce itself into the whiteboard (referencing the almost-certainly existing card that's still there).

Therefore, this is technically complete. The reopen functionality is a placeholder that emits the above warning, but this change results in that placeholder function being called - so this is functionally sufficient.