]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 20521: Enable problematic SQL modes for dev installs
Jonathan Druart [Wed, 4 Apr 2018 19:28:53 +0000 (16:28 -0300)]
Bug 20521: Enable problematic SQL modes for dev installs

So far we have bug 17258 (omnibus to list the issue we have with the new
default SQL modes), bug 20144 (which fixed our test suite with these
modes) and bug 20229.
This last one forces the SQL modes to avoid to modify the DBMS
configuration and define the SQL modes we support.

We should let developers catch the issues and report/fix them.
Also Jenkins must alert us if there is a regression with the test suite.

I suggest to enable the problematic SQL modes on dev installs.

Test plan:
- Revert commit 0180524bb9b1464c441bb1b858d0d8df37524d72
- prove t/db_dependent/Koha/Biblios.t

=> If you have dev_install defined in your Koha config file, the test
will fail with "Field 'datecreated' doesn't have a default value"
=> If you do not have dev_install, the tests will pass

NOTE: The commit number was wrong. Using
    git log -- t/db_dependent/Koha/Biblios.t
    This showed bug 20176 which was 524eab678833b2719187e67128ee4f83a2a48ba4
    Also dev_install was in koha_conf.xml already, so I just had to
    toggle 0 and 1.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save...
Andreas Roussos [Sun, 7 Oct 2018 18:00:09 +0000 (21:00 +0300)]
Bug 21513: Add a 'Cancel' button to the authority editor and remove duplicate 'Save' button

The authority editor (authorities/authorities.pl) does not have
a 'Cancel' button. Also, it has two 'Save' buttons.

This patch fixes that by:
a) adding a 'Cancel' button to the floating toolbar at the top
b) removing the 'Save' button from the bottom of the page

Test plan:
1) Go to Home > Authorities and launch the authority editor by
   clicking on 'New authority'. Notice how the editor doesn't
   have a 'Cancel' button. Also notice the two 'Save' buttons.
2) Apply the patch.
3) Re-launch the authority editor, and hit cancel; you should
   be taken back to Home > Authorities.
4) Edit an existing authority, and hit cancel; you should be
   taken back to the details page for the authority you chose.
5) Edit an authority as new (duplicate), and hit cancel; you
   should be taken back to Home > Authorities (this behaviour
   is mimicking the bibliographic editor: when duplicating a
   biblio the 'Cancel' button will take you back to Home >
   Cataloging).

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 14786: Use MARC istead of ISO2709 everywhere
Katrin Fischer [Sun, 12 Aug 2018 15:08:57 +0000 (17:08 +0200)]
Bug 14786: Use MARC istead of ISO2709 everywhere

This patch changes the term ISO2709 in the templates to use
MARC instead.

Test plan:
- The term was changed on the following pages in staff:
  - Advanced catalouging editor > Save to catalog
  - Patron account > Check out (Activate ExportCircHistory) > Format
  - Patron account > Check out > Help page
  - Lists > Download list
  - Acquisitions > Add order to basket > From a staged file (breadcrumbs)
  - Administration > System preferences > ExportRemoveFields
  - Cart > Download
  - Tools > Export data > Output format

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21456: (QA follow-up) Catch missed case in authorities merge
Martin Renvoize [Mon, 8 Oct 2018 14:25:50 +0000 (15:25 +0100)]
Bug 21456: (QA follow-up) Catch missed case in authorities merge

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21456: The 'New authority' button lists authority types inconsistently
Andreas Roussos [Sun, 30 Sep 2018 10:06:28 +0000 (13:06 +0300)]
Bug 21456: The 'New authority' button lists authority types inconsistently

The 'New authority' button does not always list the available
authority types in A-Z order based on their description.

This patch fixes that.

Test plan:
1) Go to Home > Authorities in the staff client; notice how the
   'New authority' button lists auth types sorted by description.
2) Go to an authority's detail page; notice how the same 'New
   authority' button will list auth types sorted by their code.
3) Apply the patch.
4) In an authority's detail page, the 'New authority' button will
   now list the available authority types sorted by description.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21439: Update two-column templates with Bootstrap grid: Rotating collections
Owen Leonard [Thu, 3 May 2018 12:58:36 +0000 (12:58 +0000)]
Bug 21439: Update two-column templates with Bootstrap grid: Rotating collections

This patch modifies rotating collections templates to use the
Bootstrap grid instead of YUI.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Tools -> Rotating collections
   - View rotating collection
   - Transfer rotating collection
   - Edit rotating collection

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21490: Disambiguation of 'Order' part 2
Caroline Cyr La Rose [Thu, 4 Oct 2018 18:52:53 +0000 (14:52 -0400)]
Bug 21490: Disambiguation of 'Order' part 2

This patch changes the 'Order' term in neworderbiblio.tt,
newordersubscription.tt, newordersuggestion.tt, and
z3950_search.tt for 'Place order'.

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>
6 years agoBug 21490: Disambiguation of 'Order'
Caroline Cyr La Rose [Thu, 4 Oct 2018 18:38:25 +0000 (14:38 -0400)]
Bug 21490: Disambiguation of 'Order'

This patch changes the 'Order' term in marc_modification_template.tt
for 'Rank'.

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>
6 years agoBug 16754: Use validation plugin in budgets, planning, and contracts
Owen Leonard [Thu, 16 Jun 2016 13:28:01 +0000 (09:28 -0400)]
Bug 16754: Use validation plugin in budgets, planning, and contracts

This patch removes the custom javascript form validation from three
templates: Budgets, budget planning, and contracts. Validation via the
validation plugin is done instead.

This patch also removes use of event attributes like onclick and
onchange. Also changed: I added the "Required" text next to required
fields as necessary.

To test, apply the patch and go to Administration -> Budgets.

- Test the budget creation process for adding, editing, and duplicating
  budgets. In all cases:
  - The start date and end date should be required
  - You should be warned if you enter an end date which falls before the
    start date.
  - The description should be required
  - The budget amount should be required to be a number

To test the budget planning page:

