koha.git
5 years agoBug 8995: (QA follow-up) Mock required sysprefs in the tests
Tomas Cohen Arazi [Tue, 30 Apr 2019 14:37:47 +0000 (11:37 -0300)]
Bug 8995: (QA follow-up) Mock required sysprefs in the tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22424: (follow-up) Show blank value for empty status
Owen Leonard [Mon, 29 Apr 2019 15:10:17 +0000 (15:10 +0000)]
Bug 22424: (follow-up) Show blank value for empty status

This patch updates the screen and CSV output of item searches so that if
the item does not have a lost status a blank table cell is shown instead
of "0."

This patch also amends the table headers so that "Not for loan" statuses
are explicitly labeled as such, and the "Lost" column has the header
"Lost status."

To test, apply the patch and perform an item search in the staff client
which will return results with notforloan and lost items. Verify that
the values display correctly in both onscreen and CSV output. Verify
that the column headers look correct.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22424: Add search by all lost statuses to item search
Owen Leonard [Wed, 27 Feb 2019 15:31:29 +0000 (15:31 +0000)]
Bug 22424: Add search by all lost statuses to item search

This patch changes the item search form so that searching by lost status
includes options for all lost authorised values instead of just "yes" or
"no."

To test you should have multiple authorized values for LOST.

 - Apply the patch and open the item search form.
 - Test searches which limit by lost status. Confirm that results are
   correctly limited.
 - Confirm that lost statuses are correctly displayed in the search
   results.
 - Confirm that in the search results table, the column header for
   "Lost" includes a dropdown menu for filtering by all available
   authorized values for lost.
 - Test the CSV export function and confirm that lost status is
   correctly exported.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22408: Compiled CSS
Nick Clemens [Tue, 30 Apr 2019 13:04:24 +0000 (13:04 +0000)]
Bug 22408: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22408: Subscription entry form cleanup
Owen Leonard [Mon, 25 Feb 2019 16:28:10 +0000 (16:28 +0000)]
Bug 22408: Subscription entry form cleanup

This patch makes a number of changes to the subscription entry form:

  - Make the default layout single-column.
  - Switch the layout to two-column only when testing prediction
    pattern.
    - Add a button to hide the prediction pattern test pane.
  - Change the style of some buttons and links. Add Font Awesome icons
    to some.
  - Clean up some issues with capitalization and spacing.
  - Make it clearer when form fields are read-only: Move "locked" form
    field style from addbiblio.css to staff-global.css and improve it
    with regard to mouse interactions

To test, apply the patch and regenerate the staff client CSS. Clear your
browser cache if necessary.

 - Go to Serials -> New subscription.
 - Readonly fields under "Vendor" and "Record" should show a small
   padlock icon.
 - Test the process of adding a subscription, paying special attention
   to the advanced pattern controls: Showing, hiding, modifying,
   canceling.
 - Test the process of editing a subscription in the same way.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21364: (QA follow-up) Fix QA script complaints (tabs and filters)
Katrin Fischer [Sat, 27 Apr 2019 13:42:17 +0000 (13:42 +0000)]
Bug 21364: (QA follow-up) Fix QA script complaints (tabs and filters)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21364: (follow-up) Check for standing status and uncertain prices
Nick Clemens [Mon, 22 Apr 2019 20:00:37 +0000 (20:00 +0000)]
Bug 21364: (follow-up) Check for standing status and uncertain prices

Fetch 'uncertainprices' when getting basket info. A side effect is that styling on baskets with uncertain prices is restored by this bug. They will appear in red

To test:
1 - Add an order with an uncertainprice to the basket
2 - Return to vendor baskets view
3 - Note the actions now include "Uncertain prices"
4 - Click that, resolve the uncertain prcie
5 - Return to vendor basket view
6 - Note you can now close the basket, but don't
7 - Edit the basket, mark it as standing
8 - Return to vendor basket view
9 - Note you cannot close the basket

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21364: Allow closing basket from vendor view/search
Nick Clemens [Sun, 16 Sep 2018 03:05:59 +0000 (03:05 +0000)]
Bug 21364: Allow closing basket from vendor view/search

To test:
1 - Have a vendor
2 - Add some empty baskets
3 - Add some non-empty baskets
4 - Search for vendor and note you now
    a - Can only 'View' empty or closed baskets
    b - Have a dropup menu to 'Add to ' or 'Close' open baskets
5 - Confirm things look correct and buttons work
6 - Confirm that basket name is now a link to view basket

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22010: Check preferences for ebook integration
Nick Clemens [Mon, 17 Dec 2018 13:35:09 +0000 (13:35 +0000)]
Bug 22010: Check preferences for ebook integration

To test:
1 - Enable OverDrive and RecordedBooks (you can put anything in the
        prefs)
2 - Search on the opac - verify you get results (or search error) on
first page of results'
3 - Go to second page of results - OD and RB are not searched
4 - Apply patch
5 - Verify nothing has changed

If you have valid credentials:
1 - Enable RB prefs
2 - Sign in with an account that has an email matching your registered
account for recordedbooks
3 - Confirm you RB account loads on opac-user.pl

Otherwise:
Read the patches, verify it all makes sense

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22357: Do not duplicate report rows if several reports exist
Jonathan Druart [Mon, 29 Apr 2019 01:40:21 +0000 (21:40 -0400)]
Bug 22357: Do not duplicate report rows if several reports exist

At the moment every time you run runreport.pl with the --store-results
option another line will appear for your report in the saved
reports table. This is not a data, but a display problem as the
report is still only stored once.

1) Create a report and note the report number
2) Run from command line (replace X by report number) :
    misc/cronjobs/runreport.pl X --format=csv --csv-header --store-results
3) Go to saved reports table
4) Look at the table, each run of the cronjob will create a new row
   in the table instead of just updating the saved results column.
5) Apply patch
6) Veriy the table displays correctly again and there are no regressions

QA: Run t/db_dependent/Reports/Guided.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22717: (bug 20287 follow-up) Fix Google OpenId auto registration
Jonathan Druart [Sat, 27 Apr 2019 00:49:14 +0000 (20:49 -0400)]
Bug 22717: (bug 20287 follow-up) Fix Google OpenId auto registration

Silly bug caused by:
  commit ef410fd62f279a10687636a4f26babb2c91ecadc
  Bug 20287: Replace occurrences of AddMember with Koha::Patron->new->store->borrowernumber

Constructors take a hashref!

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 8995: Compiled CSS
Nick Clemens [Mon, 29 Apr 2019 16:16:59 +0000 (12:16 -0400)]
Bug 8995: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 8000: DBRev 18.12.00.067
Nick Clemens [Mon, 29 Apr 2019 16:12:15 +0000 (16:12 +0000)]
Bug 8000: DBRev 18.12.00.067

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 8995: DBRev 18.12.00.066
Nick Clemens [Mon, 29 Apr 2019 16:09:00 +0000 (16:09 +0000)]
Bug 8995: DBRev 18.12.00.066

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 8995: (QA follow-up) Convert db update to perl
Martin Renvoize [Thu, 25 Apr 2019 09:39:14 +0000 (10:39 +0100)]
Bug 8995: (QA follow-up) Convert db update to perl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 8995: (follow-up) Add tests, move open_url/coins routines to Koha namespace
Josef Moravec [Mon, 11 Mar 2019 21:27:52 +0000 (21:27 +0000)]
Bug 8995: (follow-up) Add tests, move open_url/coins routines to Koha namespace

Test plan:
1) Ensure the COinS span tag is still included on this pages. You need
to look into html source and search for span tag with class 'Z3988',
   which has COinS string in title.
   Staff client:
       catalogue -> ISBDdetail
       catalogue -> MARCdetail
       catalogue -> detail
       virtualshelves -> shelves
    OPAC (you should have COinSinOPACResults system preference enabled):
        opac detail
        opac search
        opac shelves
2) Run tests:
prove t/Biblio.t t/db_dependent/Biblio.t t/db_dependent/Koha/Biblio.t

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tested with all 9 current patches. Works as advertised, including
OPACURLOpenInNewWindow. If a record has no items, no OpenURL link
is displayed. All the suggested tests pass. I did not test with
XSLT turned off.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 8995: Add IGNORE to the INSERT statement
Jonathan Druart [Wed, 28 Sep 2016 12:18:12 +0000 (13:18 +0100)]
Bug 8995: Add IGNORE to the INSERT statement

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 8995: Show OpenURL links in OPAC search results
Julian Maurice [Wed, 6 Nov 2013 15:04:42 +0000 (16:04 +0100)]
Bug 8995: Show OpenURL links in OPAC search results

This patch use GetCOinS sub to provide an OpenURL link in OPAC search
results. It uses 4 new system preferences:
  - OpenURLinOPACResults: enable or disable this feature
  - OpenURLResolverURL: url of the openURL resolver
  - OpenURLText: text of the link
  - OpenURLImageLocation: image of the link

Link is displayed as an image if OpenURLImageLocation is defined, and as
text otherwise.
It works both with and without XSLT enabled.

Changes made to GetCOinSBiblio:

For 'journal':
- Title should be in rft.jtitle instead of rft.title
- rft.date, rft.aulast, rft.aufirst, rft.au, rft.pub and rft.pages have
  no meaning for a subscription, so they are simply removed from URL

This patch refactors GetCOinSBiblio, so the construction of URL is done
only at the end. This way we do not have ugly
  $var .= "&amp;$value"
in the function body.

Also use URI::Escape instead of custom regexps.

This development consider the value of syspref OPACURLOpenInNewWindow
when building the link.

Test plan:
1/ Enable syspref OPACShowOpenURL and put your OpenURL resolver URL in
OpenURLResolverURL syspref (if you don't have one, just fill it with
some fake URL, you'll have to check if OpenURL links are correct)
2/ If you want, set the other sysprefs OpenURLImageLocation and
OpenURLText
3/ Fill syspref OPACOpenURLItemTypes with some (not all) of your
item types.
4/ Empty sysprefs OPACXSLTDetailsDisplay and OPACXSLTResultsDisplay
5/ Go to OPAC and launch a search.
6/ Check you have in the results (near the title) the OpenURL link (only
for itemtypes that are in OPACOpenURLItemTypes).
Toggle OPACURLOpenInNewWindow syspref and check that the behaviour of
the link is correct.
7/ Go to the detail page of one of those and check you have the OpenURL
link too. (Above tags)
Toggle OPACURLOpenInNewWindow syspref and check that the behaviour of
the link is correct.
8/ Set sysprefs OPACXSLTDetailsDisplay and OPACXSLTResultsDisplay to
"default" and repeat steps 5 to 7

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 8000: (QA follow-up) Two lastminute fixes
Marcel de Rooy [Fri, 26 Apr 2019 09:05:01 +0000 (09:05 +0000)]
Bug 8000: (QA follow-up) Two lastminute fixes

[1] Number of tests Letters.t
[2] Resolving uninitialized warn on Letters, L1327

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 8000: (QA follow-up) Add email validation to system preferences
Maryse Simard [Tue, 5 Feb 2019 23:26:42 +0000 (18:26 -0500)]
Bug 8000: (QA follow-up) Add email validation to system preferences

This patch uses the JQuery validator plugin to add validation to preferences of class email in the system preferences page. A field containing an invalid value (even if not modified) should prevent saving.

To test, confirm that when entering an invalid email address in the SendAllEmailsTo field, an error message appears and saving is prevented.
Correcting the value should hide the message and let you save as normal.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 8000: (QA follow-up) Update the to_address in the message queue
Maryse Simard [Tue, 5 Feb 2019 23:24:23 +0000 (18:24 -0500)]
Bug 8000: (QA follow-up) Update the to_address in the message queue

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 8000: (QA follow-up) Fix accidently edited sysprefs.sql file
Josef Moravec [Mon, 29 Oct 2018 21:35:00 +0000 (21:35 +0000)]
Bug 8000: (QA follow-up) Fix accidently edited sysprefs.sql file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 8000: (QA follow-up) Centralise Bcc too
Martin Renvoize [Mon, 29 Oct 2018 12:58:51 +0000 (12:58 +0000)]
Bug 8000: (QA follow-up) Centralise Bcc too

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 8000: Redirect all emails to SendAllEmailsTo
David Bourgault [Fri, 15 Sep 2017 19:06:13 +0000 (15:06 -0400)]
Bug 8000: Redirect all emails to SendAllEmailsTo

Rebased and squashed after changes to master.
Only difference from previous patches are small adjustements to conflicts in t/db_dependent/Letters.t

Test plan:

1) Apply path
2) Run updatedatabase.pl
3) Clear all SendAllEmailsTo system preference
4) Send mail to a patron of your choosing, email will go to patron's
   email address as usual.
5) Set SendAllEmailsTo to a test email address
6) Send mail to the patron, email will be redirected to the email set
   in the systempreference.
7) Run prove -v t/db_dependent/Letters.t

It does not affect messages in the message_queue.

This patch obsoletes previous patches, because it achieves the same
functionality in a much more centralized way. (4 lines of code!)

Signed-off-by: Ed Veal <eveal@mckinneytexas.org>
Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20421: (follow-up) Fix styling
Josef Moravec [Mon, 15 Apr 2019 10:05:28 +0000 (10:05 +0000)]
Bug 20421: (follow-up) Fix styling

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20421: Inform staff that patron does have the title checked out during placing...
Josef Moravec [Tue, 13 Mar 2018 14:57:49 +0000 (14:57 +0000)]
Bug 20421: Inform staff that patron does have the title checked out during placing hold

Test plan:
1) Enable the CheckPrevCheckout and DisplayMultiPlaceHold system preferences
2) Have a patron with some checkouts history
3) Try to place hold on one of titles from history for this patron
4) You should see an information at the top of confirm request page, but
you still should be able to place a hold
5) Try this with multiple titles - one or more of them should be from
history
6) You should see this information in "Information" column
7) There is also new column placed at the beggining with checkbox, you
could uncheck it for titles you do not want to place a hold on it
8) Confirm the hold is placed only on checked titles

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21502: (QA follow-up) Rephrase warning slightly
Katrin Fischer [Wed, 24 Apr 2019 21:56:30 +0000 (23:56 +0200)]
Bug 21502: (QA follow-up) Rephrase warning slightly

Test plan:
Follow first test plan, look at warning, decide if you like it :)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21502: Add ItemsDeniedRenewal system preference to check syntax
Josef Moravec [Tue, 23 Apr 2019 12:25:52 +0000 (12:25 +0000)]
Bug 21502: Add ItemsDeniedRenewal system preference to check syntax

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21502: Add UpdateItemLocationOnCheckin preference to YAML format check
Josef Moravec [Fri, 5 Oct 2018 13:48:07 +0000 (13:48 +0000)]
Bug 21502: Add UpdateItemLocationOnCheckin preference to YAML format check

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21502: Add check for YAML formatted system preferences to about page
Josef Moravec [Fri, 5 Oct 2018 13:43:54 +0000 (13:43 +0000)]
Bug 21502: Add check for YAML formatted system preferences to about page

So far there are these yaml formatted preferences:
    UpdateNotForLoanStatusOnCheckin
    OpacHiddenItems
    BibtexExportAdditionalFields
    RisExportAdditionalFields
    UpdateItemWhenLostFromHoldList
    MarcFieldsToOrder
    MarcItemFieldsToOrder

Test plan:
1) Add some badly formatted YAML into some of preferences listed above
2) Check the System information tab on About page for appropriate warnings

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22757: Add CodeMirror highlighting on more YAML formatted preferences
Josef Moravec [Tue, 23 Apr 2019 11:46:24 +0000 (11:46 +0000)]
Bug 22757: Add CodeMirror highlighting on more YAML formatted preferences

Test plan:
Go to system preferences and ensure the code highlighting is used on
these preferences:
    UpdateNotForLoanStatusOnCheckin
    BibtexExportAdditionalFields
    RisExportAdditionalFields
    UpdateItemWhenLostFromHoldList
    MarcFieldsToOrder
    MarcItemFieldsToOrder
    ItemsDeniedRenewal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21757: (follow-up) Fix number of columns in checkouts table footer template
Josef Moravec [Wed, 24 Apr 2019 08:02:32 +0000 (08:02 +0000)]
Bug 21757: (follow-up) Fix number of columns in checkouts table footer template

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21757: (folow-up) Restore patron brief detail page
Josef Moravec [Thu, 18 Apr 2019 08:37:38 +0000 (08:37 +0000)]
Bug 21757: (folow-up) Restore patron brief detail page

Test plan
1) Try to create patron with same name/datefobirth to trigger the
duplicate patron check
2) Click on "View existing record" link on "Duplicate patron record?"
alert message
3) You should see the patron data, but withou toolbar, menu, and so on.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21757: Clenup of moremember.pl and its templates
Josef Moravec [Fri, 2 Nov 2018 17:40:45 +0000 (17:40 +0000)]
Bug 21757: Clenup of moremember.pl and its templates

This patch:
  - removes unused templates
  - use objects as much as possible
  - remove many template params

Test plan:
1) Apply the patch
2) Play with patron detail page and try to broke it anyhow ;)
- messaging preferences
- enhanced attributes
- guarantors and guarantees
- fines
- messages
- checkouts
- overdues
- use different date formats, price formats and address formats
- ... there is many thinks you could try with this one page ;)

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22772: Compiled CSS
Nick Clemens [Mon, 29 Apr 2019 11:55:58 +0000 (11:55 +0000)]
Bug 22772: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22772: Menu link hover color incorrect in OPAC language choosers
Owen Leonard [Thu, 25 Apr 2019 15:23:15 +0000 (15:23 +0000)]
Bug 22772: Menu link hover color incorrect in OPAC language choosers

This patch makes a few corrections to OPAC CSS to fix colors in the
language menus.

To test, apply the patch and rebuild the OPAC CSS.

- Enable multiple languages in the OPAC, including more than one
  language "variation" (fr-FR, fr-CA).
- Set the OpacLangSelectorMode preference to "both."
- In the OPAC, test the language menu in both the header and footer.
  When you hover over the sub-menu items the background should be green
  and the text color white.
- Perform the same test in the self checkout and self checkin
  interfaces.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22537: Suspend all hold button appears even if the hold can no longer be suspended.
Owen Leonard [Fri, 26 Apr 2019 13:55:31 +0000 (13:55 +0000)]
Bug 22537: Suspend all hold button appears even if the hold can no longer be suspended.

This patch adds to the user summary page in the OPAC a check for waiting
or in-transit holds. If all holds are waiting or in transit the "Suspend
all" controls will be hidden.

This patch also adds a missing $KohaDates filter to the "suspended
until" date.

To test, apply the patch and log in to the OPAC as a patron with holds.
Test these conditions:

 - All holds are waiting and/or in transit
   - The "Suspend holds" controls at the bottom of the page should not
     appear.
 - Some holds are waiting and/or in transit
   - The "Suspend holds" controls should appear.

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15496: (QA follow-up) Fix remaining cases
Tomas Cohen Arazi [Fri, 26 Apr 2019 17:09:13 +0000 (14:09 -0300)]
Bug 15496: (QA follow-up) Fix remaining cases

This patch fixes remaining cases of the list => scalar change.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Holds/HoldFulfillmentPolicy.t t/db_dependent/Reserves.t
=> FAIL: Tests fail
- Apply this patch
- Run:
 k$ prove t/db_dependent/Holds/HoldFulfillmentPolicy.t t/db_dependent/Reserves.t
=> SUCCESS: Tests pass
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22461: (follow-up) Use `exists` not `defined`
Martin Renvoize [Fri, 26 Apr 2019 13:35:18 +0000 (14:35 +0100)]
Bug 22461: (follow-up) Use `exists` not `defined`

Prior to this patch there is a regression in the LDAP replication
functionality such that clearing a field become impossible. This patch
restores that functionality.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22765: Add class beside loggedinusername to indicate if logged in user is a super...
Kyle M Hall [Wed, 24 Apr 2019 13:51:36 +0000 (09:51 -0400)]
Bug 22765: Add class beside loggedinusername to indicate if logged in user is a superlibrarian

It would be useful to know if a logged in user is a superlibrarian for the purpose of customization
using Javascript and CSS.

Test Plan:
1) Apply this patch, restart all the things
2) Log in as a superlibraraian
3) Note the new class 'is_superlibrarian' next to the 'loggedinusername' class
4) Log in as a non-superlibrarian
5) Note the new class is not present

Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15496: (QA follow-up) Fix new uses of Koha::Biblio::items in list context
Nick Clemens [Fri, 26 Apr 2019 12:04:57 +0000 (12:04 +0000)]
Bug 15496: (QA follow-up) Fix new uses of Koha::Biblio::items in list context

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15496: (follow-up) Update interaction for deleting records
Owen Leonard [Wed, 17 Apr 2019 16:20:18 +0000 (16:20 +0000)]
Bug 15496: (follow-up) Update interaction for deleting records

This patch makes minor changes to markup and JavaScript to alter the
interaction for deleting the record. Now a successful deletion will
convert the dialog to a "message" type dialog and show only the success
message.

To test, apply the patch and test the process of attaching the last item
from a record and deleting that record.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15496: (QA follow-up) Change success status on api
Josef Moravec [Wed, 17 Apr 2019 10:47:06 +0000 (10:47 +0000)]
Bug 15496: (QA follow-up) Change success status on api

DELETE response code must be 204, not 200 according to our API coding
guidelines

Test plan:

prove t/db_dependent/api/v1/biblios.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15496: (QA follow-up) remove text/javascript
Liz Rea [Mon, 15 Apr 2019 17:55:04 +0000 (17:55 +0000)]
Bug 15496: (QA follow-up) remove text/javascript

Make the QA tool happy for html5

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15496: Delete Bib After Moving Item
Kyle M Hall [Fri, 12 Apr 2019 17:50:32 +0000 (13:50 -0400)]
Bug 15496: Delete Bib After Moving Item

Librarians have requested the ability to delete records with no items
quickly and easily from the "Attach item" results page as items are
moved from one record to another.

Test Plan:
1) Apply this patch
2) Create 2 records with 2 items each
3) Move one item from record A to record B
4) You should see no change from pre-patch behavior
5) Move the second item from record A to record B
6) You should now see a "Delete record" button
7) Click the button
8) Note the record in question has been deleted

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10300: DBRev 18.12.00.065
Nick Clemens [Fri, 26 Apr 2019 11:48:17 +0000 (11:48 +0000)]
Bug 10300: DBRev 18.12.00.065

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10300: (follow-up) add controls on transfers page
Fridolin Somers [Thu, 28 Feb 2019 15:23:22 +0000 (16:23 +0100)]
Bug 10300: (follow-up) add controls on transfers page

This patch moves the check of IndependentBranchesTransfers pref to templates and adds permission test inside branchtransfers.pl.
It also corrects the libraries combobox in branchtransfers.tt, this list can contain all libraries, it is the access to the page that may be protected.

Additions to test plan :
1)
1.1) Enable CircSidebar
1.2) In circulation home page check the effect of IndependentBranchesTransfers on "Transfer" link
1.3) Go to return page and check then effect of IndependentBranchesTransfers on "Transfer" link

2)
2.1) In circ/branchtransfers.pl, with and without IndependentBranches you see all libraries are in combobox

3)
3.1) Set IndependentBranchesTransfers to no and go to circ/branchtransfers.pl
3.2) You are redirected to page 403 unless you are superlibarian

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 10300: Allow transferring of items to be have separate IndependentBranches syspref
Kyle M Hall [Thu, 25 Aug 2016 14:03:31 +0000 (14:03 +0000)]
Bug 10300: Allow transferring of items to be have separate IndependentBranches syspref

Some libraries want to have IndependentBranches enabled, but still be
able to transfer items between themselves.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable IndpendentBranches and IndependentBranchesTransfers
4) Log in as a super librarian
5) Note you can transfer items
6) Log in as a non-super librarian
7) Note you cannot transfer items
8) Disable IndependentBranchesTransfers
9) Note you can now transfer items

