C4::Koha::IsAuthorisedValueCategory contains only 2 useful calls, from
C4::Reports::Guided and reports/guided_reports.pl
It can be replaced with
Koha::AuthorisedValues->search({ category => $authorised_value})->count
Test plan:
1/ Create a sql report using an authorised value category, something
like:
SELECT COUNT(*) FROM items where itemlost=<<lost|LOST>>
2/ Execute the report and confirm that everything works fine.
3/ Create a sql report using a nonexistent authorised value categor,
something like:
SELECT COUNT(*) FROM items where itemlost=<<lost|NONEXIST>>
4/ When saving the report, you should get a warning message
"lost: The authorized value category (NONEXIST) you selected does not exist."
5/ Save anyway and execute the report, you should get the same warning
message.
QA:
git grep IsAuthorisedValueCategory
should not return any results
prove t/db_dependent/ReportsGuided.t
should return green
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
To test, apply the patch and test deletion in the following cases. Test
both confirmation and cancel actions.
Circulation -> Check out
-> An item that is checked out by someone else
-> An item that is on hold to someone else
-> To a patron that has more than noisuescharge in fines (Allow
AllowFineOverride syspref)
-> To a patron that has reached the max amount of checkouts (Allow
AllowTooManyOverride syspref)
-> To a patron that has more than noissuescharge in fines (Allow
AllowFineOverride syspref and set noissuescharge syspref)
-> Renew -> An item that is on hold to someone else
-> To a patron that is at max renewals (Allow AllowRenewalLimitOverride syspref)
-> An item that is not checked out by anyone
-> Check in -> An item that is in transit to another branch
And look for other confirmation dialogs and check if I've missed any
Sponsored-by: Catalyst IT
EDIT: Made changes from Comment 2
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Bug 14189 added some global JavaScript to a new include file which is
included in doc-head-close.inc. Since it's included globally, there is
no reason not to move it to staff-global.js. This patch does so.
To test, apply the patch and clear your browser cache if necessary.
- Navigate to any page in the staff client which has multiple header
search tabs.
- Type something in one of the tabs.
- Switch tabs. Verify that your text was copied to the newly-displayed
form field.
Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Recurring update for the about page, Koha team.
Test plan:
Check accuracy of changes with former about page (3.22 release team) and
Roles for 3.24 page on the wiki.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Right now, fines are updated based on the fine description. There are a
number of areas where this can go wrong ( date or time format changing,
title being modified, etc ). Now that issues has a unique
identifier, we should use that for selection and updating of fines.
Test Plan:
1) Apply this patch
2) Test creating and updating fines via fines.pl
and checking in overdue items. No changes should be noted.
3) prove t/db_dependent/Circulation.t
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This patch changes about.pl to get version information from
C4::Context where applicable and fixes missing display of
the Apache version e.g. for Apache/2.2.22
To test:
- Without patch, open about page in staff client
- Remember contents of tab 'Server information'
(e.g. make a screenshot)
- Apply patch
- Verify, that the About page displays the same information
as before rsp. additionally displays Apache version if
it was missing without patch.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
When deleting a MARC framework subfield, the confirmation message is not
styled. This patch modifies the template to style the confirmation
message like similar ones.
Depends on Bug 15785 - Use Font Awesome icons in confirmation dialogs
To test, apply the patch and go to Administration -> MARC framworks.
- Click 'MARC structure' for a framework you can edit.
- Click 'subfields' for a tag you can edit.
- Click 'Delete' for a subfield you can delete. You should see a
confirmation dialog styled like other "alert" type dialogs.
- Test both canceling and confirming deletion to confirm that both
function correctly.
Revised to fix conflicts with rollback of Bug 13618
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as expected. Revised according with bug revert 13618
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
The JavaScript embedded in the MARC modification templates template is
not dependent on template processing to such an extent that it can't
be safely moved to a separate file. This patch does so, adding
definition of a some translatable strings to the template.
Other minor changes: A couple of JSHint warnings corrected, a couple of
missing semicolons added to template markup.
To test, apply the patch and go to Tools -> MARC modification templates
- Confirm that The add/update form works normally with various actions
(Add/update,Delete,Move, etc.).
- Confirm that template switching works correctly.
- Confirm that template deletion confirmation works correctly.
- Confirm that cancelling an edit works correctly
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Should be "Delete current subfield."
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
When deleting a contract in Acquisitions -> Vendor -> Contracts, the
deletion confirmation message is not styled with the standard "dialog
alert" <div>. This patch modifies the confirmation markup to match the
standard.
To test, apply the patch and go to Acquisitions -> [ a vendor] ->
Contracts
- Try deleting a contract. The confirmation box should have the standard
"dialog alert" class.
- Test the 'confirm' and 'cancel' actions and make sure both complete
correctly.
Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
The batch checkout template has some markup and JavaScript problems
which need to be resolved, including:
- Mismatched <h3></h1>
- JavaScript includes which are not used
- Incorrect DataTables configuration
- Incorrect class on warning dialogs
- Incorrect terminology: Use "checkout" instead of "issue"
This patch also changes the markup and styling of batch checkout errors,
using Font Awesome icons to retain highlighting of warnings and errors
while (I hope) improving readability.
To test, apply the patch and go to batch checkout for a patron for whom
batch checkouts are enabled.
- Check out a batch of barcodes. Include items which will trigger errors
or warnings. For example: Invalid barcodes, lost items, items which
are already checked out, items which are on hold for another patron,
items which are damaged.
- When the table of items is displayed so that you can confirm the
checkout, make sure the table is sortable.
- Think about whether the style changes on warnings and errors are an
improvement.
- Try to initiate a batch checkout to a patron who is restricted. You
should see an "alert" style dialog instead of a "message" style one.
- Validate the HTML and confirm that there are no errors raised by this
template's markup.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This patch will add the missing help file to the item
search fields admin page.
To test:
* Go to administration > Item search fields
* Click Help
* Confirm help is there and correct.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
The "Column visibility" text button was not translatable, now it is.
Test plan:
1/ Update the template for a given language and translate the "Column
visibility" string
2/ Go on admin/currency.pl
=> The string should be translated.
Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This patch converts the "new frequency" link to a Bootstrap-style
toolbar button in order to maintain consistency. Also included in this
patch are some other minor markup corrections:
- A colon and space after labels
- A 'Cancel' link instead of a button.
- "Required" classes for a required field.
To test, apply the patch and go to Serials -> Manage frequencies.
- Test the "New frequency" button
- Confirm that the changes to the entry form look correct.
Followed test plan, displays as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This patch converts the "new numbering pattern" link to a
Bootstrap-styled toolbar button for consistency with other pages in
Koha. This patch also includes minor markup corrections:
- Standardizing on the phrase "Numbering patterns" by eliminating the
occasional use of "number patterns."
- Removing mistaking closing slash on <select>
- Using standard "Cancel" link instead of a button.
- Adding a colon and space after labels.
- Fixing of "no existing patterns" message.
To test, apply the patch and go to Serials -> Numbering patterns
- Confirm that the "New numbering pattern" button looks correct and
works correctly.
- Confirm that the entry form looks correct and that the cancel link
works as expected.
Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
When accessing the modification logs from a link that does not
explicitly set the to and from dates (e.g., from patron or bib details),
no results are displayed unless the object had an action occur during
the current day.
This is a side-effect of commit 5dceb851 for bug 13813.
Test plan:
- View the modification logs of a record which has already been modified
(/tools/viewlog.pl?do_it=1&modules=CATALOGUING&action=MODIFY&object=XXX)
=> Without this patch, you won't see any logs (unless you have modified
the record today)
=> With this patch, the behavior is the same as prior bug 13813 (you can
check in 3.20.x), you will see all logs
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
When importing patrons with a csv file which does not contain the privacy_guarantor_checkouts column in the header, you will get
DBIx::Class::Storage::DBI::_dbh_execute(): Column 'privacy_guarantor_checkouts' cannot be null at /home/koha/src/C4/Members.pm line 768
The same issue seems to occur for sms_provider_id.
Test Plan:
1) Attempt to import patron csv file with no privacy_guarantor_checkouts column
2) Note the error
3) Apply this patch
4) Repeat step 1
5) The error should no longer occur
NOTE: While this patch does work, should it be solved only
at this level? The issue that there is the lack of those two
fields on the tools screen still exists.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Commit 243b797dd1
Bug 15285: Update common files
Set 'B' to the default dom of Datatable constructor.
This cannot work if there is no button defined.
This patch defined an empty 'buttons' param for this constructor, DT
does not raised an error anymore when initialising.
Test plan:
Confirm that the tables on the following tables are not broken:
- circ/waitingreserves.pl
- circ/reserveratios.pl
- patron_lists/lists.pl
- virtualshelves/shelves.pl
- acqui/invoices.pl
And with datatables:
- circ/circulation.pl
- admin/currency.pl
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
When exporting records (tools/export.pl or misc/export_records.pl), a
file of ids (authid or biblionumber) can be passed to filter the
results.
Bug 14722 has broken this behavior.
Test plan:
Export records and specify a list of records to filter the results.
Prior to this patch, the record with the id 1 was exported.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Add optional embedding of YouTube videos via HTML5Media.
New syspref: HTML5MediaYouTube: Embed/Don't embed videos.
Format WEBM is hardcoded as it is the only format accepted by all
modern browsers.
Test plan:
- apply patch
- catalogue a YouTube link in 856$u
- turn on HTML5MediaEnabled and HTML5MediaYouTube
- open the record in OPAC and staff client, check that the
'Play media' tab is showing and playing the video works.
Possible enhancements for followups:
- check available formats, offer quality choice
- accept official YT URL shortener
Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Works perfectly!
Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
It has been decided that Moose should not be a dependency for Koha, and
that this patch set should be reverted to avoid it's use.
This reverts commit 43bcc1c42c.
This reverts commit e5f4a0e3d5.
This reverts commit 6d44b0a91a.
Revert "Bug 15471 [QA Followup] - Fix error causing visibility button to not display"
This reverts commit 8e997fbafc.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch adds test cases for the new syspref NoRenewalBeforePrecision.
Tests if GetSoonestRenewDate returns correct values for both 'date' and
'exact_time' settings.
Also adds a few comments related to bugs 7413 and 14101.
To test:
1) prove t/db_dependent/Circulation.t
Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
This patch updates the calculation of 'No renewal before' to include the
new syspref NoRenewalBeforePrecision.
To test:
1) Check out an hour-based loan with 'No renewal before' set to 1.
Switch syspref NoRenewalBeforePrecision between 'date' and 'exact
time'. Confirm that with both settings the item cannot be renewed
until exactly one hour before due.
2) Check out a day-based loan with 'No renewal before' set to 1 day.
Confirm that:
* with NoRenewalBeforePrecision set to 'date', renewal is possible
at 12:00 AM on the day before due.
* with NoRenewalBeforePrecision set to 'exact time', renewal is
possible at 11:59 PM on the day before due.
Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Currently the 'NoRenwalBefore' setting is always based on the exact
DateTime of the due date. This patch introduces a new global syspref for
choosing if 'NoRenewalBefore' should instead be calculated based on date
only. This is only relevant for loans caluclated in days. Hourly loans
are not affected.
To test:
1) Apply bug 14101, then apply this patch.
2) Run installer/data/mysql/updatedatabase.pl
3) Confirm that a new syspref NoRenewalBeforePrecision is available
in administration. It should let you choose between 'date' (default)
and 'exact time'.
Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Added new systempreference OpacMaintenanceNotice.
When OpacMaintenance is ON the HTML contents of OpacMaintenanceNotice will
be displayed.
Enabling OpacMaintenance is all that is required to enable this preference.
If OpacMaintenanceNotice is undefined, the default (original) notice will
appear when OpacMaintenance is enabled.
To test:
- Enable OpacMaintenance systempreference
- Observe the default maintenance message when OPAC is viewed
- Edit OpacMaintenanceNotice systempreference, adding custom HTML
- Observe the custom HTML appear on the opac
- Remove OpacMaintenanceNotice (mindful of orphaned spaces etc.)
- Observe the default opac notice appears in the opac
- Disable OpacMaintenance
- Observce opac is back online
Moving code to atomic update and fixing merge conflict
NOTE: Accounted for an SQL typo and autoescaping of the template.
If someone else could test this, then I would be fine with
marking it signed off.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch changes the Google jackets URL to use HTTPS instead of HTTP.
Test Plan:
1) Enable Google Jackets
2) Ensure the Koha OPAC instance is configued to use HTTPS
3) Confirm Google jackets display correctly.
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch switches from UNLESS MARC21 to IF UNIMARC - this way changes
apply to MARC21 and NORMARC and UNIMARC remains unaffected
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
To test:
1 - Go to Administration->Keyword to MARC mapping
2 - Add a mapping (or ensure it exists)
Field name: subtitle
MARC field: 245
MARC subfield: b
3 - View a record with a subtitle in the opac
4 - Note in MARC 21 you have "Title of record:, subtitle of record"
5 - Apply patch
6 - View the record again and note the comma is no longer present.
Note: this patch removes the comma only for MARC21 where subtitle is not
repeatable. UNIMARC seems to be repeatable and does not include
punctuation so I believe this may be needed there.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described. Comma removed from title of the window and breadcrumb
section
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch updates the sql installer files for new installations.
Occurrences to the three plugins marc21_field_003, 040c and 040d are
replaced by marc21_orgcode.pl.
This has been generated by one sed statement.
Test plan:
[1] Run a new installation or run some of the changed sql files manually.
[2] Verify that marc21_orgcode is linked to fields previously linked to
the three old plugins.
[3] Do a git grep on the three plugin file names. No occurrences expected.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Have tested the three english sql files:
authorities_normal_marc21.sql: 18 rows with marc21_orgcode (003 and 040a
for 9 auth codes)
marc21_framework_DEFAULT.sql: 1 row with marc21_orgcode (003) -- this patch
does not add them to 040c or 040d; no behavior change..
marc21_simple_bib_frameworks.sql: 8 rows (003 for 8 frameworks)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
The following files do no longer need an adjustment:
installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql
installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql
installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql
For details, check Bug 15097: Update MARC21 de-DE frameworks to Update 21.
And similar reports for es-ES and it-IT.
Verified this change by installing de-DE in the webinstaller. The plugin for
field 003 was correctly set to marc21_orgcode.pl.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch adds the dbrev in atomicupdate, updating the marc structure
for existing installations. (New installation in previous patch.)
And it removes the obsolete plugin files.
Test plan:
Run upgrade. Verify that new plugin is linked (for bib and auth).
Check plugin in editor.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Plugin tested, added to 040a/c/d
Test pass
No koha-qa errors
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch copies code from marc21_field_003.pl to create marc21_orgcode.pl
for more generic use. Other fields like 040c or 040d should use it too.
Note: The plugin is used for authorities too (003, 040a).
One behaviour change is added: If the corresponding field is already
filled, it will not be overwritten.
In the unit test marc21_orgcode already replaces marc21_field_003.
Test plan:
[1] Attach plugin marc21_orgcode to a field (e.g. 003) and test it in
the MARC editor of Cataloguing or Authorities.
[2] Check if a value is not overwritten any more.
[3] Run unit test t/db_dependent/FrameworkPlugin.t; don't be distracted by
the noisy warnings of marc21_field_007.pl. They will be addressed on
another report.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>