Defect #28033

Unable to turn off "For all projects" flag of custom queries

Added by Go MAEDA almost 4 years ago. Updated 7 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution: Affected version:

Description

The "For all projects" flag of custom queries cannot be disabled if once enabled.

Steps to reproduce:
  1. Create a query with "For all projects" flag enabled.
  2. Edit the newly created query.
  3. Uncheck "For all projects" checkbox and save the query.
  4. Edit the query again.
  5. "For all projects" checkbox is expected to be cleared, but it is actually checked.

before.png (82.1 KB) Yuichi HARADA, 2022-01-14 03:17

after.png (86.1 KB) Yuichi HARADA, 2022-01-14 03:17

28033.patch Magnifier (16.3 KB) Yuichi HARADA, 2022-01-14 03:19


Related issues

Duplicated by Redmine - Defect #32930: Unable to uncheck "All projects" in saved issue filter query Closed

History

#1 Updated by Go MAEDA almost 4 years ago

It is because queries with "For all projects" enabled don't have the information of its belonging project.

The attribute IssueQuery.project indicates the query's belonging project, but the value is nil for queries "for all projects" (nil means that the queriy is "For all projects"). Therefore, Redmine cannot determine the value to be set for the "project_id" attribute when "For all projects" is disabled, and project_id will remain nil even after saving the query. As a result, the "For all projects" never be turned off.

#2 Updated by Robert Röttger about 2 years ago

+1

#3 Updated by Aleksandar Pavic almost 2 years ago

+1 please see #32930 I've proposed a possible solution.

#4 Updated by Go MAEDA almost 2 years ago

Aleksandar Pavic wrote:

+1 please see #32930 I've proposed a possible solution.

The following is the suggested solution in #32930#note-1:

One possible solution would be to show project select box, when All projects is unchecked.

#5 Updated by Go MAEDA almost 2 years ago

  • Duplicated by Defect #32930: Unable to uncheck "All projects" in saved issue filter query added

#6 Updated by Yuichi HARADA 7 days ago

You become able to switch "For all projects" and the current project on the custom query edit form. I have attached a patch.

Current trunk(r21364)

After applying the patch

Also available in: Atom PDF