28 Aug 2021 21:57:24 UTC
- Distribution: RT-Extension-ShareSearchLink
- Module version: 0.02
- Source (raw)
- Browse (raw)
- How to Contribute
- Clone repository
- KwaliteeBus factor: 1
- % Coverage
- License: gpl_2
- Perl: v5.10.1
- Activity24 month
- Download (36.79KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionAJWOOD Andrew Woodand 1 contributors
- Andrew Wood
- RT VERSION
- LICENSE AND COPYRIGHT
- Internal package RT::ShareSearchLink::SharedSearchLink
- Internal package RT::ShareSearchLink::SharedSearchLinks
RT::Extension::ShareSearchLink - Shorter links for ticket searches
This extension adds a "Share" item to the menu on the search results page, and a "Share a link" button to the bottom of the results.
Both of these will show a pop-up box containing a short link to the current search, with all the search terms and formatting stored in a database entry in RT.
This is useful when your search URL is very long.
Known to work with RT 4.2.16, 4.4.4, and 5.0.1.
May need root permissions.
- Set up the database
make installfor the first time, you will need to create the database tables for this extension. Use
etc/schema-mysql.sqlfor MySQL or MariaDB, or
- Edit your /opt/rt4/etc/RT_SiteConfig.pm
Add this line:
- Clear your mason cache
rm -rf /opt/rt4/var/mason_data/obj
- Restart your web server
- Set up database pruning
Add a cron job similar to the ones you will already have for other RT maintenance jobs like
rt-email-dashboardsto clear down expired shared search links, like this:
4 4 * * * root /opt/rt4/bin/rt-crontool --search RT::Extension::ShareSearchLink --action RT::Extension::ShareSearchLink
This way, shared search links will expire 90 days after they have last been viewed, and will expire within 7 days of creation if they aren't viewed at least twice in that time.
This software is Copyright (c) 2021 by Andrew Wood
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991
This package provides the shared search link object.
Creates a new shared search link for a search with the given parameters, and returns ($id, $message). If a UUID is not supplied, a new one is generated.
Load a shared search link by numeric ID or by string UUID, returning the numeric ID or undef.
Delete this shared search link from the database.
Return a hash of the parameters stored in this shared search link.
Increment the view counter for this shared search link, and set its last viewed date.
Private method which defines the columns in the database table.
This package provides the group class for shared search links.
Module Install Instructions
To install RT::Extension::ShareSearchLink, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install RT::Extension::ShareSearchLink
For more information on module installation, please visit the detailed CPAN module installation guide.