How to delete saved search

Hi

I recently managed to somehow create a saved search which contained
invalid ticketSQL query. We are using RT 3.6.7.

When the search was loaded, I was directed to advanced tab with message:
“Error near I’m lost”

When I correct the query, I am not able to save it with the same name
as the Query Builder view does not contain the name of my search which
I just loaded (when caming back from advanced tab with “Apply”).
Therefore deleting is also impossible from the web interface as I am immediately
thrown to advanced tab after loading the search.

I don’t know how to reproduce this, it is possible that I changed userid
in other browser tab while building the query.

I didn’t find quickly whether this is know issue or maybe fixed in some version,
so I decided to delete the search from database and update wiki:

Mikko

Mikko,

You can do it by looking at the DataBase. Try some SQL that looks something
like this:

select *
from ATTRIBUTES
where Name = 'SavedSearch’
and ObjectType = ‘RT::Group’;

Then find the one that matches your saved search and the ObjectId will be
the same as the Group ID. Look up the Group name by using that Group Id.
Then you can go into RT, join that group, load/delete that search.

Hope this helps.

Kenn
LBNLOn Sat, Apr 16, 2011 at 5:18 AM, Mikko Lehto mikko.lehto@setera.fi wrote:

Hi

I recently managed to somehow create a saved search which contained
invalid ticketSQL query. We are using RT 3.6.7.

When the search was loaded, I was directed to advanced tab with message:
“Error near I’m lost”

When I correct the query, I am not able to save it with the same name
as the Query Builder view does not contain the name of my search which
I just loaded (when caming back from advanced tab with “Apply”).
Therefore deleting is also impossible from the web interface as I am
immediately
thrown to advanced tab after loading the search.

I don’t know how to reproduce this, it is possible that I changed userid
in other browser tab while building the query.

I didn’t find quickly whether this is know issue or maybe fixed in some
version,
so I decided to delete the search from database and update wiki:

http://requesttracker.wikia.com/wiki/RepairSearches#You_screwed_your_Saved_Search


Mikko

Kenneth Crocker wrote:

You can do it by looking at the DataBase. Try some SQL that looks something
like this:

select *
from ATTRIBUTES
where Name = 'SavedSearch’
and ObjectType = ‘RT::Group’;

Then find the one that matches your saved search and the ObjectId will be
the same as the Group ID. Look up the Group name by using that Group Id.
Then you can go into RT, join that group, load/delete that search.

Hi

Thanks for your attention, sorry I guess I was not clear enough in my mail.

I already solved my problem with similar query and added instructions to wiki:

Mikko