Note that much of the JS removed from this template was unused. It
looked for inputs by the name 'est_total' which don't exist.

- When viewing the table of funds for a budget, select a choice from the
  'planning' toolbar menu.
  - Verify that after entering a numeric value in any cell, the
    'remaning' value at the end of the row is correctly updated.
  - Verify that after entering non-numeric data an error is displayed.
  - Verify that clicking the 'auto-fill' button at the end of the row
    works to fill any empty or zero-value fields with the remaning funds
    available.

To test the vendor contracts page:

- Go to Acquisitions -> Vendor -> Contracts
- Add or edit a contract
  - Confirm that name, start date, and end date are required.
  - Confirm that you are warned if you enter an end date which falls
    before the start date.

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>
6 years agoBug 21583: Don't use Asset.js for external script files
Nick Clemens [Tue, 16 Oct 2018 17:09:29 +0000 (17:09 +0000)]
Bug 21583: Don't use Asset.js for external script files

To test:
1 - Enable Novelist in staff client:
    NovelistSelectStaffEnabled: Add
    NovelistSelectStaffProfile: anything
    NovelistSelectPassword: anything
    ( these don't need to be valid, just not blank )
2 - Pull up a record detail page in staff client
3 - View page source - search for ns2init.js
4 - You won't find it
5 - Apply patch
6 - Reload details
7 - Search page source for ns2init.js
8 - It loaded! Huzzah!

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21579: Make showdiffmarc.pl work for authorities and biblios
Nick Clemens [Tue, 16 Oct 2018 14:00:59 +0000 (14:00 +0000)]
Bug 21579: Make showdiffmarc.pl work for authorities and biblios

To test:
 1 - Have or make some authority records
 2 - Have or make an authority matching rule
 3 - Export your authrotities
 4 - Import them using the matching rule
 5 - On the 'Manage staged records' page view some diffs
 6 - The import record is correct, but the existing records pull form
 bibs
 7 - Apply patch
 8 - Repeat
 9 - Confirm you see the expected authority matches

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marjorie Vila <marjorie.barry-vila@collecto.ca>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21155: Prevent SwitchOnSiteCheckouts.t to fail randomly
Jonathan Druart [Tue, 16 Oct 2018 13:27:37 +0000 (10:27 -0300)]
Bug 21155: Prevent SwitchOnSiteCheckouts.t to fail randomly

 #   Failed test 'The date_due should have been set depending on the circ
 rules when the on-site checkout has been switched'
 #   at t/db_dependent/Circulation/SwitchOnSiteCheckouts.t line 126.
 #          got: '2018-10-16T23:59:00'
 #     expected: '2018-10-21T23:59:00'

TestBuilder set date to today, so issuingrules.harduedate will be set to
today.
issuingrules.hardduedatecompare will be set to an integer.
If set to 0, $datedue will be reset to the hard due date

The call stack is: AddIssue > CalcDateDue > GetHardDueDate

In GetHardDueDate:
3509         if ( $hardduedatecompare == 0 || $hardduedatecompare == $cmp ) {
3510             $datedue = $hardduedate->clone;
3511         }

To fix this random failure we need to set issuingrules.harduedate to undef.

Test plan:
0. Do not apply this patch
1. Modify the test to set hardduedatecompare to 0 (search 'my $issuingrule = ')
2. Execute the test and confirm the failure
3. Apply this patch
4. Execute the test and confirm the it is no longer failing

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21552: Use raw filter for displaying RoutingListNote
Katrin Fischer [Tue, 9 Oct 2018 12:22:35 +0000 (12:22 +0000)]
Bug 21552: Use raw filter for displaying RoutingListNote

The RoutingListNote system preference works like other prefs
allowing you to insert your own content on the routling list
template using HTML. The default text even uses HTML, so it
looks broken without this patch.

To test:
- Add a subscription
- Add a new routing list to it
- Add some patrons to it
- Save
- preview routing list
- Verify that the note shows and is formatted correctly.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21542: Use modal and password field for overdrive password
Nick Clemens [Wed, 10 Oct 2018 15:53:13 +0000 (15:53 +0000)]
Bug 21542: Use modal and password field for overdrive password

To test:
 1 - Enabled Overdrive and fill all preferences
 2 - Make sure OverDrivePasswordRequired is true
 3 - Go to opac account
 4 - Log in to overdrive
 5 - Note the input is shown
 6 - Apply patch
 7 - Repeat
 8 - Note popup is now a modal
 9 - Note password is now hidden
10 - Confirm overdrive integration works as before

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21479: "Mock" SearchEngine to use Zebra
Jonathan Druart [Mon, 15 Oct 2018 17:53:35 +0000 (14:53 -0300)]
Bug 21479: "Mock" SearchEngine to use Zebra

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21337: Koha::Objects->delete must return the number of deleted rows
Jonathan Druart [Mon, 15 Oct 2018 17:38:14 +0000 (14:38 -0300)]
Bug 21337: Koha::Objects->delete must return the number of deleted rows

To follow DBIC behaviour

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21479: Zebra index can return different result
Jonathan Druart [Mon, 15 Oct 2018 14:42:34 +0000 (11:42 -0300)]
Bug 21479: Zebra index can return different result

If the zebra index has been rebuilt by previous tests, the order/results
will be different, and we will not have biblionumber 1, 3, 5

Let make this more flexible

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18480: Get rid of unwanted / distracting link in patron search for fund owner
Owen Leonard [Mon, 13 Aug 2018 13:55:31 +0000 (13:55 +0000)]
Bug 18480: Get rid of unwanted / distracting link in patron search for fund owner

This patch modifies templates where a pop-up window is used to display
patron search results. A link has been added to the patron name which
triggers a modal window displaying more details about that patron. With
each page in the test plan, check that clicking linked names in search
results triggers a modal with the correct data.

 - Acquisitions -> Vendor -> View basket -> Add user
 - Acquisitions -> Vendor -> Add to basket -> From a new (empty) record
   -> Add user
 - Acquisitions -> Funds -> Edit fund -> Select owner
 - Tools -> Patron card creator -> Manage -> Card batches -> Edit -> Add
   patrons
 - Serials -> Subscription -> Edit routing list -> Add recipients

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>
6 years agoBug 21337: (RM follow-up) Adjust number of tests
Nick Clemens [Mon, 15 Oct 2018 14:14:37 +0000 (14:14 +0000)]
Bug 21337: (RM follow-up) Adjust number of tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21337: (QA follow-up) Rollback for partial delete
Marcel de Rooy [Mon, 1 Oct 2018 07:52:21 +0000 (09:52 +0200)]
Bug 21337: (QA follow-up) Rollback for partial delete

Puts delete loop in a txn_do.
Raises Koha::Exceptions::Patron::Delete when Patron->delete does not return
true (like 0 or -1).
Unit test adjusted accordingly.

Note: A follow-up report for raising exceptions in Object->delete could well
be considered. Not here please.

Test plan:
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21337: (follow-up) Add parameter for move_to_deleted action
Marcel de Rooy [Thu, 13 Sep 2018 10:26:57 +0000 (12:26 +0200)]
Bug 21337: (follow-up) Add parameter for move_to_deleted action

For consistency, it would be better to make the move optional.

Test plan:
Run again t/db_dependent/Koha/Patrons.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21337: Add Koha::Patrons->delete (trivial wrapper)
Marcel de Rooy [Wed, 12 Sep 2018 13:49:45 +0000 (15:49 +0200)]
Bug 21337: Add Koha::Patrons->delete (trivial wrapper)

Adds Koha::Patrons->delete as wrapper around Koha::Patron->delete. We do
not want to bypass Koha::Patron and let DBIx do the job without further
housekeeping. A call to move_to_deleted is included now, but could be
made optional with a parameter if needed.

Test plan:
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21409: Add column configuration to course reserves
Owen Leonard [Tue, 25 Sep 2018 18:40:28 +0000 (18:40 +0000)]
Bug 21409: Add column configuration to course reserves

This patch adds columns configuration and print/export options to two
tables: The table listing courses and the table listing titles reserved
for a course.

To test you should have more than one course and multiple title reserved
for at least one course.

- Apply the patch and go to Course reserves
  - In the table of courses, confirm that all DataTables controls work
    correctly: paging, filter, column visibility, export, etc.
  - View a course with multiple titles reserved. Test all DataTables
    controls on this table too.
- Go to Administration -> Columns settings
  - Change the settings for the courses and reserves table and confirm
    that these changes are applied correctly.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15139: Add non-public item notes to overdue report
Katrin Fischer [Sat, 11 Aug 2018 18:47:23 +0000 (18:47 +0000)]
Bug 15139: Add non-public item notes to overdue report

Sometimes libraries want to see internal notes on the overdue
reports page, this patch adds the notes.

Additional fixes:
- Library column was always empty, now library displays
- Replacement price was not formatted according to CurrencyFormat

To test:
- Make sure you have some overdue issues in your system
- Circulation > Overdues report
- Make sure everything displays as it should
  - Verify internal item note shows
  - Verify price is correctly formatted (syspref CurrencyFormat)
  - Library shows
- Download list of overdues
  - Verify the new column displays

Signed-off-by: Spencer <ssmith3@mckinneytexas.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: remove the branchcode line, added on its own bug report,
see bug 21463

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21550: DataTables four button pagination uses the wrong icon for disabled buttons
Owen Leonard [Thu, 11 Oct 2018 15:59:13 +0000 (15:59 +0000)]
Bug 21550: DataTables four button pagination uses the wrong icon for disabled buttons

This patch modifies the DataTables CSS which styles "full_nubmers"
controls which are disabled: First and Previous buttons on the first
page of results, Next and Last buttons on the last page of results.
These buttons should have gray icons instead of blue.

To test, apply the patch and clear your browser cache if necessary. View
a page which uses a "full_numbers" DataTables configuration, e.g.

- Administration -> Cities
- ILL requests -> List requests
- Circulation -> Holds to pull

Confirm that buttons in their disabled state have a gray icon and text
instead of blue.

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>
6 years agoBug 21115: Add multi_param call and add divider in cache key in svc/report and opac...
Marcel de Rooy [Wed, 25 Jul 2018 12:37:59 +0000 (14:37 +0200)]
Bug 21115: Add multi_param call and add divider in cache key in svc/report and opac counterpart

Resolve things like:
CGI::param called in list context from package CGI::Compile::ROOT::usr_share_koha_prodclone_opac_svc_report line 42, this can lead to vulnerabilities. See the warning in "Fetching the value or values of a single named parameter" at /usr/share/perl5/CGI.pm line 436.

The cache key in both script looks like:
    opac:report:id:602018
but should for consistency be:
    opac:report:id:60:2018
Note: The 2018 here is part of the sql_params and should not be
concatenated to the report id.

Test plan:
Do not yet apply this patch.
Make a report public, set cache to 300 secs.
Check its output with opac/svc/report.
Check for the warn in your log.
Apply the patch, restart Plack and flush cache.
Check opac/svc/report.
Modify your report; e.g. add a simple string to the SELECT.
Check opac/svc/report. You should still see cached output.
Flush the cache.
Check opac/svc/report. You should now see the added text.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested also by clearing individual keys with $cache->clear_from_cache.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21291: (follow-up) Pass subscriptionsnumber to all tools in staff detail's sidebar
Blou [Thu, 4 Oct 2018 17:00:08 +0000 (13:00 -0400)]
Bug 21291: (follow-up) Pass subscriptionsnumber to all tools in staff detail's sidebar

The subscriptionsnumber is required in biblio-view-menu.inc to display
the Subscription(s) tab. In detail.pl, if you click any of

Labeled MARC  (you need to set the syspref viewLabeledMARC)
Hold(s)
Article requests
Checkout history
Modification log
Rota          (you need to set the syspref StockRotation)

you lose the Subscription(s) tab.

This patch fixes the display by having each feature script generate that
value to be passed to the UI. I keep this separated from the first patch
since it's not exactly the same issue, and the solution might not
please.

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>
6 years agoBug 21291: request-article.pl doesn't show MARC, LabeledMARC and ISBD in sidebar
Blou [Thu, 30 Aug 2018 14:33:44 +0000 (10:33 -0400)]
Bug 21291: request-article.pl doesn't show MARC, LabeledMARC and ISBD in sidebar

When on a detailed record in the intranet, any click on the sidebar
will lead you to another page with the same sidebar EXCEPT for "Article
requests".

When clicking on article requests, you get a new sidebar without
MARC
Labeled MARC
ISBD

This fix adds the required C4::Biblio::enabled_staff_search_views that
loads the required hash with the permissions.

TEST
0) login with a user having all rights
1) go to any detailed notices, notice the sidebar on the left
2) click on MARC
3) notice the sidebar is the same in the new page
4) click on Request articles
5) notice the missing labels on the sidebar
6) apply patch, redo steps

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>
6 years agoBug 20131: Inventory optional filters correct "For loan" addition
Fridolin Somers [Fri, 2 Feb 2018 13:34:34 +0000 (14:34 +0100)]
Bug 20131: Inventory optional filters correct "For loan" addition

