Vote #75894
未完了Make issue history collapsable
0%
説明
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.
journals
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Can you update for Redmine 4
also, can you create normal patch, not hg one, because I'm getting:
<pre>
patch -p0 --dry-run < Collapsable-divs-History-and-roadmap.patch
can't find file to patch at input line 13
</pre>
which is how, it's supposed to be done:
[[https://www.redmine.org/projects/redmine/wiki/Patch]]
and if I do:
<pre>
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
</pre>
It fails on Redmine 4...
--------------------------------------------------------------------------------
related_issues
relates,New,15409,Is it possible to view History section in pages?