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):
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
History shown out-of-order
History shown in correct order
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'
This bug has been fixed with rh-bugzilla-4.4.5024-1.el6. Changing to verified.
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.
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.