Signed-off-by: Maribeth Shafer <mshafer@ckls.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 10300: (QA follow-up) Make database update idempotent

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15496: Tidy code block (Whitespace changes only)
Kyle M Hall [Fri, 12 Apr 2019 17:07:18 +0000 (13:07 -0400)]
Bug 15496: Tidy code block (Whitespace changes only)

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 15496: Add API endoint for deleting a bib
Kyle M Hall [Thu, 11 Apr 2019 14:05:14 +0000 (10:05 -0400)]
Bug 15496: Add API endoint for deleting a bib

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22035: Compiled CSS
Nick Clemens [Fri, 26 Apr 2019 10:52:41 +0000 (10:52 +0000)]
Bug 22035: Compiled CSS

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22035: Improve local cover image browser page
Owen Leonard [Wed, 16 Jan 2019 18:27:54 +0000 (18:27 +0000)]
Bug 22035: Improve local cover image browser page

This patch makes changes to the way local cover images are handled on
the image viewer page in the staff client. From this page you can now
delete images or reach the upload images page.

The patch also modifies slightly the process for deleting an image from
the images tab on the bibliographic detail page.

To test, apply the patch and regenerate the staff client CSS.
LocalCoverImages and  AllowMultipleCovers should be enabled.

 - Open the detail view for a record which has multiple cover images
   attached. On the Images tab, click the "Delete image" link for an
   image. After confirming, the link should change to a spinner icon and
   image should fade out.
 - Click one of the cover images to open the image viewer page. The
   thumbnails should each have a delete link which looks like and
   behaves like the delete links on the biblio detail page.
 - Clicking an image thumbnail should load a spinner icon into the area
   where the full-sized image was, which should be replaced by the image
   you chose.
 - There should be a button for uploading images which takes you to the
   correct page for adding images to that record.
 - The page title and breadcrumbs should show the title of the record.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22056: Removed test directory, including search.pl and README
Hayley Mapley [Fri, 26 Apr 2019 03:22:30 +0000 (15:22 +1200)]
Bug 22056: Removed test directory, including search.pl and README

Test plan: Check that this directory has been removed.

Sponsored-by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22200: (follow-up) Wrap accountline creation in a transaction
Martin Renvoize [Thu, 25 Apr 2019 11:35:24 +0000 (12:35 +0100)]
Bug 22200: (follow-up) Wrap accountline creation in a transaction

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22200: Add credit when forgiving overdue
Martin Renvoize [Thu, 18 Apr 2019 08:44:01 +0000 (09:44 +0100)]
Bug 22200: Add credit when forgiving overdue

Prior to this patch the exemptfine option for_FixOverduesOnReturn would
directly set the overdue amount to 0 rather than creating an appropriate
credit of the type forgiven and offseting it against the debt.

Test Plan:
1) Find a checkout that is overdue with fines
2) Check the item in with the forgive fines option checked
3) Note that the users account details now shows the overdue as forgiven
and a forgiven credit is added which matches the overdue amount (and is
applied against it, i.e. both overdue and forgiven lines have 0
amountoutstanding).

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22200: Add Tests for change
Martin Renvoize [Thu, 18 Apr 2019 08:56:24 +0000 (09:56 +0100)]
Bug 22200: Add Tests for change

Unit tests to check for the addition of a credit of type 'FOR' when
_FixOverduesOnReturn is called with $exemptfine set to true.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22621: Fix filters on subscription search results
Jonathan Druart [Wed, 24 Apr 2019 02:49:46 +0000 (22:49 -0400)]
Bug 22621: Fix filters on subscription search results

Caused by
  commit 4e698f7b478a094d7b32ebfeaa917bca05ebcc5b
  Bug 18426: Allow to edit subscriptions in batch

There is a shift caused by a hidden column, which make the filters
searching on the previous column.

Test plan:
- Add 1+ searchable additional field for subscription
- Create a new subscription
- Search for subscriptions
- Use the column filters to filter the results
=> The results must be filtered accordingly

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21589: Series link formed from 830 field is incorrect
Kyle M Hall [Wed, 17 Oct 2018 18:43:11 +0000 (14:43 -0400)]
Bug 21589: Series link formed from 830 field is incorrect

Bug 13692 corrected the series link for records using a 490/800 combination

When a record has a 490/830 conbination for series, the link is malformed (title is used as author, title is blank)

Test Plan:
1) Catalog two or more records with 830 fields
2) Note the series links are broken
3) Apply this patch
4) Reload the record details page
5) The series link should now work
6) Repeat for the OPAC

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22715: Remove extraneous html filter
Nick Clemens [Thu, 25 Apr 2019 17:47:14 +0000 (17:47 +0000)]
Bug 22715: Remove extraneous html filter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22715: Searching for patrons with "" in the circulation note hangs patron search
Kyle M Hall [Tue, 16 Apr 2019 14:34:56 +0000 (10:34 -0400)]
Bug 22715: Searching for patrons with "" in the circulation note hangs patron search

To replicate:
Edit a patron to have a circ note, include quoted text in it, such as "this is quoted string"
Go to the patron search, search for a set of results that would include the patron with the quotes in the note
Enjoy looking at "Processing" for forever.

Test Plan:
1) Apply this patch
2) Attempt to replicate using the steps above

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
I took this a step further and used <script>"something in
quotes"</script> for my test note and this worked just fine. YAY.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22669: Fix item editing on receiving an order
Jonathan Druart [Wed, 24 Apr 2019 03:48:35 +0000 (23:48 -0400)]
Bug 22669: Fix item editing on receiving an order

Since
  commit 1253975389975a8ff11a9bb2ef84582aeb6bd08b
  Bug 21091: Move add item template JavaScript to a separate file

items cannot longer be edited when receiving an order.
When moving the code to the JS file, the JS variable "opisadd" was
always set to "true":
  var opisadd = '[% opisadd | html %]';
Even if the TT variable is 0, opisadd will be "0", which is evaluated to
true in Javascript

To clean the situation it is easier to remove this variable and use "op"
instead.

Test plan:
- Make sure acqcreateitem is set to "when placing an order"
- Create a basket with some orders
- Close the basket
- Go to your vendor and receive an order
- On the receive page, try to edit your item
=> Without the patch, the pop up page will open and then close, not allowing the item to be edited.
=> With this patch applied you will see the item edit form. Save and
confirm that the parent window is updated with the new value (actually
it's refreshed)

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20837: (RM follow-up) fix test count
Nick Clemens [Thu, 25 Apr 2019 14:25:06 +0000 (14:25 +0000)]
Bug 20837: (RM follow-up) fix test count

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22556: Add ability to quickly filter funds/budgets by library on the Acquisitions...
Kyle M Hall [Thu, 21 Mar 2019 10:43:13 +0000 (06:43 -0400)]
Bug 22556: Add ability to quickly filter funds/budgets by library on the Acquisitions home page

Some librarians would like to have a quick pulldown selector to filter budgets and funds by library on the acquisitions home page.

Test Plan:
1) Apply this patch
2) Navigate to the Acquisitions home page
3) Notice the new pulldown on the budgets table labeled "Filter by library"
4) Select a library that has one or more budgets/funds
5) Note only budgets/funds from that library now display!

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14576: DBRev 18.12.00.064
Nick Clemens [Thu, 25 Apr 2019 11:39:11 +0000 (11:39 +0000)]
Bug 14576: DBRev 18.12.00.064

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14576: (follow-up) Add code highlighting to system preference UpdateItemLocationO...
Josef Moravec [Tue, 23 Apr 2019 12:02:32 +0000 (12:02 +0000)]
Bug 14576: (follow-up) Add code highlighting to system preference UpdateItemLocationOnCheckin

Test plan:
1) Go to system preferences and find preference UpdateItemLocationOnCheckin
2) Ensure the yaml code higlighting is used on textarea when editing
this setting

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14576: (QA follow-up) Tidy up feature documentation
Liz Rea [Wed, 27 Mar 2019 23:56:51 +0000 (23:56 +0000)]
Bug 14576: (QA follow-up) Tidy up feature documentation

To test:
Apply this patch with all of the others
run the updatedatabase, it should work
install a new Koha, this pref should be installed and look fine in the
interface.
Check the syspref, make sure the text looks ok and makes sense.

Bonus points:
for checking to make sure PROC: _PERM_ appears in the new
pereference if InProcessingToShelvingCart was set
for checking to make sure _ALL_: CART appears in the new preferenec if ReturnToShelvingCart was previously set.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14576: (follow-up) Using item objects, not hashrefs
Nick Clemens [Wed, 27 Mar 2019 11:36:47 +0000 (11:36 +0000)]
Bug 14576: (follow-up) Using item objects, not hashrefs

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14576: Replaced calls using deprecated method GetItem with Koha::Items->find
Hayley Mapley [Tue, 26 Mar 2019 23:16:20 +0000 (12:16 +1300)]
Bug 14576: Replaced calls using deprecated method GetItem with Koha::Items->find

Test plan:
1) Apply all patches except this one
2) Checkout out an item to a patron
3) Check the item in - note that this will fail
4) Apply this patch, and repeat steps 1-3, noting instead that the the
check is instead successful
5) Verify also that reserves act as expected
5) Sign off

Sponsored-by: Catalyst IT
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14576: Rebase fixes Fix test Rebase code
Nick Clemens [Wed, 20 Mar 2019 15:46:26 +0000 (15:46 +0000)]
Bug 14576: Rebase fixes Fix test Rebase code

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14576: (follow-up) fix some typos and style
Nick Clemens [Wed, 20 Feb 2019 18:45:44 +0000 (18:45 +0000)]
Bug 14576: (follow-up) fix some typos and style

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14576: Update to use get_yaml_pref_hash
Nick Clemens [Wed, 12 Dec 2018 13:30:11 +0000 (13:30 +0000)]
Bug 14576: Update to use get_yaml_pref_hash

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14576: Unit tests
Nick Clemens [Wed, 4 Oct 2017 15:21:57 +0000 (15:21 +0000)]
Bug 14576: Unit tests

To test:
1 - prove -v t/db_dependent/Circulation/Returns.t
2 - prove -v t/db_dependent/Circulation/issue.t
3 - prove -v t/db_dependent/UsageStats.t
4 - All should pass

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 14576: Allow arbitrary automatic update of location on checkin
Nick Clemens [Wed, 4 Oct 2017 15:19:26 +0000 (15:19 +0000)]
Bug 14576: Allow arbitrary automatic update of location on checkin

This patch adds a new syspref "UpdateItemLocationOnCheckin" which
accepts pairs of shelving locations.  On check-in the items location is
compared ot the location on the left and, if it matches, is updated to
the location on the left.

This preference replaces ReturnToShelvingCart and
InProcessingToShelvingCart preferences.  The update statement should
insert values that replciate these functions.  Note existing
functionality of all items in PROC location being returned to
permanent_location is preserved by default.  Also, any items issued from
CART location will be returned to their permanent location on issue (if
it differs)

Special values for this pref are:
_ALL_ - used on left side only to affect all items
_BLANK_ - used on either side to match on/set to blank (actual blanks
        will work, but this is an easier to read option)
_PERM_ - used on right side only to return items to permanent location

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Set the new system preference UpdateitemLocationOnCheckin
   to the following (assuming sample data):
   NEW: FIC
   FIC: GEN
4) Create an item, set its location to NEW
5) Check in the item, note its location is now FIC
6) Check in the item again, note its location is now GEN
7) Check in the item again, note its location remains GEN
8) Test using _ALL_, _BLANK_ and _PERM_ for updates
9) Try entering various incorrect syntax in the pref and note you are warned