In inventory, optional filters are build from authorize values categories used for items.notforloan, items.itemlost, items.withdrawn and items.damaged.

The bug is that description of value 0 is always "For loan".
This seems to be only for "notforloan".

Second bug is that if a description exists for "notforloan" value 0, it is not used.

This patch corrects by adding "For loan" only for "notforloan" authorized values and if there is no 0 value.
It changes the description added by code from "ignore" to a more unlikly user defined "__IGNORE__".

Test plan:
1) Make sure you have authorized values defined on items.notforloan, say "NFL" category, with at least a value and description but no 0 value
2) Make sure you have authorized values defined on items.itemlost, say "LOST" category, with 0 = "Not lost" and 1 = "Lost"
3) Go to inventory /cgi-bin/koha/tools/inventory.pl
4) Without patch you see "For loan" on both items.notforloan and items.itemlost
5) With patch you see "For loan" only in items.notforloan, you see for items.itemlost : "Not lost" and "Lost"
6) Create in authorized values category "NFL" a value 0 with description "Available"
7) Go to inventory /cgi-bin/koha/tools/inventory.pl
8) Without patch you see "For loan" in items.notforloan for value 0
9) With patch you see "Available" in items.notforloan for value 0

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18655: Correct the choose link in unimarc_field_210c value builder
Baptiste Wojtkowski [Tue, 23 May 2017 08:54:00 +0000 (08:54 +0000)]
Bug 18655: Correct the choose link in unimarc_field_210c value builder

- Link 'choose' is now a button.
- It doesn't call directly javascript anymore (use of listener).
- field to load stored in html on the page (less escaping needed).

Test plan :
1) Use UNIMARC catalog
2) Define unimarc_field_210c value builder on 210$c
3) Define an autority type EDITORS with heading on 200$b
4) Create an autority of this type with a single quote in heading, ie : l'avenir
5) Index this new autority
6) Edit a biblio record and launch 210$c value builder
7) Search for new autority
8) Click on 'Choose'
=> Heading should be pasted in 210$c

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21113: Corrections to patron merge confirmation prompt
Martin Renvoize [Mon, 8 Oct 2018 10:47:15 +0000 (11:47 +0100)]
Bug 21113: Corrections to patron merge confirmation prompt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21351: Rename the Taiwanese language pack to use correct file name
Margaret Hade [Fri, 21 Sep 2018 19:41:52 +0000 (12:41 -0700)]
Bug 21351: Rename the Taiwanese language pack to use correct file name

The words "Han (Simplified variant)" is appearing in the language name because the file is titled "zh-Hans-TW" when it should be titled "zh-Hant-TW". The database is set up to use "Hant" but it just incorrectly named.

Test plan
1. Apply patch.
2. Install zh-Hant-TW on your Koha server.
3. Navagate to I18N/L10N preferences and confirm that the english text description states (Traditional variant).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Files on translate.kc.org have already been fixed by Bernardo.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21537: Fix typo for options_for_item_types
Nick Clemens [Wed, 10 Oct 2018 15:02:14 +0000 (15:02 +0000)]
Bug 21537: Fix typo for options_for_item_types

To test:
 0 - Set UseACQFrameworkForBiblioRecords to 'Use'
 1 - Define a subfield in the ACQ framework linked to authorised value
 'itemtypes'
 2 - Make sure that field is visible
 3 - Create a purchase suggestion
 4 - Accept it
 5 - Go to Acquisitions
 6 - Find a vendor with an open basket, or create one
 7 - Add to the basket using a suggestion
 8 - Choose the suggestion
 9 - Internal server error
10 - Apply patch
11 - Place order form a suggestion again
12 - Confirm that the field linked to itemtypes shows correctly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21365: Call BiblioAutoLink from AddBiblio and ModBiblio
Ere Maijala [Sun, 16 Sep 2018 22:13:55 +0000 (01:13 +0300)]
Bug 21365: Call BiblioAutoLink from AddBiblio and ModBiblio

This makes e.g. the advanced MARC editor, and anything that uses AddBiblio or
ModBiblio honor BiblioAddsAuthorities.

To test:
1. Make sure BiblioAddsAuthorities and AutoCreateAuthorities preferences are enabled.
2. Add a new record using advanced editor (enable EnableAdvancedCatalogingEditor to
use it), include a previously non-existing author.
3. Save the record and observe the author get an authority number.
4. Add another author, save the record and make sure it also gets an authority number.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21279: Fix &nbsp; in transport cost matrix
Marcel de Rooy [Wed, 10 Oct 2018 11:43:40 +0000 (13:43 +0200)]
Bug 21279: Fix &nbsp; in transport cost matrix

