Short URL for saved searches

Hi,

is there any chances for short url linking to saved searches?
I just created excel web based query but the URLs created by Search Builder are too long (over 500 characters). The maximum is 200.
I have got work around:

Hi,

is there any chances for short url linking to saved searches?
I just created excel web based query but the URLs created by Search Builder
are too long (over 500 characters). The maximum is 200.
I have got work around:

is there any chances for short url linking to saved searches?

Short links have come up a few times, and wouldn’t actually be too bad
to implement, but we could never come up with a strong enough use-case
to account for the time needed to implement.

-kevin

My use case is that I want to pass a direct link to the result of a saved search to my colleagues. A memorable url would help with clear communication.

I understand that it may be hard to give top priority. Would a patch be welcome? Any suggestion on a good approach if I or someone else where to give it a try?

By the way, dumb question perhaps, but is there a way to find and execute a saved search that isn’t included in a dashboard?

I might be missing something here, but does this really need to be part of RT? You could self-host a URL shortener such as shlink, pop long RT URLs through that and then save/share the shortened forms. Shlink even has a REST API so you could automate things if you wanted to.

By the way, dumb question perhaps, but is there a way to find and execute a saved search that isn’t included in a dashboard?

You can find saved searches from the query builder page as well

In the absolute sense there is little that really must to be part of RT. :slight_smile: I work with humans who are more inclined to enjoy using tools that doesn’t solely provide the bare minimum.

Of course any patch accepted adds to the maintenance burden of RT. So in that sense there is really is a balance to be made. If that’s the argument you’re making? If that is the general status of RT it would be useful to know.

Don’t forget that the ‘results of a saved search’ depend on the permissions of the person doing the search. You’re not so much sending them the resuilts as sending them the search to do themselves.
Having said that I agree it would be nice to send someone a URL that’s not 300+ characters long.
It shouldn’t be hard to write a plugin with a session-like table. You’d want to specify a maximum lifetime for an entry (per link?) and have something that periodically purges old entries so it doesn’t grow without limits.
Alternately being able to specify something like https://rt.myplace.com/SavedSearch?id=XXXXX would work.

There are lots of things that aren’t core to RT that relies on external tools: full function web servers, MTAs, LDAP servers, SSO, etc. This is because different people need them to do different things, there’s a range of excellent open source tools already out there and there’s no point reinventing the wheel. What I’m saying is URL shortening is probably in that category, especially as this thread dates from 2013 so I’m guessing lots of sites haven’t found the need for it as a core RT function. I might be wrong of course and there’s a latent demand that we’ll see now.

Personal history says that patches are always welcome. Not always used immediately, but welcome.

You can also make a saved search a widget on your home page. Most of my home page is saved searches mostly for things like “active set” and “least recently replied to”.

I wonder if a “share search link” extension might be of interest? This would add a menu item to the “Feeds” or the “Tools” menu at the top of search results, and maybe a button at the button of the search results as well, marked “Share a link”.

Clicking on the menu option or button would generate a universally unique identifier, such as “6f524d1b-8799-4f4b-926c-506aa51e9fa6”, save the search to the database under this UUID, and produce a pop-up showing the URL (such as “https://your.com/rt4/Search/Shared.html?uuid=6f524d1b-8799-4f4b-926c-506aa51e9fa6”).

This pop-up would look a bit like the one you get in SharePoint or OneDrive when creating a link to share a document.

The link’s lifetime could be configurable within the pop-up, or just left simple, such that for example a link that’s clicked on less than twice is deleted after 1 month, and anything else is retained forever (or thrown away if it’s been unused for a year or something like that).

This sounds fairly straightforward to code as an RT extension. Would anyone find it useful if I wrote something like this?

1 Like

This is something I’d use!

Here is the first draft of RT::Extension::ShareSearchLink: https://cpan.metacpan.org/authors/id/A/AJ/AJWOOD/RT-Extension-ShareSearchLink-0.01.tar.gz

I’ve tried it on RT 4.2.16 and 5.0.1, with a MariaDB back-end.

1 Like

Good things take time. :wink:

Minor version bump - 0.02 includes PostgreSQL support; 0.01 only worked with MySQL / MariaDB. Just a change to the installation instructions and a new schema file.

Seems to work OK on RT 4.2.16, 4.4.4, and 5.0.1.