Closed floatingatoll closed 8 years ago
This may be a variation on a theme of archived card issues fixed in #6 and #7.
Wrote 3e8eaba to enhance debugging output. It looks like we're trying to rewrite the card. Probably because the bug is newer?
[Thu Jul 21 01:08:46 2016] [DEBUG] Updating card 2345 summary to << 68790123 - four five six >>
$VAR1 = bless( {
'_protocol' => 'HTTP/1.1',
'_content' => '{"Error":"Cannot edit archived tasks."}',
update_card_summary
is called once by sync_card
, which is called once by sync_bug
.
So, we enter sync_bug
with the new bug 6789012 and end up trusting its card link, rather than doubting it (and rewriting it to a new card). Verified with an additional (commented out by default) debug log in 9a2f0ef.
[Thu Jul 21 01:24:29 2016] [DEBUG] Syncing card 2345 extlink << https://bugzilla.mozilla.org/show_bug.cgi?id=6789012 >> with bug 3456789 whiteboard << [kanban:https://webops.kanbanize.com/ctrl_board/1/2345] >>
Looking over the logic in the script, we only detect when multiple cards reference a bug, and then fix that. This case occurs when no cards reference a bug, and then the bug references a card, and that card references another bug.
Fixed by 960794f.
Merging error identified while deploying the updated code. ebd848a repairs a logic error that wasn't included in the original pull request.
When a cloned bug is opened using an older whiteboard status referencing an archived card, the script fails to detect both that the card referenced is associated with another bug, and that the card referenced is archived, producing the following abbreviated result: