Bug 1121483 - Inline history can be shown out-of-order when two changes occur in the same second
Summary: Inline history can be shown out-of-order when two changes occur in the same s...
Alias: None
Product: Bugzilla
Classification: Community
Component: Creating/Changing Bugs
Version: 4.4
Hardware: Unspecified
OS: Unspecified
low vote
Target Milestone: 4.4
Assignee: Matt Tyson 🤬
QA Contact: tools-bugs
Depends On:
Blocks: 1161975
TreeView+ depends on / blocked
Reported: 2014-07-21 05:28 UTC by Jason McDonald
Modified: 2018-12-09 06:29 UTC (History)
6 users (show)

Fixed In Version: 4.4.5024
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1161975 (view as bug list)
Last Closed: 2014-08-27 00:28:25 UTC

Attachments (Terms of Use)

Description Jason McDonald 2014-07-21 05:28:45 UTC
Description of problem:
When two changes occur within the same second on a bug, the inline history in show_bug.cgi can, rather confusingly, show the changes in the wrong order.

For an example, see Bug 1103001 and look closely at the history of the Doc Type field in July 2014.

The latter part of the history shows the following changes:

    qgong 2014-07-01 11:53:44 EST
    Doc Type: Rebase: Bug Fixes Only → Bug Fix

    Red Hat Bugzilla 2014-07-10 10:05:39 EST
    Doc Type: Release Note → Bug Fix

    Matt Tyson 2014-07-10 10:05:39 EST
    Doc Type: Bug Fix → Release Note

....while the current state of the Doc Type field is "Bug Fix" (not "Release Note" as suggested by the history.

The problem is that the last two entries are actually in the wrong order -- the second change was made automatically by Bugzilla as a consequence of the third item (hence the identical timestamps).

The history is shown in the correct sequence in https://bugzilla.redhat.com/show_activity.cgi?id=1103001

Version-Release number of selected component (if applicable):

How reproducible:
Unknown, but always for the bug history in the bug referred to above.

Steps to Reproduce:
1. Open bug 1103001 and examine it's history

Actual results:
History shown out-of-order

Expected results:
History shown in correct order

Additional info:

Comment 2 Matt Tyson 🤬 2014-08-04 05:55:06 UTC
What appears to be happening is that the InlineHistory extension is creating the inline history item for the user change (EG Matt Tyson changed 'Doc Type' from 'Bugfix' to 'Release Note')

This inline history item is attached to the comment for that user change.

Once that is done, it will then go and create the history item for Bugzilla changed 'Doc Type' from 'Release Note' to 'Bugfix'.

It will then insert this item into the DOM /before/ the comment made by Matt Tyson.

This appears to be happening because of the timestamp comparison is simply 'inlineHistoryTime' > 'commentTime' when I think it should be 'inlineHistoryTime' >= 'commentTime'

Comment 4 Shirley Zhou 2014-08-08 08:39:51 UTC
This bug has been fixed with rh-bugzilla-4.4.5024-1.el6. Changing to verified.

Comment 5 Simon Green 2014-08-27 00:28:25 UTC
This change is now live. If there are any issues, do not reopen this bug.
Instead, you should create a new bug and reference this bug.

Comment 6 Jason McDonald 2014-11-09 22:36:59 UTC
Unfortunately, we will be reverting this fix in Bugzilla 4.4.6027, as it introduced the regression reported in Bug 1136120.  It appears that fixing this bug correctly will require some refactoring of upstream's InlineHistory plugin.

Note You need to log in before you can comment on or make changes to this bug.