Project

General

Profile

Actions

Defect #38410

closed

An authorized user should be able to remove 'For all projects' in a saved issue query

Added by Liane Hampe over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate
Affected version:

Description

Problem

A saved issue query created with an active checkbox `For all projects` cannot be updated by disabling that checkbox again.

This affects all currently supported Redmine versions (4.2, 5.0).

Reason

When creating a new issue query, the user has the option (i) to display the query at hand in all projects or (ii) just display the query in the project the user is in when saving the query.

Selecting case (i) leads to not saving the current project id into the `:queries` table.
Selecting case (ii) leads to saving the current project id into the `:queries` table.

When an authorized user tries to update a query created under case (ii) she can enable the checkbox `For all projects` and ends up in case (i).

When an authorized user tries to update a query created/updated under case (ii) she can disable the checkbox `For all projects` but since there is no mechanism which adds the project id again nothing will change. That is, saving the changes and clicking on edit again will reveal that the checkbox `For all projects` is still enabled.

Solution

The project id needs always to be saved if any.*) A further `:queries` table column named `is_for_all` is required.

Whenever `is_for_all` is enabled (value: 1) it takes precedence over `project_id`. When `is_for_all` is disabled (value: 0) the `project_id` will be used instead.

*) This implies that an issue query which will be created outside of any project must be for all projects. Whereas an issue query which will be created inside of a project could be both, locally or globally accessible.


Related issues

Is duplicate of Redmine - Defect #28033: Unable to turn off "For all projects" flag of custom queriesNew

Actions
Actions

Also available in: Atom PDF