Defect #28636

Cannot find an issue from a closed subproject when search scope is Project and its subprojects

Added by Rene Sperling over 1 year ago. Updated 11 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Search engine
Target version:3.4.7
Resolution:Fixed Affected version:3.3.8

Description

Hi,

I have a main project with several closed subprojets. I want to find an issue from one of these closed projects.
Using the search function with 'project with subprojects' Redmine does not list it.
When using 'all projects' or reopening the concerning project Redmine shows the issue.

If this is not a bug, it would be nice to have an option to switch that behavior off.

0001-Include-closed-projects-in-search-for-scope-subproje.patch Magnifier (2.49 KB) Marius BALTEANU, 2018-12-06 07:44

Associated revisions

Revision 17692
Added by Go MAEDA 11 months ago

Include closed projects in search for scope subprojects (#28636).

Patch by Marius BALTEANU.

Revision 17693
Added by Go MAEDA 11 months ago

Merged r17692 from trunk to 3.4-stable (#28636).

History

#1 Updated by zhangzhi liao about 1 year ago

+1

#2 Updated by Marius BALTEANU 11 months ago

  • Category changed from Issues list to Search engine
  • Status changed from New to Confirmed

Confirmed the problem.

Scope 'subprojects' is the only scope that searches only in the active projects. Scopes 'all' and 'my projects' include also closed projects. I think we should be consistent with the behaviour between the search scopes. At the same time, maybe it is a good idea to have an option in the search page to include only active projects in the search (how we have for the issues).

#3 Updated by Go MAEDA 11 months ago

I agree with Marius' opinion. Jean-Philippe wrote in #6049#note-9 as follows. It is obvious that closed subprojects should be searchable.

I'm closing this request since 2.1.0 adds the ability to close projects. Closed projects are still visible/searchable but read-only.

#4 Updated by Marius BALTEANU 11 months ago

  • Assignee set to Marius BALTEANU

#5 Updated by Marius BALTEANU 11 months ago

Attached the patch. I think we can include this fix in 3.4.7 or 3.3.9.

All tests pass: https://gitlab.com/marius-balteanu/redmine/pipelines/39107412

#6 Updated by Marius BALTEANU 11 months ago

  • Subject changed from Cannot find an issue from a closed subproject to Cannot find an issue from a closed subproject when search scope is Project and its subprojects

#7 Updated by Go MAEDA 11 months ago

  • Target version changed from Candidate for next minor release to 3.3.9
  • Affected version changed from 3.4.5 to 3.3.8

LGTM. Setting the target version to 3.3.9.

#8 Updated by Go MAEDA 11 months ago

  • Status changed from Confirmed to Closed
  • Assignee changed from Marius BALTEANU to Go MAEDA
  • Target version changed from 3.3.9 to 3.4.7
  • Resolution set to Fixed

Committed the patch. Thank you for catching and fixing this issue.

I didn't commit the fix to 3.3-stable branch because a test failed.

$ ruby test/functional/search_controller_test.rb
Run options: --seed 17373

# Running:

...............................F.

Finished in 7.689243s, 4.2917 runs/s, 14.1756 assertions/s.

  1) Failure:
SearchControllerTest#test_search_should_include_closed_projects [test/functional/search_controller_test.rb:302]:
Expected at least 1 element matching "#search-results", found 0..
Expected 0 to be >= 1.

33 runs, 109 assertions, 1 failures, 0 errors, 0 skips

Also available in: Atom PDF