Test plan:
On Home â€º Administration â€º Transport cost matrix you should no longer
see "&nbsp;".
Fill some values and save, you should see the correct values.

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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19687: (RM follow-up) Export correct function name
Nick Clemens [Mon, 15 Oct 2018 13:07:11 +0000 (13:07 +0000)]
Bug 19687: (RM follow-up) Export correct function name

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19687: Undefined subroutine in bulkmarcimport
David Gustafsson [Wed, 26 Sep 2018 15:25:44 +0000 (17:25 +0200)]
Bug 19687: Undefined subroutine in bulkmarcimport

Bulkmarcimport produces undefined subroutine error for
C4::Items::TransformMarcToKoha and C4::Items::GetMarcStructure
probably caused by mutually recursive modules. Put exports in
BEGIN clause before all the other imports.

To test:
1) Run bulkmarcimport.pl before applying patch and verify
that undefined subroutine error occurs
2) Apply patch
3) Run bulkmarcimport.pl again and verify that no errors are
produced

Sponsored-by: Gothenburg University Library
Signed-off-by: George Veranis <gveranis@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21320: Holds to pull should honor syspref AllowHoldsOnDamagedItems
Dobrica Pavlinusic [Thu, 6 Sep 2018 11:21:53 +0000 (13:21 +0200)]
Bug 21320: Holds to pull should honor syspref AllowHoldsOnDamagedItems

Test plan:

1. Set syspref AllowHoldsOnDamagedItems to Allow
2. Create a hold on record with item which is damaged
3. Verify that it doesn't appear in report
4. Apply patch and verify that it's now visible

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 10382: Course reserves: handle empty values
Alex Arnaud [Wed, 21 Feb 2018 13:10:50 +0000 (13:10 +0000)]
Bug 10382: Course reserves: handle empty values

Test Plan:
1) Create an item, do not set a collection code
2) Add the item to a course, and choose to set a collection code
3) Ensure the course is enabled, and the collection code is now visible
4) Disable the course, ensure the collection code is no longer visible

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 10382: Add unit tests for course items
Alex Arnaud [Thu, 9 Mar 2017 13:42:04 +0000 (13:42 +0000)]
Bug 10382: Add unit tests for course items

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 10382: collection not returning to null when removed from course reserves
Kyle M Hall [Wed, 5 Jun 2013 14:01:17 +0000 (10:01 -0400)]
Bug 10382: collection not returning to null when removed from course reserves

Test Plan:
1) Create an item, do not set a collection code
2) Add the item to a course, and choose to set a collection code
3) Ensure the course is enabled, and the collection code is now visible
4) Disable the course, ensure the collection code is no longer visible

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20797: (QA follow-up) Fix ill requests table
Katrin Fischer [Fri, 5 Oct 2018 12:18:11 +0000 (12:18 +0000)]
Bug 20797: (QA follow-up) Fix ill requests table

... by adding a missing comma.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20797: (follow-up) Conditionally link
Andrew Isherwood [Thu, 7 Jun 2018 10:14:50 +0000 (11:14 +0100)]
Bug 20797: (follow-up) Conditionally link

We don't want to display the link to the biblio if the biblio_id is null

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20797: Add link to biblio detail view from ILL detail view
Andrew Isherwood [Wed, 23 May 2018 11:26:25 +0000 (12:26 +0100)]
Bug 20797: Add link to biblio detail view from ILL detail view

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 17084: Automatic debian/control updates (unstable/master)
Mirko Tietgen [Thu, 11 Oct 2018 14:21:41 +0000 (16:21 +0200)]
Bug 17084: Automatic debian/control updates (unstable/master)

I added libwebservice-ils-perl 0.17 to the repository, so it
goes into debian/control too.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20772: (QA follow-up) 'readonly' is a boolean
Tomas Cohen Arazi [Sat, 13 Oct 2018 11:05:34 +0000 (08:05 -0300)]
Bug 20772: (QA follow-up) 'readonly' is a boolean

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20772: DBRev 18.06.00.041
Tomas Cohen Arazi [Sat, 13 Oct 2018 10:47:12 +0000 (07:47 -0300)]
Bug 20772: DBRev 18.06.00.041

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20772: (follow-up) Add unit test
Andrew Isherwood [Mon, 8 Oct 2018 16:48:39 +0000 (17:48 +0100)]
Bug 20772: (follow-up) Add unit test

Add unit test for price_paid

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20772: (QA follow-up) Add a missing html filter
Katrin Fischer [Fri, 5 Oct 2018 11:38:26 +0000 (13:38 +0200)]
Bug 20772: (QA follow-up) Add a missing html filter

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20772: (follow-up) Fix DB updates and templates
Andrew Isherwood [Fri, 5 Oct 2018 10:56:31 +0000 (11:56 +0100)]
Bug 20772: (follow-up) Fix DB updates and templates

Carry out changes requested in commenbt #27

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20772: Bug preventing backend JS execution
Barry Cannon [Tue, 24 Jul 2018 14:56:30 +0000 (15:56 +0100)]
Bug 20772: Bug preventing backend JS execution

We should be 'PROCESS'ing any backend JS, not 'INCLUDE'ing it

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20772: Display and edit of price_paid
Andrew Isherwood [Mon, 21 May 2018 09:40:59 +0000 (10:40 +0100)]
Bug 20772: Display and edit of price_paid

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20772: Return cost & price_paid in API
Andrew Isherwood [Thu, 17 May 2018 10:36:50 +0000 (11:36 +0100)]
Bug 20772: Return cost & price_paid in API

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20772: Fix malformed class name
Andrew Isherwood [Thu, 17 May 2018 10:29:49 +0000 (11:29 +0100)]
Bug 20772: Fix malformed class name

Supplier metadata elements have a dynamically formed class name, part of
the name is formed from the metadata key, this breaks if the key has a
space, so we replace spaces

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20772: Borrowernumber should be read only
Andrew Isherwood [Thu, 17 May 2018 09:58:02 +0000 (10:58 +0100)]
Bug 20772: Borrowernumber should be read only

