Defect #8603
openQuery 'without subprojects' cannot be created
Description
I wanted a global, public query that sets 'subproject' to 'none'.
Does work in a project, but cannot be saved.
Reason seems to be, that the query option is only available if subprojects exist.
The code that deletes it when saving it should be removed in my eyes.
Files
Related issues
Updated by Etienne Massip over 15 years ago
- Target version set to Candidate for next minor release
Confirmed, there is a strange behavior here :
If you add the subproject filter then save the query with "all projects" checked, the filter won't be saved.
If you add the subproject filter then save the query leaving "all projects" unchecked, the filter will be saved; then you can modify the filter and check "all projects" and the subproject filter will be kept but won't appear anymore in the query modification page.
(at least if you stay on a parent project list)
Updated by Joshua Stein over 14 years ago
this issue may be related to Issue #8853.
Updated by Marius BĂLTEANU over 8 years ago
- Has duplicate Defect #29072: Missing subproject filter in custom query added
Updated by Florian Walchshofer 5 days ago
- File subproject_filter_for_all_projects.patch subproject_filter_for_all_projects.patch added
- File subproject_filter_for_all_projects.png subproject_filter_for_all_projects.png added
I could reproduce this on the current trunk: the "Subproject" filter is only available for queries of a project with subprojects.
When a query is saved "For all projects", its project is set to nil before the filters are added, so the filter is dropped.
The attached patch makes the filter available for queries for all projects too.
It applies when the query is used in a project with subprojects, and is ignored otherwise, like in projects without subprojects.
The filter is also kept when the query is edited later (see #note-1). The same applies to time entry queries.