Details
-
Bug
-
Resolution: Fixed
-
Low
-
2.8.1
-
Seen on 2.8.1, but I checked the changelogs and didn't see any relevant fixes/changes upto 2.9.4
Description
When viewing a pull request overview (ie. http://server:7990/projects/TAG/repos/REPO/pull-requests/152/overview ), if a line has been commented on, and you expand the context around that line, the new context shows only the unchanged code.
I'm not sure if this is a bug or by design, but I was expecting the expanded code to show any the changed lines in the pull request, and got briefly confused as to why the code now looked obviously wrong as I was seeing original unmodified code + only one of the hunks of changes.
I'm not sure I made a great job of explaining that, but say I have a function:
if (foo) { bar(); } ... othercode... ... othercode... ... othercode... ... othercode... if (foo) { bar(); }
and the pull request changes 'bar' to 'flibble', and I comment on the first change, in the overview page I see:
if (foo) { - bar(); + flibble(); } ... othercode... ... othercode... ... othercode...
then when I expand the context I see:
if (foo) { - bar(); + flibble(); } ... othercode... ... othercode... ... othercode... ... othercode... if (foo) { bar(); }
(with the - / + lines coloured appropriately)
and thought "why hasn't that call to bar() been changed, that looks wrong!" - as I expected to see:
if (foo) { - bar(); + flibble(); } ... othercode... ... othercode... ... othercode... ... othercode... if (foo) { - bar(); + flibble(); }
Attachments
Issue Links
- has a derivative of
-
BSERV-7063 Link to diff from comment in pull request overview should go to line
- Closed
- is duplicated by
-
BSERV-7188 Overview/Activity for a PR shows incorrect surrounding context code when clicking to show more around a diff hunk that's near another hunk
- Closed