Possible to edit / update saved filters / stored queries?
Posted: 17 Oct 2008, 14:42
Is it possible to edit or update existing filters/queries in Mantis?
Example:
I create a filter called "Top Issues" that filters for all issues in the "assigned" status and sorts by priority desc, severity desc.
This filter gets saved as source_query_id=38.
Then I decide I would like to change the filter.
I would like to rename it to "Top Unresolved Issues" and filter for all issues that are assigned or lower status and sort by priority desc then severity desc.
I can think of a couple ways this might be accomplished.
Method 1
There is a way in Mantis to edit/update existing filters. If so, I have not found it and apologize if it's available but I looked hard to find one.
Method 2
Delete original filter and create a new one to take it's place.
This is OK if all you care about is how the filter is used within Mantis via the filter dropdown box. But what if you gave out the URL for the original filter to others for bookmark or RSS purposes. If I use the "delete then re-create" method, existing bookmarks and RSS feeds will be broken and need to be updated. This is a hassle I would like to avoid.
Method 3
Directly modify the database table that filters are stored in. This is a hassle and a bad practice too so is not a viable solution.
Method 4
There is a way that, when creating filters, you can specify the query ID for them to be stored under. This would allow Method 1 to work without the hassle of having to update bookmarks and RSS feeds. If this is not a current option, perhaps it should be considered as a feature request. Perhaps the first X filter IDs/slots could be reserved for this purpose and could only be used by specifying that ID when the filter is created (permission controlled by a threshold). All other saved filters would use the next available ID.
Other methods? Any thoughts?
Thanks in advance.
Example:
I create a filter called "Top Issues" that filters for all issues in the "assigned" status and sorts by priority desc, severity desc.
This filter gets saved as source_query_id=38.
Then I decide I would like to change the filter.
I would like to rename it to "Top Unresolved Issues" and filter for all issues that are assigned or lower status and sort by priority desc then severity desc.
I can think of a couple ways this might be accomplished.
Method 1
There is a way in Mantis to edit/update existing filters. If so, I have not found it and apologize if it's available but I looked hard to find one.
Method 2
Delete original filter and create a new one to take it's place.
This is OK if all you care about is how the filter is used within Mantis via the filter dropdown box. But what if you gave out the URL for the original filter to others for bookmark or RSS purposes. If I use the "delete then re-create" method, existing bookmarks and RSS feeds will be broken and need to be updated. This is a hassle I would like to avoid.
Method 3
Directly modify the database table that filters are stored in. This is a hassle and a bad practice too so is not a viable solution.
Method 4
There is a way that, when creating filters, you can specify the query ID for them to be stored under. This would allow Method 1 to work without the hassle of having to update bookmarks and RSS feeds. If this is not a current option, perhaps it should be considered as a feature request. Perhaps the first X filter IDs/slots could be reserved for this purpose and could only be used by specifying that ID when the filter is created (permission controlled by a threshold). All other saved filters would use the next available ID.
Other methods? Any thoughts?
Thanks in advance.