Patch #18770

Make issue history collapsable

Added by Olivier Houdas about 7 years ago. Updated almost 2 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-

Description

Here is a small patch to make the history of an issue collapsable/expandable in the same way as grouped issue lists (using the same already existing javascript).

The patch also adds an independent collapse/Expand button on the Description of the issue.

This was requested by our support team as they use email reception features of Redmine to manage support requests from clients, and sometimes, history can become very long, when there are many mails exchanged.

Feel free to include this code in a future version of Redmine. The patch is based on 2.6.0.
Note that this more or less addresses feature request #15409.

Collapsable-history.patch Magnifier (3.35 KB) Olivier Houdas, 2015-01-07 11:27

18770-current.png - Layout with Redmine 2.6.0 (22.2 KB) Olivier Houdas, 2015-01-07 12:10

18770-new-collapsed.png - Layout with the provided patch (14.6 KB) Olivier Houdas, 2015-01-07 12:13

Collapsable-history-divs.patch Magnifier - Version to use (6.15 KB) Olivier Houdas, 2015-01-07 15:14

Collapsable-divs-History-and-roadmap.patch Magnifier - Collapsable issue history and versions in roadmap - RM 3.1.0 (9.91 KB) Olivier Houdas, 2015-08-11 17:18


Related issues

Related to Redmine - Feature #15409: Is it possible to view History section in pages? New

History

#1 Updated by Olivier Houdas about 7 years ago

Note: Associated code repository revisions are displayed on their own line in the start of the history, with this change, instead of being a div aligned on the right, and at the same level as notes, as before. I had to add the notes into a table to be able to use the existing javascript, which creates this change of layout.

#2 Updated by Olivier Houdas about 7 years ago

After some more testing, I realized I broke the DOM model by interlacing DIV and TR tags.
Here is another patch, completely re-written. It uses the same principle as for issues list with tables, but applied to DIV tags with specific classes.
With this new code, there is no more layout issue for displaying the revision history from the code repository.

#3 Updated by Toshi MARUYAMA almost 7 years ago

  • Related to Feature #15409: Is it possible to view History section in pages? added

#4 Updated by Olivier Houdas over 6 years ago

I have updated my patch to use the same css and js changes to add collapsable versions in the roadmap.
The new patch is built for Redmine 3.1.0.
I checked the generated HTML pages with Tidy and fixed a unclosed DIV in the first version of the patch.

#5 Updated by Aleksandar Pavic almost 2 years ago

Can you update for Redmine 4

also, can you create normal patch, not hg one, because I'm getting:

patch -p0 --dry-run < Collapsable-divs-History-and-roadmap.patch 
can't find file to patch at input line 13

which is how, it's supposed to be done:

[[https://www.redmine.org/projects/redmine/wiki/Patch]]

and if I do:

patch -p1 --dry-run < Collapsable-divs-History-and-roadmap.patch 
checking file app/views/issues/_history.html.erb
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED
checking file app/views/issues/show.html.erb
Hunk #1 FAILED at 75.
1 out of 1 hunk FAILED
checking file app/views/versions/index.html.erb
Hunk #1 FAILED at 9.
Hunk #2 FAILED at 83.
2 out of 2 hunks FAILED
checking file public/javascripts/application.js
Hunk #1 succeeded at 69 (offset 7 lines).
checking file public/stylesheets/application.css
Hunk #1 succeeded at 284 (offset 101 lines).
Hunk #2 FAILED at 233.
1 out of 2 hunks FAILED

It fails on Redmine 4...

Also available in: Atom PDF