On the Manage Request page, borrowernumber should be read only, we do
not want users modifying the destination user once a request is placed

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20772: Add 'illrequest.price_paid'
Andrew Isherwood [Thu, 17 May 2018 09:47:52 +0000 (10:47 +0100)]
Bug 20772: Add 'illrequest.price_paid'

This patch adds a 'price_paid' column to 'illrequests'

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20772: Add 'illrequestattributes.readonly'
Andrew Isherwood [Thu, 17 May 2018 08:22:03 +0000 (09:22 +0100)]
Bug 20772: Add 'illrequestattributes.readonly'

This patch adds a 'readonly' column to illrequestattributes. On a DB
upgrade it also populates all existing rows with 1, indicating 'read
only'

Signed-off-by: Barry Cannon <bc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 21178: (QA follow-up) Add a test to verify that the hash is correct
Julian Maurice [Fri, 5 Oct 2018 15:18:57 +0000 (17:18 +0200)]
Bug 21178: (QA follow-up) Add a test to verify that the hash is correct

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 21178: (QA follow-up) whitespace characters fix
Tomas Cohen Arazi [Fri, 14 Sep 2018 23:15:13 +0000 (16:15 -0700)]
Bug 21178: (QA follow-up) whitespace characters fix

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 21178: Add Koha::Patron::set_password
Tomas Cohen Arazi [Thu, 16 Aug 2018 10:13:56 +0000 (07:13 -0300)]
Bug 21178: Add Koha::Patron::set_password

This patch introduces the 'set_password' method for Koha::Patron
objects. The main point is to make password changing atomic
(update_password touches the userid on the DB, which should be done
carefully with better error handling, and it is done there only for
legacy backwards compatibility).

A follow-up bug will make the codebase use this instead of
update_password, and use a proper method for changing the userid if
required.

To test:
- Apply this patchset
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patrons.t
=> SUCCESS: Tests pass!
- Sign off! :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 21178: Unit tests
Tomas Cohen Arazi [Thu, 16 Aug 2018 10:13:36 +0000 (07:13 -0300)]
Bug 21178: Unit tests

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 21541: Use raw filter for report results
Nick Clemens [Wed, 10 Oct 2018 16:30:15 +0000 (16:30 +0000)]
Bug 21541: Use raw filter for report results

To test:
 1 - Create new report
 SELECT CONCAT('<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=',borrowernumber,'">',"",firstname,"",surname,'</a>')
 AS people
 FROM borrowers
 2 - Run this report
 3 - Note the results contain raw text, they are not hyperlinks
 4 - Apply patch
 5 - Reload the results
 6 - They should now be links

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 21464: Hide patron's title not biblio's title
Jonathan Druart [Tue, 9 Oct 2018 17:01:07 +0000 (14:01 -0300)]
Bug 21464: Hide patron's title not biblio's title

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 21464: Fix overdue list export
Jonathan Druart [Mon, 1 Oct 2018 20:18:18 +0000 (17:18 -0300)]
Bug 21464: Fix overdue list export

  commit e09ed656af5f75a82ccfa29318081e217618c32d
  Bug 18403: Only display libraries from group in dropdown lists
and
  commit 0ab22e1c7c6b6e8d14a4fb7478ab2a3d42da347d
  Bug 18789: Send Koha::Patron object to the templates

broke the overdue list export.

Test plan:
Create some overdues
Export them: "Home â€º Circulation â€º Overdues" then click the link on top
of the table.
All the different columns of the generated CSV file must be filled
correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 20260: Use CodeMirror for the SQL reports editor
Owen Leonard [Wed, 10 Oct 2018 16:44:10 +0000 (16:44 +0000)]
Bug 20260: Use CodeMirror for the SQL reports editor

This patch adds CodeMirror syntax highlighting to the SQL reports
editor. Newly added is a file containing the sql-specific syntax
highlighting code, in both compressed and uncompressed versions.

Unrelated changes:

 - Some JavaScript has been moved from inside the body of the page to
   the footer.
 - Paths to some assets have been corrected to no use relative paths.

To test, apply the patch and go to Reports -> Saved SQL reports

- Edit an existing report and confirm that the SQL is correctly
  highlighted and that there are no display problems when editing.
- Confirm that changes are saved successfully.
- Perform the same test when creating a new SQL report.
- View an existing report and confirm that the SQL is syntax-highlighted
  but is read-only.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 21479: Remove the trace if the node does not exist
Jonathan Druart [Fri, 12 Oct 2018 18:37:44 +0000 (15:37 -0300)]
Bug 21479: Remove the trace if the node does not exist

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 21479: Add regression tests
Jonathan Druart [Tue, 9 Oct 2018 16:30:54 +0000 (13:30 -0300)]
Bug 21479: Add regression tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 21479: Fix remove from cart links at the OPAC (should remove only 1)
Owen Leonard [Wed, 3 Oct 2018 14:13:49 +0000 (14:13 +0000)]
Bug 21479: Fix remove from cart links at the OPAC (should remove only 1)

This patch changes the way biblionumbers are passed to the cart script
for adding and removing single items. The title's biblionumber is now
stored in a data-attribute on the links for adding and removing. This
should be a more robust, unified way to handle these single-item
operations.

To test, apply the patch and enable the opacbookbag system preference.

Test adding and removing items from the cart from various pages using
various methods:

 - By clicking an "Add to your cart" / "Remove" link in search results
 - By clicking an "Add to your cart" / "Remove" link on a detail page
 - By checking boxes in search results and adding via the dropdown

Each operation should work correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 21553: Remove JS error on the Rota view
Jonathan Druart [Fri, 12 Oct 2018 14:18:17 +0000 (11:18 -0300)]
Bug 21553: Remove JS error on the Rota view

JS error was:
 ReferenceError: _ is not defined

The strings after staff-global.js (for the function _)

Test plan:
Turn on StockRotation system preference