Sponsored by:
    Arcadia Public Library (http://library.ci.arcadia.ca.us/)
    Middletown Township Public Library (http://www.mtpl.org/)
    Round Rock Public Library (https://www.roundrocktexas.gov/departments/library/)

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22764: Change marcfield to MARC field in alert message
Katrin Fischer [Wed, 24 Apr 2019 23:42:45 +0000 (23:42 +0000)]
Bug 22764: Change marcfield to MARC field in alert message

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22764: More YUI grid cleanup
Owen Leonard [Wed, 24 Apr 2019 13:19:38 +0000 (13:19 +0000)]
Bug 22764: More YUI grid cleanup

This patch cleans up a few places where templates still contain YUI grid
markup. Some other minor markup problems are also fixed.

 - additional-fields.tt:
   - Converts YUI grid to Bootstrap
   - Replaces obsolete <tt> tag with styled <span>
   - Adds _() function to string in embedded JavaScript

 - detail.tt:
   - Fixes some stray YUI grid classes
   - Fixes corresponding JavaScript to enable page adjustments

 - moredetail.tt:
   - Removes unnecessary YUI grid markup

To test, apply the patch and view the affected pages, confirming that
everything looks correct and that the page adjusts well to various
browser widthds.

When testing the bibliographic detail page, enable AmazonCoverImages and
view a record with and without an Amazon cover image. The layout should
work in both cases.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22664: More making acquisitions links more easily clickable
Liz Rea [Wed, 17 Apr 2019 05:20:23 +0000 (05:20 +0000)]
Bug 22664: More making acquisitions links more easily clickable

To test:

* create a basket with an order from a staged record, and an order from
a suggestion
* add that basket to a basket group when you close it.
* note that the links to the basket in the first column, the link to the
basket group in the second column, and the link to
the suggester in the summary column are very small (only the ID# is
linked)
* apply this patch, restart the things
* refresh the page, note that the previously ogled links are now bigger
and easier to find and click, and that the links work and such
* rejoice.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22664: Link names in order search results instead of numbers
Liz Rea [Mon, 8 Apr 2019 19:00:01 +0000 (19:00 +0000)]
Bug 22664: Link names in order search results instead of numbers

To test:
Make up some orders, put some in basket groups.
Search for your vendor's orders, note that the only thing linking to the
order is a tiny number in parentheses.
Apply this patch, restart the things.
Refresh the results, note that te basket names *and* numbers are linked
now.
Rejoice.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22734: Fund not marked as mandatory when ordering from a staged file
Owen Leonard [Thu, 18 Apr 2019 14:22:35 +0000 (14:22 +0000)]
Bug 22734: Fund not marked as mandatory when ordering from a staged file

This patch does some refactoring of JavaScript to make handling of
required fields more robust. It also moves some template JavaScript to
the footer and some to a separate file.

A fallback "pattern" attribute is added to the quantity field, requiring
0-9+ values.

The "required" property of the funds dropdown is now dependent on the
value set under the "Default accounting details" tab. If a default is
selected, the individual item funds are preselected and not marked
required.

To test, apply the patch and begin the process of ordering from a staged
file.

 - Select all items to import.
   - Under each item, the fund should be marked mandatory.
   - The quantity field should accept only numbers.
   - Select the "Default accounting details" tab and select a default
     fund.
     - Return to the "Select to import" tab. Your selected default fund
       should now be preselected under each item. The fund should no
       longer be marked required.

       Un-selecting a default fund should result in each item fund
       select becoming required.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20692: Extreme toggle checking for plack
Mark Tompsett [Mon, 28 May 2018 16:45:29 +0000 (16:45 +0000)]
Bug 20692: Extreme toggle checking for plack

TEST PLAN
---------
sudo koha-plack --disable
sudo koha-plack --disable
sudo koha-plack --enable

sudo koha-plack --disable
echo $?
sudo koha-plack --disable
echo $?
sudo koha-list --noplack
echo $?
sudo koha-plack --enable
echo $?
sudo koha-plack --enable
echo $?
sudo koha-list --plack
echo $?

git bz apply 20692
sudo perl ~/misc4dev/cp_debian_files.pl
then repeat the test.

It should also be noted, because the enable
and disable are now split, if for some reason
they become out of sync, an enable or disable
should correct them.

Because these are bash scripts, the test tool
(/home/vagrant/qa-test-tools/koha-qa.pl)
does not apply.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22511: Fix type role->roll
Nick Clemens [Thu, 25 Apr 2019 11:10:29 +0000 (11:10 +0000)]
Bug 22511: Fix type role->roll

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22511: DBRev 18.12.00.063
Nick Clemens [Thu, 25 Apr 2019 11:09:38 +0000 (11:09 +0000)]
Bug 22511: DBRev 18.12.00.063

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22511: (QA follow-up) Refactor status description in templates
Josef Moravec [Thu, 25 Apr 2019 08:28:13 +0000 (08:28 +0000)]
Bug 22511: (QA follow-up) Refactor status description in templates

Test plan:

Before this patch, some accounttypes does not show status (for example
        voided payment)

After this patch, the status is always generated - defaults to empty
string

This behaviour should be same in intranet and opac

In OPAC templates there was even bug (used variable account instead of
        ACCOUNt_LINE), so the status was not shown at all

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22511: (QA follow-up) Fix update database
Josef Moravec [Thu, 25 Apr 2019 08:25:42 +0000 (08:25 +0000)]
Bug 22511: (QA follow-up) Fix update database

Test plan:
Run db update (and have some voided accountlines)
--> without patch it fails with error message similar to:
    Can't use string ("Payment") as a HASH ref while "strict refs" in use at
    (eval 1393) line 19.
--> with patch it runs as expected

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22511: (follow-up) Add DB Update
Martin Renvoize [Wed, 10 Apr 2019 09:05:07 +0000 (10:05 +0100)]
Bug 22511: (follow-up) Add DB Update

This update takes old VOID accountlines and attempts to restore the
original accounttypes using the offsets and set the status to 'VOID'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22511: (follow-up) Fix test plans
Martin Renvoize [Wed, 27 Mar 2019 11:52:07 +0000 (11:52 +0000)]
Bug 22511: (follow-up) Fix test plans

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22511: Update UI to use accountlines.status
Martin Renvoize [Fri, 22 Mar 2019 12:00:00 +0000 (12:00 +0000)]
Bug 22511: Update UI to use accountlines.status

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22511: Update void method to use status
Martin Renvoize [Fri, 15 Mar 2019 14:07:24 +0000 (14:07 +0000)]
Bug 22511: Update void method to use status

We added a 'status' field to 'accountlines' in bug 22512 to allow for
more fined grained control over 'types' and 'states'.

This patch updates the void method to utilise this new field so we may
keep the original credit type for later auditing should it be required.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22511: Update tests
Martin Renvoize [Fri, 15 Mar 2019 14:18:12 +0000 (14:18 +0000)]
Bug 22511: Update tests

Updated tests to check for 'status' change and fixed 'accounttype' and
moved from t/db_dependent/Accounts.t to the more appropriate
t/db_dependent/Koha/Account/Lines.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21460: (follow-up) Fix bugs found in QA
Andrew Isherwood [Wed, 24 Apr 2019 13:58:41 +0000 (14:58 +0100)]
Bug 21460: (follow-up) Fix bugs found in QA

Fix silly bugs mentioned in comment #29

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21460: (follow-up) Filter params in .pl
Andrew Isherwood [Tue, 23 Apr 2019 09:18:31 +0000 (10:18 +0100)]
Bug 21460: (follow-up) Filter params in .pl

This patch filters the passed parameters in the .pl, rather than doing
it in the template. As per comment 16
(https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21460#c16)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 21460: Simplify the code to have only 1 assignment
Andrew Isherwood [Tue, 23 Apr 2019 09:09:33 +0000 (10:09 +0100)]
Bug 21460: Simplify the code to have only 1 assignment

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22551: Stray "//" appears at bottom of opac-detail.tt
phette23 [Mon, 8 Apr 2019 23:00:47 +0000 (16:00 -0700)]
Bug 22551: Stray "//" appears at bottom of opac-detail.tt

Removes a couple stray "//<![CDATA[" like comments which are artifacts of other
code that since been removed. One of the comments causes two forward slashes to
appear at the bottom of each OPAC detail page.

Testing plan:

- enable SocialNetworks
- visit any OPAC detail page, observe "//" at bottom of page
- apply patch
- revisit page, slashes should be gone

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22413: Improve query string and desc creation for Elasticsearch
Ere Maijala [Tue, 5 Mar 2019 09:04:55 +0000 (11:04 +0200)]
Bug 22413: Improve query string and desc creation for Elasticsearch

Test plan:

After each of the following steps, verify that the results and query description looks ok.

1. Do a simple keyword query
2. Change sort order
3. Click a facet
4. Do an advanced search with title and author
5. Change sort order
6. Click a facet

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22339: DBRev 18.12.00.062
Nick Clemens [Thu, 25 Apr 2019 10:36:36 +0000 (10:36 +0000)]
Bug 22339: DBRev 18.12.00.062

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 22339: Fix search field mappings of MARC fixed fields
Ere Maijala [Thu, 14 Mar 2019 11:31:34 +0000 (13:31 +0200)]
Bug 22339: Fix search field mappings of MARC fixed fields

Fixes handling of /0 selector in addition to several fixed field positions. Note that ff7-01-02 is in fact 00-01 in Zebra and that has been replicated here.

Test plan:
1. Before applying a patch, check from Elasticsearch (e.g. localhost:9200/koha_biblios/_search?q=_id:123) what is indexed in Elasticsearch for a record for date-entered-on-file, ff7-00, ff7-01, ff7-02 and lleader.
2. Apply the patch, update database and save the record again.
3. Verify that the contents of the forementioned fields is now correct in Elasticsearch.
4. Verify that tests pass:  prove -v t/Koha/SearchEngine/Elasticsearch.t

Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20891: Escape html then JSON
Jonathan Druart [Fri, 8 Jun 2018 15:19:41 +0000 (12:19 -0300)]
Bug 20891: Escape html then JSON

To my understanding we need to escape first html chars then to JSON.

If this patch works we will need to rethink the 'To' TT plugin.
It was originally designed to have several escape methods, but with
these changes it will not make sense to name it 'To' if used only to
escape JSON

IIRC we should keep the 2 different ways to use it:
 * [% To.json( string ) %]
 * [% string | $To %]
otherwise it will be hard to use it when called in argument of
patron-title.inc (`git grep To.json`)

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20891: Escape list's names in JSON
Jonathan Druart [Thu, 7 Jun 2018 15:17:26 +0000 (12:17 -0300)]
Bug 20891: Escape list's names in JSON

When someone uses \ in the description of a list, the datatable in staff
won't load and keeps processing.

Test plan:
- Create a list named "<script>alert('hola');</script>"
- Create another list named "k\o\h\a"
- Hit /cgi-bin/koha/virtualshelves/shelves.pl

=> Without this patch the lists will not be displayed, JSON is
malformated
=> With this patch everything is ok

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20837: (QA follow-up) adding missing filter to make QA tool happy
Liz Rea [Tue, 9 Apr 2019 19:37:13 +0000 (19:37 +0000)]
Bug 20837: (QA follow-up) adding missing filter to make QA tool happy

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20837: Use ReservesControlBranch to determine holdability of items
Nick Clemens [Wed, 30 May 2018 16:05:04 +0000 (16:05 +0000)]
Bug 20837: Use ReservesControlBranch to determine holdability of items

To test:
 1 - Set a default holds plicy for an item type as 'from home library'
 2 - Set CircControl to 'logged in library'
 3 - Log in as staff from a library without the rule set
 4 - Note you can set holds for patrons of any library on items of type
above
 5 - Toggle ReservesControlBranch and note that nothing changes
 6 - Toggle CircControl and note some combinations don't allow holds
 7 - Apply patch
 8 - Toggle ReservesControlBranch and note that holdability is affected
 9 - Toggle CircControl and note holdability does not change
10 - Read the note on admin/smartrules.pl and confirm it makes sense

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
5 years agoBug 20837: Unit tests
Nick Clemens [Wed, 30 May 2018 17:29:57 +0000 (17:29 +0000)]
Bug 20837: Unit tests

To test:
prove -v t/db_dependent/Holds.t
prove -v t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>