View Issue Details

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

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.

Relationships

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 

Activities

kgrubbs

kgrubbs

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.

tandler

tandler

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
mclap

mclap

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 @@
    exit;
    }
    }
  • */

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

tandler

2006-03-15 05:52

reporter   ~0012339

This is related to 0006551 (edit + rename filters)

brody

brody

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?

vboctor

vboctor

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.

vboctor

vboctor

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.
brody

brody

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

daryn

daryn

2008-04-25 10:21

reporter   ~0017690

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

dregad

dregad

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.

daryn

daryn

2011-01-26 11:53

reporter   ~0028092

Damien,

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 https://github.com/daryn/mantisbt/tree/save-filter

daryn

daryn

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.

dregad

dregad

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 ?

daryn

daryn

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.

atrol

atrol

2014-01-23 18:08

developer   ~0039155

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

cproensa

cproensa

2016-08-18 18:06

developer   ~0053856

PR: https://github.com/mantisbt/mantisbt/pull/862

Issue History

Date Modified Username Field Change
2004-05-01 08:54 vboctor New Issue
2004-05-01 08:55 vboctor Assigned To => Narcissus
2004-05-01 08:55 vboctor Status new => assigned
2004-05-01 08:55 vboctor Category bugtracker => filters
2004-05-01 08:55 vboctor Product Version => CVS HEAD
2004-10-11 09:15 kgrubbs Note Added: 0007982
2004-10-15 04:23 tandler Note Added: 0008050
2004-11-12 08:00 mclap Note Added: 0008327
2006-03-15 05:52 tandler Note Added: 0012339
2007-08-01 05:29 brody Note Added: 0015315
2007-08-01 10:26 vboctor Product Version CVS HEAD =>
2007-08-01 10:26 vboctor Target Version => 1.1.0
2007-08-08 23:08 vboctor Relationship added related to 0006551
2007-08-08 23:09 vboctor Note Added: 0015375
2007-08-08 23:09 vboctor Assigned To Narcissus =>
2007-08-08 23:09 vboctor Status assigned => acknowledged
2007-09-11 09:33 vboctor Note Added: 0015608
2007-09-11 09:44 brody Note Added: 0015610
2007-09-25 02:20 vboctor Target Version 1.1.0 => 1.2.0
2008-04-25 10:21 daryn Note Added: 0017690
2008-04-25 10:21 daryn Assigned To => daryn
2008-04-25 10:21 daryn Target Version 1.2.0 =>
2008-04-25 11:07 daryn Relationship added has duplicate 0006056
2008-06-05 10:55 daryn Relationship added related to 0009213
2009-01-11 18:23 djcarr Sponsorship Added djcarr: US$ 10
2009-01-11 18:23 djcarr Sponsorship Total 0 => 10
2011-01-26 05:59 dregad Note Added: 0028086
2011-01-26 11:53 daryn Note Added: 0028092
2011-01-26 12:10 daryn Note Added: 0028093
2011-01-26 12:30 dregad Note Added: 0028095
2011-01-26 13:02 daryn Note Added: 0028096
2014-01-23 18:08 atrol Note Added: 0039155
2014-01-23 18:08 atrol Assigned To daryn =>
2016-05-30 11:54 dregad Assigned To => cproensa
2016-05-30 11:54 dregad Status acknowledged => assigned
2016-08-18 18:06 cproensa Note Added: 0053856
2016-11-20 16:01 cproensa Relationship added child of 0021935
2017-01-14 17:50 cproensa Status assigned => resolved
2017-01-14 17:50 cproensa Resolution open => fixed
2017-01-14 17:50 cproensa Fixed in Version => 2.1.0
2017-01-14 17:50 cproensa Target Version => 2.1.0
2017-01-31 04:02 vboctor Status resolved => closed