https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292016-08-17T02:51:36ZRedmineRedmine - Defect #23596: Filter on issue ID with between/lesser/greater operator does not workhttps://www.redmine.org/issues/23596?journal_id=726962016-08-17T02:51:36Zdee cay
<ul></ul><p>This should work.</p>
<p>app/models/issue_query.rb<br /><pre><code class="ruby syntaxhl"> <span class="k">def</span> <span class="nf">sql_for_issue_id_field</span><span class="p">(</span><span class="n">field</span><span class="p">,</span> <span class="n">operator</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
<span class="n">ids</span> <span class="o">=</span> <span class="n">value</span><span class="p">.</span><span class="nf">first</span><span class="p">.</span><span class="nf">to_s</span><span class="p">.</span><span class="nf">scan</span><span class="p">(</span><span class="sr">/\d+/</span><span class="p">).</span><span class="nf">map</span><span class="p">(</span><span class="o">&</span><span class="ss">:to_i</span><span class="p">).</span><span class="nf">join</span><span class="p">(</span><span class="s2">","</span><span class="p">)</span>
<span class="k">if</span> <span class="n">ids</span><span class="p">.</span><span class="nf">present?</span>
<span class="k">if</span> <span class="n">operator</span> <span class="o">==</span> <span class="s2">"="</span>
<span class="s2">"</span><span class="si">#{</span><span class="no">Issue</span><span class="p">.</span><span class="nf">table_name</span><span class="si">}</span><span class="s2">.id IN (</span><span class="si">#{</span><span class="n">ids</span><span class="si">}</span><span class="s2">)"</span>
<span class="k">else</span>
<span class="n">sql_for_field</span><span class="p">(</span><span class="s2">"id"</span><span class="p">,</span> <span class="n">operator</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="no">Issue</span><span class="p">.</span><span class="nf">table_name</span><span class="p">,</span> <span class="s2">"id"</span><span class="p">)</span>
<span class="k">end</span>
<span class="k">else</span>
<span class="s2">"1=0"</span>
<span class="k">end</span>
<span class="k">end</span>
</code></pre></p> Redmine - Defect #23596: Filter on issue ID with between/lesser/greater operator does not workhttps://www.redmine.org/issues/23596?journal_id=730462016-08-28T13:01:27ZGo MAEDA
<ul><li><strong>File</strong> <a href="/attachments/16611">defect-23596.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/16611/defect-23596.diff">defect-23596.diff</a> added</li><li><strong>Status</strong> changed from <i>New</i> to <i>Confirmed</i></li><li><strong>Priority</strong> changed from <i>High</i> to <i>Normal</i></li><li><strong>Target version</strong> set to <i>3.3.1</i></li></ul><p>I confirmed the problem and dee cay's fix (<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Filter on issue ID with between/lesser/greater operator does not work (Closed)" href="https://www.redmine.org/issues/23596#note-1">#23596#note-1</a>) works fine.<br />This is a patch made from dee cay's post: <a class="attachment" href="https://www.redmine.org/attachments/16611">defect-23596.diff</a></p>
<p>Setting target version to 3.3.1.</p> Redmine - Defect #23596: Filter on issue ID with between/lesser/greater operator does not workhttps://www.redmine.org/issues/23596?journal_id=730612016-08-29T04:59:36ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/4806">Feature #4806</a>: Filter the issue list by issue ids</i> added</li></ul> Redmine - Defect #23596: Filter on issue ID with between/lesser/greater operator does not workhttps://www.redmine.org/issues/23596?journal_id=730992016-08-30T19:28:32ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Subject</strong> changed from <i>Filter on issue ID does not work correctly</i> to <i>Filter on issue ID with between/lesser/greater operator does not work</i></li><li><strong>Status</strong> changed from <i>Confirmed</i> to <i>Resolved</i></li><li><strong>Assignee</strong> set to <i>Jean-Philippe Lang</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Slightly different fix applied in <a class="changeset" title="Filter on issue ID with between/lesser/greater operator does not work (#23596)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/15751">r15751</a>, thanks for pointing this out.</p> Redmine - Defect #23596: Filter on issue ID with between/lesser/greater operator does not workhttps://www.redmine.org/issues/23596?journal_id=731352016-08-31T16:55:57ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul>