An authorized user should be able to remove 'For all projects' in a saved issue query
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).
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.
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.
Updated by Liane Hampe 5 months 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.