https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292017-05-18T19:58:19ZRedmineRedmine - Defect #25867: Assignable users should respect database collationhttps://www.redmine.org/issues/25867?journal_id=786842017-05-18T19:58:19ZPavel Rosický
<ul><li><strong>File</strong> <a href="/attachments/18355">issue.rb.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/18355/issue.rb.patch">issue.rb.patch</a> added</li><li><strong>File</strong> <a href="/attachments/18354">issue_test.rb.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/18354/issue_test.rb.patch">issue_test.rb.patch</a> added</li></ul> Redmine - Defect #25867: Assignable users should respect database collationhttps://www.redmine.org/issues/25867?journal_id=863332018-07-26T09:56:14ZPavel Rosický
<ul></ul><p>It's been a year and the problem is still reproducible.</p> Redmine - Defect #25867: Assignable users should respect database collationhttps://www.redmine.org/issues/25867?journal_id=886932018-12-02T03:55:37ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>Candidate for next major release</i></li></ul> Redmine - Defect #25867: Assignable users should respect database collationhttps://www.redmine.org/issues/25867?journal_id=1087102022-12-08T08:51:33ZGo MAEDA
<ul><li><strong>File</strong> <a href="/attachments/29980">25867.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/29980/25867.patch">25867.patch</a> added</li></ul><p>Updated the patch for the current trunk (<a class="changeset" title="Update Stylelint to 14.16.0 (#37987)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/21987">r21987</a>).</p> Redmine - Defect #25867: Assignable users should respect database collationhttps://www.redmine.org/issues/25867?journal_id=1088142022-12-21T07:47:20ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next major release</i> to <i>5.1.0</i></li></ul><p>Setting the target version to 5.1.0.</p> Redmine - Defect #25867: Assignable users should respect database collationhttps://www.redmine.org/issues/25867?journal_id=1088212022-12-21T14:21:53ZHolger Just
<ul></ul><p>In the updated patch, you removed the line <code>return @assignable_users unless @assignable_users.nil?</code> from the original patch in <a class="issue tracker-1 status-1 priority-4 priority-default" title="Defect: Assignable users should respect database collation (New)" href="https://www.redmine.org/issues/25867#note-1">#25867#note-1</a>. Without this line, the caching of the result in <code>@assignable_users</code> becomes useless.</p>
<p>I'm actually unsure if it's worthwhile to introduce caching here at all. <del>I tend to say: we do not need it as the method does not appear to be regularly called multiple times per request. As such, I think, we can get rid of the caching and its associated possibility for inconsistencies.</del> <em>Turns out, it is called multiple times in the <code>issues/_attributes.html.erb</code> partial. Thus, we still might want caching...</em> In any case though, we should either remove the instance variable caching completely, or use it if present.</p>
<p>As a slight improvement, it might also be useful to also remove the <code>to_a</code> at the end and to return a query object. That way, callers might chain other query refinements to it without affecting the current use-case.</p>
<p>Finally, it might also be useful to extract the fetching of the (unsorted) user ids into a separate method, e.g. <code>assignable_user_ids</code>, which might make checks such as those in the Issue model to check if the assignee is allowed less expensive by avoiding the final fetch of the Principal objects. Only these ids might then possible be cached?</p> Redmine - Defect #25867: Assignable users should respect database collationhttps://www.redmine.org/issues/25867?journal_id=1110252023-10-21T01:00:44ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>5.1.0</i> to <i>6.0.0</i></li></ul>