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 #1

Updated by Go MAEDA over 1 year ago

A patch to fix the issue with another approach is attached to #28033#note-8. Could you take a look?

Actions #2

Updated by Liane Hampe over 1 year ago

Thank you for the link to the patch. I haven't seen it ...

I have run a fresh Redmine instance with this patch and it looks very good to me.

I especially like the idea to display the current project as further option. This feature makes it very flexible when the query should be detached from 'For all projects'.

Would be nice to have this feature in a future Redmine. :)

Let me know when I can help for doing so.

Actions #3

Updated by Mischa The Evil about 1 year ago

  • Is duplicate of Defect #28033: Unable to turn off "For all projects" flag of custom queries added
Actions #4

Updated by Mischa The Evil about 1 year ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Closing as a dupe of #28033.

Actions

Also available in: Atom PDF