1) Go to a staff detail page
2) Switch to rota page
3) Check web developer tools

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 21536: t/Koha_ExternalContent_RecordedBooks.t skips more tests than scheduled
Mirko Tietgen [Wed, 10 Oct 2018 14:17:17 +0000 (16:17 +0200)]
Bug 21536: t/Koha_ExternalContent_RecordedBooks.t skips more tests than scheduled

t/Koha_ExternalContent_RecordedBooks.t skips more tests than scheduled
if WebService::ILS is not available.

Test plan:
- have a system without Webservice::ILS available
- in koha-shell, do
  prove t/Koha_ExternalContent_RecordedBooks.t
- tests should be skipped and tests count as "passed"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 years agoBug 11897: Add mising semi-colon to user*.sql
Jonathan Druart [Tue, 9 Oct 2018 17:11:28 +0000 (14:11 -0300)]
Bug 11897: Add mising semi-colon to user*.sql

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11897: (follow-up) Add Stock Rotation atomic update schema
Jonathan Druart [Tue, 9 Oct 2018 17:08:33 +0000 (14:08 -0300)]
Bug 11897: (follow-up) Add Stock Rotation atomic update schema

Remove the duplicate entry for RoutingListAddReserves
I guess it has been caused by a bad merge resolution conflict

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 7143: (follow-up) remove trailing apostrophe
Nick Clemens [Tue, 9 Oct 2018 16:12:59 +0000 (16:12 +0000)]
Bug 7143: (follow-up) remove trailing apostrophe

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11897: Add Boolean handling to dbic classes.
Martin Renvoize [Tue, 4 Sep 2018 13:34:14 +0000 (14:34 +0100)]
Bug 11897: Add Boolean handling to dbic classes.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11897: DBIX::Class::Ordered in Stockrotationstage.
Alex Sassmannshausen [Fri, 9 Dec 2016 08:47:02 +0000 (09:47 +0100)]
Bug 11897: DBIX::Class::Ordered in Stockrotationstage.

* Koha/Schema/Result/Stockrotationstage.pm: Load `Ordered`, add
  grouping_column.

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11897: DBRev 18.06.00.040
Nick Clemens [Tue, 9 Oct 2018 15:51:34 +0000 (15:51 +0000)]
Bug 11897: DBRev 18.06.00.040

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11897: (QA follow-up) Convert atomic update to perl
Martin Renvoize [Tue, 9 Oct 2018 14:03:23 +0000 (15:03 +0100)]
Bug 11897: (QA follow-up) Convert atomic update to perl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11897: Translatability and wrong escaping fix
Tomas Cohen Arazi [Fri, 5 Oct 2018 14:34:42 +0000 (11:34 -0300)]
Bug 11897: Translatability and wrong escaping fix

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>
6 years agoBug 11897: (QA follow-up) Move menu to 'Catalog'
Martin Renvoize [Fri, 5 Oct 2018 14:15:25 +0000 (15:15 +0100)]
Bug 11897: (QA follow-up) Move menu to 'Catalog'

Originally this menu item was placed under the 'Patrons' section of the
tools page, this patch moves it to the more appropriate 'Catalog'
section.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11897: (QA follow-up) Update of tools-menu.js
Martin Renvoize [Fri, 5 Oct 2018 14:05:22 +0000 (15:05 +0100)]
Bug 11897: (QA follow-up) Update of tools-menu.js

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11897: (QA follow-up) Fixes for JS12
Martin Renvoize [Fri, 5 Oct 2018 13:43:41 +0000 (14:43 +0100)]
Bug 11897: (QA follow-up) Fixes for JS12

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11897: 'superlibrarian' has 'stockrotation' perms
Tomas Cohen Arazi [Fri, 5 Oct 2018 12:44:15 +0000 (09:44 -0300)]
Bug 11897: 'superlibrarian' has 'stockrotation' perms

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>
6 years agoBug 11897: (QA follow-up) Template filter fixes
Tomas Cohen Arazi [Thu, 4 Oct 2018 19:44:50 +0000 (16:44 -0300)]
Bug 11897: (QA follow-up) Template filter fixes

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>
6 years agoBug 11897: Add sample notices for all languages
Tomas Cohen Arazi [Thu, 4 Oct 2018 19:44:06 +0000 (16:44 -0300)]
Bug 11897: Add sample notices for all languages

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>
6 years agoBug 11897: Use 'stockrotation' permission for the endpoint
Tomas Cohen Arazi [Thu, 4 Oct 2018 17:24:16 +0000 (14:24 -0300)]
Bug 11897: Use 'stockrotation' permission for the endpoint

This patch makes the tests for 'authorized' session use the
'stockrotation' permission instead of 'superlibrarian'.

The path x-koha-permission is fixed accordingly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11897: (QA follow-up) Fix tests
Tomas Cohen Arazi [Thu, 4 Oct 2018 17:08:05 +0000 (14:08 -0300)]
Bug 11897: (QA follow-up) Fix tests

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>
6 years agoBug 11897: (QA follow-up) Remove rebase leftover
Tomas Cohen Arazi [Thu, 4 Oct 2018 16:45:15 +0000 (13:45 -0300)]
Bug 11897: (QA follow-up) Remove rebase leftover

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>
6 years agoBug 11897: Stockrotation
Martin Renvoize [Mon, 1 Oct 2018 16:46:40 +0000 (17:46 +0100)]
Bug 11897: Stockrotation

The stock rotation feature adds a batch process to automate rotation of
catalgue items with a staff client page under tools to manage rotas/schedules.

Once a rota is configured, and your staff user has the right permissions
to allocate items, then an additional tab will appear on biblio records
allowing the management of of which rota, if any, individual items belong to.

It also includes a cron script to process the items on a daily basis.

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: I removed a temporary file

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 11897: Add Stock Rotation atomic update schema.
Alex Sassmannshausen [Mon, 17 Oct 2016 16:20:44 +0000 (18:20 +0200)]
Bug 11897: Add Stock Rotation atomic update schema.

* installer/data/mysql/atomicupdate/stockrot_tables.sql: New file.
* installer/data/mysql/kohastructure.sql (stockrotationrotas)
  (stockrotationstages, stockrotationitems): New tables.
* installer/data/mysql/sysprefs.sql: Add Stockrotation sysprefs.
* installer/data/mysql/userflags.sql: Add Stockrotaiton userflag.
* installer/data/mysql/userpermissions.sql: Add Stockrotation
  userpermissions.
* koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref:
  Add Stockrotation menu.

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15734: Use To.json to filter audio alerts
Jonathan Druart [Tue, 9 Oct 2018 13:47:11 +0000 (10:47 -0300)]
Bug 15734: Use To.json to filter audio alerts

Test Plan:
1) Enable audio alerts
2) Note audio alerts don't work
3) Apply this patch
4) Note audio alerts now work

Use complex selectors to test:
  #circ_returns p.problem:contains('Not checked out.')
  #doc3 > #bd

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>
6 years agoBug 15520: DBRev 18.06.00.039
Nick Clemens [Tue, 9 Oct 2018 12:55:05 +0000 (12:55 +0000)]
Bug 15520: DBRev 18.06.00.039

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15520: (QA follow-up) Fix renaming of circ rules permission
Josef Moravec [Mon, 1 Oct 2018 20:15:21 +0000 (20:15 +0000)]
Bug 15520: (QA follow-up) Fix renaming of circ rules permission

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15520: Rename permission to manage_circ_rules_from_any_libraries
Jonathan Druart [Mon, 23 Jul 2018 22:11:59 +0000 (19:11 -0300)]
Bug 15520: Rename permission to manage_circ_rules_from_any_libraries

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15520: Add permission to restrict circ rules editing to own library
Jesse Weaver [Thu, 31 Aug 2017 23:02:42 +0000 (17:02 -0600)]
Bug 15520: Add permission to restrict circ rules editing to own library

Test plan:

1) Ensure that you have four users:
 a) A superlibrarian
 b) A user with all `parameters` permissions (the toplevel `parameters`
    box is checked).
 c) A user with the `manage_circ_rules` permission (and, of course,
    `catalogue`).
 d) A user with the `manage_circ_rules`, `manage_circ_rules_restricted`
    and `catalogue` permissions.
2) As all four users, load the "Circulation and fine rules"
   administration page (admin/smart-rules.pl).
3) The page should be unchanged for the first three users. It should be
   possible to view and edit the circ rules for all libraries.
4) The last (restricted) user should only be able to view and edit the
   circ rules for their own library.

Amended by JD: In a second version of this patch
manage_circ_rules_restricted has been replaced by
manage_circ_rules_from_any_libraries and 'no_inherit' related code has
been removed

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19625: Enable Shibboleth auto-provisioning for Plack
Matthias Meusburger [Wed, 15 Nov 2017 10:50:27 +0000 (10:50 +0000)]
Bug 19625: Enable Shibboleth auto-provisioning for Plack

Test plan:
1. In $KOHA_CONF, check that //shibboleth/autocreate is set to 1
2. Find a user in Shibboleth that is not in Koha (or remove it from
   Koha)
3. Login with that user
4. Verify that the userid is not set correctly in Koha database
5. Apply the patch (restart starman)
6. Repeat steps 2 and 3
7. Verify that the userid is set correctly and the other
mapped fields if there are some

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17776: (QA follow-up) Remove shibboleth package variables
Marcel de Rooy [Fri, 5 Oct 2018 08:19:14 +0000 (10:19 +0200)]
Bug 17776: (QA follow-up) Remove shibboleth package variables

This is about $shib and $shib_login.
We move in the right direction by calling get_login_shib in
get_template_and_user and checkauth. In the same line we can do the
shib_ok check at that time (just checking cached values). This paves
the way for the third subroutine using the two package vars: checkpw.
Note that checkpw is also called outside Auth.pm. So I would be more
comfortable if we do the same calls like in checkauth and remove both
variables from the package level (especially under Plack of course).

The former changes actually justify a 'use C4::Auth_with_shibboleth'
instead of the current require and import.

Note: When calling checkpw from checkauth, we are calling get_login_shib
twice now. But the time involved for doing so is around zero (cache), so
not really an argument for extra parameters and complexer code.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17776: (QA follow-up) Consistent regex for Plack detection
Marcel de Rooy [Fri, 5 Oct 2018 08:25:43 +0000 (10:25 +0200)]
Bug 17776: (QA follow-up) Consistent regex for Plack detection

Synchronizing:
C4/Auth_with_shibboleth.pm:    if ( any { /(^psgi|^plack)/i } keys %ENV ) {
Koha/AuthUtils.pm:    if ( ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) && $ENV{SCRIPT_NAME} =~ m,^/(intranet|opac)(.*), ) {
about.pl:if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) {

Actually we should move it to a subroutine. New report please.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17776: (follow-up) Add note about NativeSPSpoofChecking
Martin Renvoize [Fri, 28 Sep 2018 12:31:13 +0000 (13:31 +0100)]
Bug 17776: (follow-up) Add note about NativeSPSpoofChecking

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended the text a bit:
Hopefully, an uppercase important attracts slightly more attention :)
Added the bug number too.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 17776: Enable Shibboleth for Plack
Martin Renvoize [Thu, 2 Mar 2017 16:40:11 +0000 (16:40 +0000)]
Bug 17776: Enable Shibboleth for Plack

https://bugs.koha-community.org/show_bug.cgi?id=17776

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21426: Handle USE_MEMCACHED=no in koha-create
Jonathan Druart [Sat, 29 Sep 2018 18:16:46 +0000 (15:16 -0300)]
Bug 21426: Handle USE_MEMCACHED=no in koha-create

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Works as intended. I've set USE_MEMCACHED to "no" and created a new
Koha instance. Home > About now reports this information: Memcached:
Servers: undefined | Namespace: undefined | Status: unknown | Config
read from: Nowhere [...] | Effective caching method: Cache::Memory

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>