Redmine: Issueshttps://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292019-01-31T14:15:52ZRedmine
Redmine Redmine - Defect #30728 (New): Issues Note id changes when changing order in account preferenceshttps://www.redmine.org/issues/307282019-01-31T14:15:52ZMarvin Wener
<p>In "my account" I can choose to reverse the order in which the notes are projected.<br />When I link to a note using <strong>#<ticket_id>-1</strong> (linking the first note) then change the<br />order, my link still points to Note-1 rather then note-X.</p>
<p>Since different users may use different account settings, confusion can arise when wrong notes<br />are linked.</p>
<p>I did a dirty fix in _history.html.erb for now:</p>
<pre>
<% reply_links = issue.notes_addable? -%>
<% for journal in journals %>
<% if User.current.wants_comments_in_reverse_order? %>
<% fix_index = journals.count - journal.indice %>
<% else %>
<% fix_index = journal.indice %>
<% end %>
<div id="change-<%= journal.id %>" class="<%= journal.css_classes %>">
<div id="note-<%= fix_index %>">
<h4><a href="#note-<%= fix_index %>" class="journal-link">#<%= fix_index %></a>
<%= avatar(journal.user, :size => "24") %>
<%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %>
<%= render_private_notes_indicator(journal) %></h4>
<% if journal.details.any? %>
<ul class="details">
<% details_to_strings(journal.visible_details).each do |string| %>
<li><%= string %></li>
<% end %>
</ul>
<% if Setting.thumbnails_enabled? && (thumbnail_attachments = journal_thumbnail_attachments(journal)).any? %>
<div class="thumbnails">
<% thumbnail_attachments.each do |attachment| %>
<div><%= thumbnail_tag(attachment) %></div>
<% end %>
</div>
<% end %>
<% end %>
<%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
</div>
</div>
<%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>
<% end %>
<% heads_for_wiki_formatter if User.current.allowed_to?(:edit_issue_notes, issue.project) || User.current.allowed_to?(:edit_own_issue_notes, issue.project) %>
</pre>