Bug 22535 - Use Link Shortcuts when creating reports
Summary: Use Link Shortcuts when creating reports
Status: RESOLVED DUPLICATE of bug 5697
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-18 21:24 UTC by Joy Nelson
Modified: 2022-01-14 16:21 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joy Nelson 2019-03-18 21:24:00 UTC
The syntax to create links in SQL reports is cumbersome.  
The below link, as example, often gets typos and then fails to work when run.

CONCAT('<a href=\"/cgi-bin/koha/cataloguing/addbiblio.pl?' , 'biblionumber=' , biblionumber , '\">' , biblionumber , '</a>'), AS 'biblionumber',

Koha needs a way to allow the user to enter a 'shorthand' or alias in the sql query that is then replaced by the URL.
For example:
SELECT biblionumber|link_detail from biblio 

would resolve to 

SELECT CONCAT('<a href=\"/cgi-bin/koha/cataloguing/addbiblio.pl?' , 'biblionumber=' , biblionumber , '\">' , biblionumber , '</a>'), AS 'biblionumber' from biblio


List of current links documented on the wiki that could use aliases:
https://wiki.koha-community.org/wiki/SQL_Reports_Library#Links
Comment 1 Barton Chittenden 2019-03-26 21:12:07 UTC
More possible links from wiki: https://wiki.koha-community.org/wiki/Permalinks
Comment 2 Nick Clemens (kidclamp) 2022-01-14 16:21:32 UTC

*** This bug has been marked as a duplicate of bug 5697 ***