View Issue Details

IDProjectCategoryView StatusLast Update
0003803mantisbtfilterspublic2017-01-31 04:02
Reportervboctor Assigned Tocproensa  
Status closedResolutionfixed 
Target Version2.1.0Fixed in Version2.1.0 
Summary0003803: Provide a way to update a saved filter

Currently to update a filter the user has to do the following:

  • Use it.
  • Manage Filters
  • Delete it.
  • Update the active filter
  • Save it and use the same name.

There should be an easi way to do this. A possible scenario is:

  • Use it.
  • Update it.
  • Save filter
  • Choose the same name.
  • Confirm overwritting.
TagsNo tags attached.


related to 0006551 closedcproensa Manage custom filters 
has duplicate 0006056 closeddaryn No easy way of editing a saved filter 
related to 0009213 closedcproensa manage filter 
child of 0021935 closedcproensa Filter api refactoring, manage stored filters 




2004-10-11 09:15

reporter   ~0007982

Agreed... was going to submit something like this. Changing a filter is difficult to do because you have to delete it and create it again. No way to edit an existing one right now.



2004-10-15 04:23

reporter   ~0008050

Related issue: Rename filters.

Currently, you have to

  • select filter
  • save filter with new name
  • delete filter with old name


2004-11-12 08:00

reporter   ~0008327

Dirty soultion to update filter is to comment-out check:

--- query_store.php-orig Fri Nov 12 17:00:13 2004
+++ query_store.php Fri Nov 12 17:00:31 2004
@@ -34,6 +34,7 @@

    # Check and make sure they don't already have a
    # query with the same name
  • /*
    $t_query_arr = filter_db_get_available_queries();
    foreach( $t_query_arr as $t_id => $t_name ) {
    if ( $f_query_name == $t_name ) {
    @@ -43,6 +44,7 @@
  • */

    $t_project_id = helper_get_current_project();
    if ( $f_all_projects ) {


2006-03-15 05:52

reporter   ~0012339

This is related to 0006551 (edit + rename filters)



2007-08-01 05:29

reporter   ~0015315

This feature would be very nice - because its an old feature wish, is it planned in one of the next releases?



2007-08-08 23:09

manager   ~0015375

I am assuming that Narcissus is not working on it anymore, hence, unassign to make it available to other developers.



2007-09-11 09:33

manager   ~0015608

I had a look at this issue, here is what I think we need to do:

  1. Only the owner of a filter should be able to update it.

  2. If a filter exists and it was created by the current logged in user, then allow overwriting after confirming the overwrite action.

  3. We can consider adding a time stamp for the creation and last update of the filter.

  4. Add a configuration threshold for users that can delete filters owned by others (default ADMINISTRATOR). This should be used in filter_api.php filter_db_can_delete_filter().

  5. Add a configuration threshold for users to edit filters that are not owned by them (default ADMINISTRATOR).

  6. In filter_db_can_delete_filter(), for non-administrators, it seems that we only allow them to delete their filters which do not have a project_id of -1. Investigate what does -1 mean, if it is "all projects", then it doesn't make sense.



2007-09-11 09:44

reporter   ~0015610

@vboctor: "Investigate what does -1 mean, if it is "all projects", then it doesn't make sense."

If I'm right, a negative number is a project specific filter, "0" a filter, which is available in "all projects". For that result I analysed filters of my private installation - hope someone could commit my result



2008-04-25 10:21

reporter   ~0017690

We have this implemented locally. I'll work on merging it in.



2011-01-26 05:59

developer   ~0028086

Hi Daryn

I take it from the long silence on this issue, that you must be busy with other things ;-)

I on the other hand have a bit of time on my hands, and since this feature has been requested by my users, I would not mind implementing it.

If that's OK for you, please upload what you've got (or send me by mail) and I'll start working on a patch. Or let me know if I should rather use as a basis the code written by mkornatzki in 0009213.



2011-01-26 11:53

reporter   ~0028092


I have a published branch for this at github which I believe is near complete. I simply haven't had time to finish testing and bug fixes. I have merged with latest master and cherry picked a few bug fixes from my custom installation. Hopefully I haven't introduced more bugs but it is certainly possible as this was a very quick merge. This branch covers stored queries as well as modifications for my view and the stored query select menu on the bug filter.

It may need a migration function to get existing stored filters into the new format and probably needs the language files updated as there were a few changes I made to the english file.

Any help is appreciated. Here is the link



2011-01-26 12:10

reporter   ~0028093

Also, I believe the branch actually fixes several other filter bugs. It allows users to specify an access level required for public filters...probably a few other things as well but it's been a while.

Let me know if you have any questions.



2011-01-26 12:30

developer   ~0028095

Thanks for the update Daryn.

I must admit, was kind of hoping to have a fix for this in 1.2.x, but by the looks of the first few commits in your github branch, I think that might be a bit difficult to achieve with this code base... Oh well, users will just have to wait for 1.3 then ;-)

Nevertheless, I'll have a closer look at it. Do you have any other kind of notes, doc, test script, etc. that I can use ?



2011-01-26 13:02

reporter   ~0028096

Since this is a new feature it will not be allowed in 1.2. It could potentially be backported in a branch if someone really needed it. Unfortunately, what I have on github is all i've got for now but you may certainly ask if you have any specific questions. I'm frequently in the #mantishelp channel on irc if you need a quick response.



2014-01-23 18:08

developer   ~0039155

Unassigned after having been assigned for a long time without progress.



2016-08-18 18:06

developer   ~0053856