From 13bcba4206e4a5a8b3557fa021f7f1ec5949b526 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 12 Sep 2016 15:46:23 -0400 Subject: [PATCH] Fix timeline's delete-then-tag display bug Currently, if a tag is deleted and then assigned later, it shows up as a move, rather than a delete+create. This is due to the threshold check being backwards. Fixes #1824 --- static/js/directives/ui/repo-tag-history.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/directives/ui/repo-tag-history.js b/static/js/directives/ui/repo-tag-history.js index 0fbffab5b..8a15e2fb5 100644 --- a/static/js/directives/ui/repo-tag-history.js +++ b/static/js/directives/ui/repo-tag-history.js @@ -75,7 +75,8 @@ angular.module('quay').directive('repoTagHistory', function () { // then the action was a move, rather than a delete and a create. var currentEntries = tagEntries[tagName]; var futureEntry = currentEntries.length > 0 ? currentEntries[currentEntries.length - 1] : {}; - if (tag.end_ts - futureEntry.start_ts <= MOVE_THRESHOLD) { + + if (futureEntry.start_ts - tag.end_ts <= MOVE_THRESHOLD) { removeEntry(futureEntry); addEntry(futureEntry.reversion ? 'revert': 'move', tag.end_ts, futureEntry.docker_image_id, dockerImageId);