Bugzilla – Attachment 123801 Details for
Bug 28454
Add Koha version number to database schema link in reports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28454: Add Koha version number to database schema link in reports
Bug-28454-Add-Koha-version-number-to-database-sche.patch (text/plain), 2.53 KB, created by
Owen Leonard
on 2021-08-11 19:33:03 UTC
(
hide
)
Description:
Bug 28454: Add Koha version number to database schema link in reports
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-08-11 19:33:03 UTC
Size:
2.53 KB
patch
obsolete
>From d2c0902f65fe48d5b19573615fe3d739a8085234 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 26 May 2021 12:02:08 +0000 >Subject: [PATCH] Bug 28454: Add Koha version number to database schema link in > reports > >This patch modifies the guided reports script, adding a verion check so >that a version string can be added to the database schema link if the >user is using a non-development version. > >To test, apply the patch and go to reports -> Saved reports. > >- In the left-hand sidebar menu you should see a "Koha database schema" > link. Depending on which version you're using, it may or may not have > a version string included, e.g. "http://schema.koha-community.org/20_05" > - In master, there is no version string added because there is no > schema available for development versions. > - If you apply the patch on a previously released version, e.g. > 'tags/v20.11.08' you will see a link directly to that schema page. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/includes/guided-reports-view.inc | 2 +- > reports/guided_reports.pl | 6 ++++++ > 2 files changed, 7 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/guided-reports-view.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/guided-reports-view.inc >index 752ecf22c3..14f0aa40eb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/guided-reports-view.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/guided-reports-view.inc >@@ -12,7 +12,7 @@ > <h5>Useful resources</h5> > <ul> > <li><a href="http://wiki.koha-community.org/wiki/SQL_Reports_Library" target="blank">Koha report library</a></li> >-<li><a href="http://schema.koha-community.org/" target="blank">Koha database schema</a></li> >+<li><a href="http://schema.koha-community.org/[% schema_version | uri %]" target="blank">Koha database schema</a></li> > </ul> > </div> > </div> >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 4c926b3c0a..09889ac660 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -92,6 +92,12 @@ elsif ($session and not $input->param('clear_filters')) { > my $op = $input->param('op') || q||; > > my @errors = (); >+ >+my $version_string = Koha::version(); >+my ( $major, $minor, $maintenance, $development ) = split( '\.', $version_string ); >+my $schema_version = ( $development ne '000' ) ? "" : $major . "_" . $minor; >+$template->param( 'schema_version' => $schema_version ); >+ > if ( !$phase ) { > $template->param( 'start' => 1 ); > # show welcome page >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28454
:
121429
|
121491
|
123801
|
123802
|
123917
|
123918
|
124084
|
125073
|
125074
|
125316
|
125317