https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292012-06-01T13:46:47ZRedmineRedmine - Defect #11073: UserCustomField order_statement returns wrong outputhttps://www.redmine.org/issues/11073?journal_id=386222012-06-01T13:46:47ZDevadatta Sahoo
<ul><li><strong>Assignee</strong> set to <i>Jean-Philippe Lang</i></li></ul> Redmine - Defect #11073: UserCustomField order_statement returns wrong outputhttps://www.redmine.org/issues/11073?journal_id=386242012-06-01T13:51:33ZEtienne Massip
<ul><li><strong>Assignee</strong> deleted (<del><i>Jean-Philippe Lang</i></del>)</li><li><strong>Priority</strong> changed from <i>High</i> to <i>Normal</i></li></ul> Redmine - Defect #11073: UserCustomField order_statement returns wrong outputhttps://www.redmine.org/issues/11073?journal_id=386352012-06-01T18:06:50ZDevadatta Sahoo
<ul><li><strong>File</strong> <a href="/attachments/7676">custom_field.rb.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/7676/custom_field.rb.patch">custom_field.rb.patch</a> added</li></ul><p>A suggested patch has been attached:</p>
<p>File to be patched:</p>
<p><code>app/models/custom_field.rb</code></p> Redmine - Defect #11073: UserCustomField order_statement returns wrong outputhttps://www.redmine.org/issues/11073?journal_id=391032012-06-18T08:55:08ZEtienne Massip
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Confirmed</i></li><li><strong>Target version</strong> set to <i>Candidate for next minor release</i></li></ul><p>Rails stores the base class type (<code>Principal</code>) instead of the actual class type (<code>User</code>).</p>
<p>These RoR issues might be relevant:</p>
<p><a class="external" href="https://rails.lighthouseapp.com/projects/8994/tickets/5617">https://rails.lighthouseapp.com/projects/8994/tickets/5617</a><br /><a class="external" href="https://github.com/rails/rails/issues/724">https://github.com/rails/rails/issues/724</a> (continuation of lh 5617)<br /><a class="external" href="https://github.com/rails/rails/issues/617">https://github.com/rails/rails/issues/617</a></p> Redmine - Defect #11073: UserCustomField order_statement returns wrong outputhttps://www.redmine.org/issues/11073?journal_id=391042012-06-18T09:05:18ZEtienne Massip
<ul></ul><p>Maybe you can try to replace <code>self.class.customized_class.name</code> with <code>self.class.customized_class.base_class.name</code>?</p> Redmine - Defect #11073: UserCustomField order_statement returns wrong outputhttps://www.redmine.org/issues/11073?journal_id=392452012-06-23T15:48:11ZEtienne Massip
<ul><li><strong>Status</strong> changed from <i>Confirmed</i> to <i>Resolved</i></li><li><strong>Assignee</strong> set to <i>Etienne Massip</i></li><li><strong>Target version</strong> changed from <i>Candidate for next minor release</i> to <i>2.1.0</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Should be fixed with <a class="changeset" title="Use base class name as customized type to fix @UserCustomField#order_statement@." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/9880">r9880</a>, thanks for the report.</p>
<p>I don't know if it's useful to write a test since this statement is not used in Redmine code to query User model nor where I should write it?</p> Redmine - Defect #11073: UserCustomField order_statement returns wrong outputhttps://www.redmine.org/issues/11073?journal_id=399762012-07-26T16:57:25ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul>