Defect #25077

Issue description filter's 'none' operator does not match issues with blank descriptions

Added by Mischa The Evil 6 months ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues filter
Target version:3.4.0
Resolution:Fixed Affected version:

Description

Use of the issue description filter with the 'none' operator always returns nothing as it does not include issues with blank descriptions. I think most users expect that issues with blank descriptions are going to be matched when using the filter with the 'none' operator, as such the actual results may be unexpected.

Currently, the 'none' operator only matches issues that are assigned to trackers that have the description field disabled (which is not yet possible with the core, see #25052).

set_blank_decriptions_to_nil.patch Magnifier (2.06 KB) Marius BALTEANU, 2017-02-18 20:17

rm_25077_fix_query_filter_after_none_for_text_and_string_column.patch Magnifier (1.84 KB) Marius BALTEANU, 2017-03-06 08:35


Related issues

Related to Redmine - Feature #1159: Allow issue description to be searchable as a filter Closed 2008-05-01

Associated revisions

Revision 16378
Added by Jean-Philippe Lang 6 months ago

Issue description filter's 'none' operator does not match issues with blank descriptions (#25077).

Patch by Marius BALTEANU.

History

#1 Updated by Mischa The Evil 6 months ago

  • Related to Feature #1159: Allow issue description to be searchable as a filter added

#2 Updated by Marius BALTEANU 6 months ago

From my point of view, there are 2 ways to fix this issue:

1. Set description to nil for all new issues with blank description and migrate all existing issues that have description blank to nil.
2. Change the query for description field in order to check for description is nil or description equals with empty string;

I made a patch that implements the first solution because I think in this way we fix the root cause. The second solution is just an workaround.

If there is any side effect of my solution, I can make a patch with the second fix.

#3 Updated by Marius BALTEANU 6 months ago

Mischa The Evil, do you have any feedback regarding the patch? I'm thinking now that if setting the description blank instead of null is a rails behaviour, we should not change this and I should create a patch with the second solution.

#4 Updated by Marius BALTEANU 6 months ago

Jean-Philippe Lang, how do you think we should solve this issue? With the solution from my patch or we should modify the query?

#5 Updated by Jean-Philippe Lang 6 months ago

Marius BALTEANU wrote:

Jean-Philippe Lang, how do you think we should solve this issue? With the solution from my patch or we should modify the query?

We should be able to modify the query for text/string filters without much trouble.

#6 Updated by Marius BALTEANU 6 months ago

Thanks for your feedback, Jean-Philippe Lang. I've attached a new patch that fixes the issue for text (like description) and string fields. For custom fields, the issue was already fixed.

#7 Updated by Go MAEDA 6 months ago

  • Target version set to 3.4.0

#8 Updated by Jean-Philippe Lang 6 months ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Thanks Marius, the patch is committed.

#9 Updated by Pavel Rosický about 1 month ago

it should also be fixed on '*' operator like on custom values, don't you think?

#10 Updated by Marius BALTEANU about 1 month ago

Pavel Rosický wrote:

it should also be fixed on '*' operator like on custom values, don't you think?

Can you open a new issue, please?

Also available in: Atom PDF