Project

General

Profile

Actions

Defect #28033

open

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

Added by Go MAEDA almost 7 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Issues
Start date:
Due date:
% Done:

0%

Estimated time:
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.

Files

before.png (82.1 KB) before.png Yuichi HARADA, 2022-01-14 03:17
after.png (86.1 KB) after.png Yuichi HARADA, 2022-01-14 03:17
28033.patch (16.3 KB) 28033.patch Yuichi HARADA, 2022-01-14 03:19
28033-v2.patch (16.5 KB) 28033-v2.patch Go MAEDA, 2023-04-09 06:17

Related issues

Has duplicate Redmine - Defect #32930: Unable to uncheck "All projects" in saved issue filter queryClosed

Actions
Has duplicate Redmine - Defect #38410: An authorized user should be able to remove 'For all projects' in a saved issue queryClosed

Actions
Actions #1

Updated by Go MAEDA almost 7 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.

Actions #2

Updated by Robert Röttger almost 5 years ago

+1

Actions #3

Updated by Aleksandar Pavic almost 5 years ago

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

Actions #4

Updated by Go MAEDA almost 5 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.

Actions #5

Updated by Go MAEDA almost 5 years ago

  • Has duplicate Defect #32930: Unable to uncheck "All projects" in saved issue filter query added
Actions #6

Updated by Yuichi HARADA almost 3 years 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

Actions #7

Updated by Go MAEDA over 2 years ago

  • Target version set to Candidate for next major release
Actions #8

Updated by Go MAEDA over 1 year ago

Updated the patch for the current trunk (r22174).

Actions #9

Updated by Mischa The Evil about 1 year ago

  • Has duplicate Defect #38410: An authorized user should be able to remove 'For all projects' in a saved issue query added
Actions

Also available in: Atom PDF