]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 15492: Add KOHA_VERSION to included .css and .js
Tomas Cohen Arazi [Wed, 21 Feb 2018 20:11:59 +0000 (17:11 -0300)]
Bug 15492: Add KOHA_VERSION to included .css and .js

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15492: Display nicer message on data corruption
Tomas Cohen Arazi [Wed, 27 Dec 2017 15:45:16 +0000 (12:45 -0300)]
Bug 15492: Display nicer message on data corruption

This patch hides scary messages and changes the wording for a more
idiomatic approach. Thanks to Nick :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15492: Make SCI use its own sysprefs and CSS file
Tomas Cohen Arazi [Wed, 27 Dec 2017 15:32:11 +0000 (12:32 -0300)]
Bug 15492: Make SCI use its own sysprefs and CSS file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15492: Make existing code aware of new self_check* permissions
Tomas Cohen Arazi [Wed, 27 Dec 2017 15:29:29 +0000 (12:29 -0300)]
Bug 15492: Make existing code aware of new self_check* permissions

This patch makes the existing code for SCO use the new permissions schema
for self check modules. Specifically addresses this change:

  circulate  => self_checkout
becomes
  slef_check => self_checkout_module

about.pl checks are dejusted too.

get_template_and_user gets refactored to avoid code duplication and the
conditions are adjusted for the new permissions.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15492: New sysprefs and permissions
Tomas Cohen Arazi [Wed, 27 Dec 2017 15:24:36 +0000 (12:24 -0300)]
Bug 15492: New sysprefs and permissions

In order to make this module unrelated to the SCO module, this
patch introduces the following sysprefs:

- SelfCheckInMainUserBlock
- SelfCheckInModuleUserID
- SelfCheckInTimeout
- SelfCheckInUserCSS
- SelfCheckInUserJS

It also adds a new user flag and sub-permission:

- self_check => self_checkin_module

and moves the circulate => self_checkout permission into

- self_check => self_checkout_module

Descriptions are adjusted accordingly.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15492: (QA follow-up) Reset SCI if idle for 30 seconds
Kyle M Hall [Thu, 21 Dec 2017 17:59:13 +0000 (12:59 -0500)]
Bug 15492: (QA follow-up) Reset SCI if idle for 30 seconds

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15492: Add SCI module
Tomas Cohen Arazi [Fri, 10 Nov 2017 18:32:43 +0000 (15:32 -0300)]
Bug 15492: Add SCI module

This patch adds the SCI module, and adapts C4::Auth to know about it.

The current behaviour is:
- Requires admin user initialization/login
- Uses the logged users' library
- A form allows to scan multiple barcodes
- A button sends the barcode list to the controller
  to batch perform the checkins
- Successful and failed checkins are sent to the template
- Results are displayed
- Logout link

To test:
- Apply this patches
- Make sure you upgrade:
  $ kshell
 k$ perl installer/data/mysql/updatedatabase.pl
- Have 'SelfCheckInModule' disabled
- Go to http://kohadev.myDNSname.org:8080/cgi-bin/koha/sci/sci-main.pl [1]
=> SUCCESS: You are rejected because the feature is disabled
- Enable 'SelfCheckInModule'
- Go to the previous URL
=> SUCCESS: You are required to login
- Login with a user WITHOUT self_checkout permissions
=> SUCCESS: You are not allowed to log into the Self check-in module.
- Login with a user WITH self_checkour permissions
=> SUCCESS: You gain access, and are presented the UI
- Go through the several options
=> SUCCESS: All works as it should
- Click the 'Help' link
=> SUCCESS: A help text is displayed on a modal
- Sign off :-D

- Bonus points:
  $ kshell
 k$ qa -c 2 -v 2
=> SUCCESS: All tests green

[1] Adjust to your dev's OPAC setup

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 15492: Add the SelfCheckInModule syspref
Tomas Cohen Arazi [Fri, 10 Nov 2017 18:12:56 +0000 (15:12 -0300)]
Bug 15492: Add the SelfCheckInModule syspref

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20081: Set inline headers for uploaded pdfs
Nick Clemens [Tue, 23 Jan 2018 20:21:57 +0000 (20:21 +0000)]
Bug 20081: Set inline headers for uploaded pdfs

To test:
1 - Edit a framework and add the 'upload/pl' plugin to the 856 field
2 - Attach a pdf to one record
3 - Attach a different type of file to another
(To attach, edit a record in the framework edited above and find the
 helper by the 856 field)
4 - Click the links on the record
5 - Verify the pdf opens inline
6 - Verify the other file does not
7 - prove t/db_dependent/Upload.t

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19957: Allow continued editing of report after saving
Nick Clemens [Thu, 11 Jan 2018 18:19:33 +0000 (18:19 +0000)]
Bug 19957: Allow continued editing of report after saving

To test:
 1 - Edit or create a report
 2 - Save it
 3 - Note the report is saved but you can't keep editing
 4 - Clicking 'Edit' returns you to editing
 5 - Apply patch
 6 - Save report
 7 - Note success message remains, but report is still open for editing
 8 - Note when you click the saved/updated message dissappears
 9 - Try again after inserting erros into report (No Select, bad
        authorised value, etc.)
10 - Note errors stil display as expected
11 - Verify message works on update of existing report and save of new
      new report

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Joubu: amended patch to fix alignment

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18797: Create the biblioitem entry
Jonathan Druart [Mon, 26 Mar 2018 20:10:26 +0000 (17:10 -0300)]
Bug 18797: Create the biblioitem entry

We need that since bug 19943

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18797: Make rollingloans test useful
Mark Tompsett [Sat, 17 Mar 2018 02:24:41 +0000 (02:24 +0000)]
Bug 18797: Make rollingloans test useful

TEST PLAN
---------
1) Run the following commands on a kohadevbox:
    kshell
    prove -v t/db_dependent/rollingloans.t
    exit
   -- all the tests were skipped, not useful!
2) Apply this patch
3) Redo step 1
   -- all the tests run
4) Run qa test tools

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19584: Check compare barcodes box when uploading barcodes
Marcel de Rooy [Tue, 7 Nov 2017 14:29:56 +0000 (15:29 +0100)]
Bug 19584: Check compare barcodes box when uploading barcodes

This patch makes two trivial changes in the inventory interface:

[1] If you have uploaded a barcode file, the compare barcodes checkbox is
automatically checked. In most cases this will be the option the user wants.
The compare will report missed items on the shelf.
[2] If the compare barcodes checkbox is checked, the Skip items on loan-
checkbox is automatically checked. This again is often desirable. If you
compare, you normally are not interested in seeing items reported missing
while they are checked out.

Test plan:
[1] Upload a barcode file on inventory. Is the compare checked?
[2] Toggle compare. Does 'skip items on loan' change accordingly?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Grace Smyth <gracesmythh@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19584: Replace label Status by Not for loan
Marcel de Rooy [Tue, 7 Nov 2017 14:07:42 +0000 (15:07 +0100)]
Bug 19584: Replace label Status by Not for loan

Status does not tell me that this is the Not for loan column.
Trivial edit.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Grace Smyth <gracesmythh@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19955: Minor grammatical correction
Charles Farmer [Fri, 19 Jan 2018 21:04:19 +0000 (16:04 -0500)]
Bug 19955: Minor grammatical correction

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19955: Add ability to process only one 'type' of message ( sms, email, etc )...
Kyle M Hall [Thu, 11 Jan 2018 18:00:31 +0000 (13:00 -0500)]
Bug 19955: Add ability to process only one 'type' of message ( sms, email, etc ) for a given run of process_message_queue.pl

It would be nice to allow emails to be sent overnight, but limit the sending of SMS messages to hours when people are awake. Adding a type limit to process_message_queue.pl would allow this to be accomplished easily.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20267: Add basic .gitignore
Julian Maurice [Thu, 22 Feb 2018 09:51:27 +0000 (10:51 +0100)]
Bug 20267: Add basic .gitignore

Ignore files generated by ExtUtils::MakeMaker

NOTE: Limited scope does not affect files created
      by translation utilities

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19708: Improve code for printing the cart in OPAC
David Bourgault [Tue, 28 Nov 2017 16:23:01 +0000 (11:23 -0500)]
Bug 19708: Improve code for printing the cart in OPAC

This removes a lot of useless code relating to the print function from opac-basket.tt, opac-basket.pl and opac/basket.js.

It also fixes the CSS so that no extra blank page is printed.

To test:
0) Add an item to your cart
1) Print your basket
    Note the appearance of the page. There will be an extra blank page.
2) Apply patch
3) Reload basket
4) Print your basket
    The appearce should be identical. The extra blank page is gone.

This only affects the OPAC.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: claude <claude.brayer@cea.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 12020: Allow translating label-edit-batch hardcoded strings
Pasi Kallinen [Mon, 12 Mar 2018 11:20:06 +0000 (13:20 +0200)]
Bug 12020: Allow translating label-edit-batch hardcoded strings

Move the hardcoded error strings in the batch label edit into the template,
so they can be translated.

Test plan:
1) Apply patch
2) Go to Home -> Tools -> Label edit
3) Create a new batch with some items in it
4) Try to trigger any of the errors, check that the error
   messages look correct
5) Update a language xx-YY
5) Check that the error messages show up in xx-YY-staff-prog.po

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Changed branch to library in one of the error messages.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20433: Remove unused Mozilla Persona image file
Owen Leonard [Fri, 16 Mar 2018 10:30:30 +0000 (10:30 +0000)]
Bug 20433: Remove unused Mozilla Persona image file

This patch removes an unused image file from the OPAC which was added
when we added Mozilla Persona authentication but wasn't removed when
Mozilla Persona went away.

To test, apply the patch and confirm that the image no longer exists:

koha-tmpl/opac-tmpl/bootstrap/images/sign_in_green.png

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20111: i18nize units in Patron card creator
Victor Grousset [Wed, 14 Feb 2018 10:25:34 +0000 (11:25 +0100)]
Bug 20111: i18nize units in Patron card creator

Test plan:
1. install and switch to the fr_FR locale
     or another one and adapt the test plan accordingly
2. go to /cgi-bin/koha/patroncards/edit-template.pl?op=new
3. then you should see the "Unités" dropdown with english units
4. apply this patch
5. install the language
6. refresh the page
7. then you should see the "Unités" dropdown with french units

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20111: Coding style: Fix indentation before doing actual change
Victor Grousset [Tue, 13 Feb 2018 13:27:23 +0000 (14:27 +0100)]
Bug 20111: Coding style: Fix indentation before doing actual change

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19522: i18n Label creator: wrap text with <span>
Victor Grousset [Mon, 5 Mar 2018 10:47:25 +0000 (11:47 +0100)]
Bug 19522: i18n Label creator: wrap text with <span>

In a SWITCH CASE.
To avoid pollution and duplication in the .po files.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19522: Label creator: Batches: make "Export Labels" translatable
Victor Grousset [Fri, 2 Mar 2018 13:00:04 +0000 (14:00 +0100)]
Bug 19522: Label creator: Batches: make "Export Labels" translatable

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19522: Label creator: edit batch: make "Export label" translatable
Victor Grousset [Fri, 27 Oct 2017 13:24:52 +0000 (15:24 +0200)]
Bug 19522: Label creator: edit batch: make "Export label" translatable

Test plan:
1. install the fr_FR locale
2. go to /cgi-bin/koha/labels/label-manage.pl?label_element=batch
3. create a batch if there is none
4. edit that batch
5. Switch the language to French if you haven't done it yet
6. click on "Exporter le lot entier"
7. then you should see "Export labels"
8. apply this patch
9. install the language
10. replay steps 2 to 6
11. then you should see "Exporter des étiquettes"

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19522: Label creator: edit batch: make Call number translatable
Victor Grousset [Fri, 27 Oct 2017 09:51:21 +0000 (11:51 +0200)]
Bug 19522: Label creator: edit batch: make Call number translatable

Test plan:
1. install the fr_FR locale
2. go to /cgi-bin/koha/labels/label-manage.pl?label_element=batch
3. create a batch if there is none
4. edit that batch
5. then you should see "Call number" in the column names
6. apply this patch
7. install the fr_FR locale
8. refresh the page
9. then you should see "Cote" in the column names

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19522: Label creator: translate empty list message
Victor Grousset [Thu, 26 Oct 2017 13:56:54 +0000 (15:56 +0200)]
Bug 19522: Label creator: translate empty list message

The name of the element wasn't translated in the message.

Test plan:
1. install the fr_FR locale
2. go to /cgi-bin/koha/labels/label-manage.pl?label_element=batch
3. ensure that the list is empty
4. then you should see "pas de Batches actuellement"
5. then you should see "créer un nouveau batch."
6. apply this patch
7. install the language
8. refresh the page
9. then you should see "pas de Lots actuellement"
10. then you should see "créer un nouveau lot ."

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19522: Coding style: Replace tabs with spaces
Victor Grousset [Wed, 25 Oct 2017 15:17:21 +0000 (17:17 +0200)]
Bug 19522: Coding style: Replace tabs with spaces

In Label creator: Templates: new/edit form

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19522: Label creator - some strings are not translatable
Victor Grousset [Wed, 25 Oct 2017 13:22:11 +0000 (15:22 +0200)]
Bug 19522: Label creator - some strings are not translatable

Templates: new form:
Add hardcoded unit names to make them translatable.

Test plan:
1. install the fr_FR locale
2. go to /cgi-bin/koha/labels/label-edit-template.pl?op=new
3. then you should see the "Unités" dropdown with english units
4. apply this patch
5. install the language
6. refresh the page
7. then you should see the "Unités" dropdown with french units

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19522: Coding style: Fix alignement after previous patch
Victor Grousset [Wed, 25 Oct 2017 10:07:43 +0000 (12:07 +0200)]
Bug 19522: Coding style: Fix alignement after previous patch

Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20422: Fix warning on uri_escape_utf8 in Output.pm
Marcel de Rooy [Thu, 15 Mar 2018 11:37:11 +0000 (12:37 +0100)]
Bug 20422: Fix warning on uri_escape_utf8 in Output.pm

When opac-details calls parametrized_url, it triggers an uninitialized
warning when you would have a record without e.g. author, like:
    Use of uninitialized value in subroutine entry at /usr/share/perl5/URI/Escape.pm line 184.

This is (imo) actually a bug in URI::Escape; it should check its args.
But we resolve the warning here by adding the "// q{}" in parametrized_url.

NOTE: Along the way we do something similar in the arrParamsBusc loop.
If the variable is undefined, jump to the next one. (Consistent with the
approach in the if-part preceding it.)

Test plan:
[1] Run t/Output.t again. Should pass now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20422: Add unit test to Output.t for parametrized_url
Marcel de Rooy [Thu, 15 Mar 2018 13:07:11 +0000 (14:07 +0100)]
Bug 20422: Add unit test to Output.t for parametrized_url

This test will reveal that we need to resolve a warning too.

Test plan:
[1] Run t/Output.t without the second patch.
[2] The test will fail on the warning raised by an undefined value.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20298: Fix SMS characters counter when TranslateNotices is set
Jonathan Druart [Wed, 28 Feb 2018 17:26:06 +0000 (14:26 -0300)]
Bug 20298: Fix SMS characters counter when TranslateNotices is set

If you have multiple languages installed, the notices and slips page
uses the same HTML id multiple times, once for each language. This
prevents eg. the SMS character count javascript from working, because
each of the textareas has the same id.

Test plan:
Test the sms characters counter, with and without TranslateNotices
Make sure other features on this page still work correctly

QA: Make sure this change of id did not break something else.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19467: Display description instead of code for itemtype and location
Jonathan Druart [Sat, 17 Feb 2018 21:48:50 +0000 (18:48 -0300)]
Bug 19467: Display description instead of code for itemtype and location

On reports/itemslost.pl you must now see the descriptions instead of the
code for itemtype and location

Signed-off-by: delaye <stephane.delaye@biblibre.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20461: Serials: fix ignored params in subscription creation form
Victor Grousset [Thu, 22 Mar 2018 14:44:00 +0000 (15:44 +0100)]
Bug 20461: Serials: fix ignored params in subscription creation form

In subscription-add.pl, the two params aren't passed to
NewSubscription() but they are to ModSubscription()

== Test plan ==
1. Enable syspref "makePreviousSerialAvailable"
2. Create a minimal subscription with a value in the "Item type" and
     "item type for older issues" fields.
3. Edit the subscription
4. You should see that the two fields are empty. This is the bug.
5. Apply this patch
6. Do step 2 and 3
7. You should see that the two fields have the right value
8. Express the joy of a successful and easy sign off.
   (this is important, otherwise the sign off spell won't work!)

Signed-off-by: delaye <stephane.delaye@biblibre.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20438: Allow uninstalling plugins not implementing the 'uninstall' method
Tomas Cohen Arazi [Fri, 16 Mar 2018 18:18:15 +0000 (15:18 -0300)]
Bug 20438: Allow uninstalling plugins not implementing the 'uninstall' method

The plugins handling code expects plugins implementing an 'uninstall' method for
cleanup purposes. It executes this method, and then moves on with removing the
configuration entries in the storage, and the plugin itself.

But the 'plugins-home.tt' template makes the tool display the 'Uninstall'
link in the dropdown ONLY when the plugin has the 'uninstall' method.

This patch fixes the issue.

To reproduce:
- Install the KitchenSink plugin [1]
=> SUCCESS: The 'actions' dropdown for KitchenSink shows an 'Uninstall' option
- Edit the code for the plugin:
  $ sudo vim /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm
- Remove the uninstall sub
- Restart everything:
  $ restart_all
- Reload the browser
=> FAIL: There's no 'Uninstall' option in the actions dropdown.
- Apply this patch
- Restart everything
  $ restart_all
- Reload the browser
=> SUCCESS: The 'actions' dropdown for KitchenSink shows an 'Uninstall' option
- Sign off :-D

[1] https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20420: Remove unnecessary [% KOHA_VERSION %] from OPAC third-party sources
Owen Leonard [Thu, 15 Mar 2018 10:34:26 +0000 (10:34 +0000)]
Bug 20420: Remove unnecessary [% KOHA_VERSION %] from OPAC third-party sources

This patch removes [% KOHA_VERSION %] from the <script> tag for some
third-party JavaScript sources. [% KOHA_VERSION %] should only be used
for Koha's JS resources.

To test, apply the patch and enable the SocialNetworks and
NovelistSelect* preferences.

In the OPAC, view the detail page for a bibliographic record. In the
right-hand sidebar you should see social network icons for Google+ and
Twitter. Clicking either of them should trigger a sharing popup window.

If you have Novelist credentials and can enable the feature for the OPAC
you should see Novelist content in the place specified in your
preferences.

If you don't have Novelist credentials, put some random text in the
NovelistSelectProfile system preference. Looking at the detail page in
the OPAC, view source. You should see a link to Novelist JS around line
1020 of the source. Clicking the link should show JavaScript. This
confirms that the path is correct, thus the bug has been fixed.

Note: The QA tool will complain that [% KOHA_VERSION %] is missing. This
is a false positive.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20459: Correct message for cancelling an article request
Marcel de Rooy [Thu, 22 Mar 2018 09:36:00 +0000 (10:36 +0100)]
Bug 20459: Correct message for cancelling an article request

We should not ask for 'cancel this hold'. Remove corresponding TODO.

Fix qa warning on old bootstrap style:
    btn btn-mini => btn btn-default btn-xs
I removed above change, qa tool complaint is wrong (refers to staff, we
        are on opac)

Test plan:
Create an article request and cancel it on opac-user.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20067: Fix other checks for linked authorised value categories
Katrin Fischer [Fri, 23 Feb 2018 13:29:48 +0000 (14:29 +0100)]
Bug 20067: Fix other checks for linked authorised value categories

The same pattern was used in other files, this patch fixes it.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20067: Fix false display of authorised value for materials on staff detail page
Katrin Fischer [Fri, 23 Feb 2018 13:20:17 +0000 (14:20 +0100)]
Bug 20067: Fix false display of authorised value for materials on staff detail page

Koha didn't check for a linked authorised value category for
Koha didn't check for a linked authorised value category for
items.materials correctly which led to displaying false information
on the detail page.

To test:
- before applying the patch:
- make sure sample data and configuration is loaded
- edit any item
- write 2 in the $3 materials specificed
- check the details page normal view - it will display 'restocking'
- apply patch
- check display, it should now show "2"
- link 952$3 (MARC21) to ORDER_CANCELLATION_REASON
- check display again, it should now show 'restocking'

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20085: Better translatability of smart-rules.tt
Fridolin Somers [Wed, 24 Jan 2018 13:23:30 +0000 (14:23 +0100)]
Bug 20085: Better translatability of smart-rules.tt

Template smart-rules.tt in administration contains some if/elsif/else with translatable strings.
For example :
[% IF rule.onshelfholds == 1 %]
    Yes
[% ELSIF rule.onshelfholds == 2 %]
    If all unavailable
[% ELSE %]
    If any unavailable
[% END %]

Adding span to translatable strings will allow to have the same translation than :

<select name="onshelfholds" id="onshelfholds">
    <option value="1">Yes</option>
    <option value="0">If any unavailable</option>
    <option value="2">If all unavailable</option>
</select>

This is important to allow editing an existing circulation and fine rule.

Actually for example in french some strings are translated differently :
msgid "%s Yes %s If all unavailable %s If any unavailable %s"
msgstr "%s Oui %s Si tous indisponibles %s Si aucun indisponible %s"

msgid "If any unavailable"
msgstr "Si au moins un exemplaire est indisponible"

Test plan :
1) Look at PO files, for example fr-FR and see there is :
msgid "%s Yes %s If all unavailable %s If any unavailable %s"
msgid "If any unavailable"
2) Apply patch
3) update PO files
4) Look at PO files, for example fr-FR and see there is now only :
msgid "If any unavailable"
5) Install translation
6) Go to Administration > Circulation and fine rule
7) Check that when editing an existing rule, edition comboboxes are set on the correct value
8) Create a default holds policy by item type and check that correct values are displayed in table

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20299: Koha is a gift
Owen Leonard [Fri, 23 Mar 2018 13:02:29 +0000 (13:02 +0000)]
Bug 20299: Koha is a gift

This patch updates the database update script replacing the "pile of
poo" emoji with the "wrapped gift" emoji.

To test, apply the patch and go to Administration -> System preferences
-> Local use. Set the "Version" preference back to trigger a database
update. Go through the database update process and confirm that the
"Convert DB tables to utf8mb4" upgrade message includes a gift emoji.

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18593: Move suggestions when bibliographic records are merged
Jonathan Druart [Tue, 2 Jan 2018 18:42:12 +0000 (15:42 -0300)]
Bug 18593: Move suggestions when bibliographic records are merged

When bibliographic records are merged, the suggestions.biblionumber
field should be replaced with the new record.
Ideally we should have kept an history of the merges, to know what was
the original record. Now we cannot fix the broken links.

Test plan:
1) Create a suggestion in OPAC
2) Accept the suggestion in staff
3) Add order from this suggestion
4) Go to cataloguing search and search for the record and another
5) Merge the suggestion record with the catalog record - catalog record wins (should be the more common case when a patron suggests something that already exists)
6) Verify that after merging, the new title displays in the acquisition record
7) Verify that the suggestion info no longer displays in basket

From Katrin's test plan:
8) Verify that the new title doesn't display in suggestions. The old title will still show as suggested (not updated)
=> This is the title from suggestions.title, I think it makes sense to show this one.
Maybe we should open a new bug report to improve the display of the suggestion, and link to the bibliographic record

Signed-off-by: Lucie Gay <lucie.gay@ens-paris-saclay.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18789: (follow-up) Fix place hold page
Jonathan Druart [Mon, 26 Mar 2018 19:55:51 +0000 (16:55 -0300)]
Bug 18789: (follow-up) Fix place hold page

This patch fixes very weird behaviours introduced by
  commit 0ab22e1c7c6b6e8d14a4fb7478ab2a3d42da347d
  Bug 18789: Send Koha::Patron object to the templates

The patron variable was only set when no action was defined.
This patch restores the feature the easiest way possible (less changes)
even if it is not the best one.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18570: Follow up to fix test noise
Mark Tompsett [Fri, 23 Mar 2018 19:25:20 +0000 (19:25 +0000)]
Bug 18570: Follow up to fix test noise

This sets a valid email and changes the tests
to expect it was sent.

prove t/db_dependent/Passwordrecovery.t
-- noise before patch
-- no noise after patch

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19943: Fix Borrower_PrevCheckout.t - create the biblioitem entry
Jonathan Druart [Fri, 23 Mar 2018 16:22:35 +0000 (13:22 -0300)]
Bug 19943: Fix Borrower_PrevCheckout.t - create the biblioitem entry

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19943: Fix SwitchOnSiteCheckouts.t - create the biblioitem entry
Jonathan Druart [Fri, 23 Mar 2018 16:20:49 +0000 (13:20 -0300)]
Bug 19943: Fix SwitchOnSiteCheckouts.t - create the biblioitem entry

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19943: Fix dateexpiry.t - create the biblioitem entry
Jonathan Druart [Fri, 23 Mar 2018 16:18:59 +0000 (13:18 -0300)]
Bug 19943: Fix dateexpiry.t - create the biblioitem entry

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19943: Fix NoIssuesChargeGuarantees.t - create the biblioitem entry
Jonathan Druart [Fri, 23 Mar 2018 16:01:18 +0000 (13:01 -0300)]
Bug 19943: Fix NoIssuesChargeGuarantees.t - create the biblioitem entry

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4078: Fix test when fr_FR.UTF-8 is installed
Jonathan Druart [Fri, 23 Mar 2018 16:13:59 +0000 (13:13 -0300)]
Bug 4078: Fix test when fr_FR.UTF-8 is installed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20466: Fix fixture syntax in t/Prices.t
Jonathan Druart [Fri, 23 Mar 2018 16:13:16 +0000 (13:13 -0300)]
Bug 20466: Fix fixture syntax in t/Prices.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19943: Gentle error handling for bookcount.pl
Tomas Cohen Arazi [Fri, 9 Mar 2018 13:51:53 +0000 (10:51 -0300)]
Bug 19943: Gentle error handling for bookcount.pl

This patch tests the required parameters and redirects with a 400 HTTP
code if parameters are invalid.

It also removes the need for the passed biblioitemnumber which is not
used at all.

A (now) useless sub is removed too.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19943: Remove C4::Biblio::GetBiblioItemData
Jonathan Druart [Tue, 9 Jan 2018 17:38:10 +0000 (14:38 -0300)]
Bug 19943: Remove C4::Biblio::GetBiblioItemData

It is no longer used.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19943: Koha::Biblio - Replace GetBiblioItemData with Koha::Biblio->biblioitem
Jonathan Druart [Tue, 9 Jan 2018 17:37:20 +0000 (14:37 -0300)]
Bug 19943: Koha::Biblio - Replace GetBiblioItemData with Koha::Biblio->biblioitem

The biblioitem's info can be retrieved with Koha::Biblio->biblioitem

Test plan:
1. Use the age restriction to restrict checkouts for a given patron
2. Check some items of a biblio out, go to "Items" tab, then "View
item's checkout history" link. Compare views with and without patches

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19943: Remove itemtype vs itype confusion in CanBookBeIssued
Jonathan Druart [Tue, 9 Jan 2018 17:29:50 +0000 (14:29 -0300)]
Bug 19943: Remove itemtype vs itype confusion in CanBookBeIssued

Just a preliminary step to clean the code a bit in CanBookBeIssued.
The effective item type is already set from GetItem and we do not need
to deal with that again.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19940: Koha::Biblio - Remove GetBiblioItemInfosOf
Jonathan Druart [Tue, 9 Jan 2018 16:58:53 +0000 (13:58 -0300)]
Bug 19940: Koha::Biblio - Remove GetBiblioItemInfosOf

This subroutine is only used once and can be replaced easily with a
Koha::Biblioitems->search call

Test plan:
Test this on top of bug 19941 and confirm that the correct item types
are displayed

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18255: Koha::Biblio - Replace GetBiblioItemByBiblioNumber with Koha::Biblio-...
Jonathan Druart [Mon, 13 Mar 2017 16:04:01 +0000 (13:04 -0300)]
Bug 18255: Koha::Biblio - Replace GetBiblioItemByBiblioNumber with Koha::Biblio->biblioitem

The subroutine GetBiblioItemByBiblioNumber considers that we have a 1-N
relation between biblio and biblioitems, which is wrong (it's 1-1).
So the calls can be replaced with Koha::biblio->biblioitem, it will ease
the read of the code.

Test plan:
1. Use the ILSDI service to display info of a bibliographic record,
biblioitems fields must be displayed
2. Search for items, biblioitems info must be displayed as well in the
result table

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19933: Fix typo in template plugin name
Kyle M Hall [Fri, 2 Mar 2018 11:17:14 +0000 (06:17 -0500)]
Bug 19933: Fix typo in template plugin name

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19933: Move instantiation of in deletemem.pl
Kyle M Hall [Fri, 2 Mar 2018 11:08:10 +0000 (06:08 -0500)]
Bug 19933: Move instantiation of in deletemem.pl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19933: (follow-up) Remove patronflags - easy ones
Jonathan Druart [Fri, 2 Mar 2018 11:01:38 +0000 (06:01 -0500)]
Bug 19933: (follow-up) Remove patronflags - easy ones

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19933: Remove patronflags - tricky ones
Jonathan Druart [Sun, 7 Jan 2018 17:57:23 +0000 (14:57 -0300)]
Bug 19933: Remove patronflags - tricky ones

Here we are, patronflags is used in a couple of places where (almost) all flags
were really useful: C4::SIP::ILS::Patron->new and circulation.pl

This patch only deal with the circulation code as I am not convident
enough with SIP code.

The change does not seems trivial because of the complexity of the
existing code, but the logic is the same. We send a variable to the
template depending on the situation of the patron.

I guess only code eyes ball could catch issue in this patch quickly.

Maybe we need to find a good place in a Koha module to move this code
and provide code coverage (especially when C4::SIP::ILS::Patron will
reuse it).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19933: Remove patronflags - easy ones
Jonathan Druart [Sun, 7 Jan 2018 17:42:00 +0000 (14:42 -0300)]
Bug 19933: Remove patronflags - easy ones

This patch replaces the easy occurrences of patronflags.

These calls only need the CHARGES->amount value, that is the non issues
charges. Luckily we now have a Koha::Account->non_issues_charges that
deal with that.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19933: Remove patronflags - In CanBookBeIssued
Jonathan Druart [Sun, 7 Jan 2018 16:48:16 +0000 (13:48 -0300)]
Bug 19933: Remove patronflags - In CanBookBeIssued

The change is trivial here, we only want to pass gonenoaddress, lost and
is_debared to the template.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19933: Remove patronflags - unused vars oldamount/amountold in circulation.pl
Jonathan Druart [Sun, 7 Jan 2018 17:06:14 +0000 (14:06 -0300)]
Bug 19933: Remove patronflags - unused vars oldamount/amountold in circulation.pl

There is oldamound/amountold variable that is sent to the template but
never used later. Let remove it now to avoid useless replacement.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 16427: Add direct link to authority records from staff detail view (MARC21 subjects)
Te Rauhina Jackson [Thu, 18 Jan 2018 02:20:11 +0000 (02:20 +0000)]
Bug 16427: Add direct link to authority records from staff detail view (MARC21 subjects)

I added a magnigying glass icon in the staff detail view that links to
the authority records.

Test Plan:
1) On the Koha staff page, create a new authority. The type of authority
   will be: Topical Term.
2) When creating authority, in tab 1 under -HEADING--TOPICAL TERM enter
   the topical term or geographic name entry element and then save the
   new authority e.g. science.
3) In circulation, search the catalog for a random book. Click the title
   of the book and you will be taken to the book details.
4) Edit the record and in tab 6, scroll down the - SUBJECT ADDED
   ENTRY--TOPICAL TERM and repeat this tag (the icon next to the title).
5) Edit the Topical term or geographic name entry element by clicking
   the button on the right of the bar.
6) In the Search main heading ($a only) enter your topical term e.g.
   science.
7) Press search, and then in the table that pops up, click 'choose'.
8) Save your edits and the new topical term will be in the 'Subject(s)'
   list of the book details.
9) Notice that there is no magnifying glass icon.
10) Apply this patch
11) Notice that there is now a magnifying glass icon next to the topical
    term.
12) Click on the magnifying glass and it will take you directly to the
    authorities records

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20432: Add black version of small Koha logo for use in the OPAC
Owen Leonard [Fri, 16 Mar 2018 10:16:23 +0000 (10:16 +0000)]
Bug 20432: Add black version of small Koha logo for use in the OPAC

This patch adds a black version of the Koha logo for use in OPAC
customization.

To test, apply the patch and add this CSS to your OPACUserCSS system
preference:

.navbar-inverse .navbar-inner {
    background: #CCC none;
}

 #logo {
    background: transparent url(/opac-tmpl/bootstrap/images/koha-logo-navbar-black.png) no-repeat scroll 0;
}

Refresh your OPAC and the top navigation bar should be changed from
black to grey, and you should see a black version of the Koha logo.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20275: Add comment to let user know they can define multiple plugindirs
Nick Clemens [Thu, 22 Feb 2018 16:46:19 +0000 (16:46 +0000)]
Bug 20275: Add comment to let user know they can define multiple plugindirs

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19929: (QA follow-up) Fix POD
Marcel de Rooy [Thu, 15 Mar 2018 13:51:34 +0000 (14:51 +0100)]
Bug 19929: (QA follow-up) Fix POD

Make qa tools happy.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19929: Add Koha objects for class sources and sorters
Nick Clemens [Tue, 9 Jan 2018 11:45:47 +0000 (11:45 +0000)]
Bug 19929: Add Koha objects for class sources and sorters

prove -v t/db_dependent/Koha/ClassSortRules.t
prove -v t/db_dependent/Koha/ClassSources.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19454: (QA follow-up) Fix selection on categorycode
Marcel de Rooy [Wed, 14 Mar 2018 12:22:46 +0000 (13:22 +0100)]
Bug 19454: (QA follow-up) Fix selection on categorycode

A follow-up on a preceding report introduced a join instead of a
subquery. This made the categorycode ambiguous.

Test plan:
See former patches.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19454: (follow-up) Add a total line when updating
Marcel de Rooy [Mon, 16 Oct 2017 11:08:22 +0000 (13:08 +0200)]
Bug 19454: (follow-up) Add a total line when updating

Test plan:
[1] Run the script with -doit and -cat [some_category] and verify that
    the printed total is correct.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19454: Add -category parameter to borrowers-force-messaging-defaults.pl
Marcel de Rooy [Thu, 12 Oct 2017 13:36:10 +0000 (15:36 +0200)]
Bug 19454: Add -category parameter to borrowers-force-messaging-defaults.pl

Instead of updating patrons over all patron categories, it would be
helpful if we could filter on a specified category.

Test plan:
[1] Select two patrons A and B in say categories C1 and C2.
[2] Change the msg prefs for A and B away from defaults.
[3] Run borrowers-force-messaging-defaults.pl -doit -cat C1
    Verify that patron A changed and patron B did not.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Amended: Replace -category by --category. (marcelr 20180314)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19716: Add option to send header line for CSV output
Kyle M Hall [Wed, 29 Nov 2017 20:20:19 +0000 (15:20 -0500)]
Bug 19716: Add option to send header line for CSV output

Currently, if outputting a CSV file using runreport.pl, you need to look at the report used to know what each column means. It would be nice if we could include column headers.

Test Plan:
1) Apply this patch
2) Try using runreport.pl with --format csv --csv-header

Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18626: Add unit tests
Kyle M Hall [Fri, 9 Mar 2018 14:51:52 +0000 (09:51 -0500)]
Bug 18626: Add unit tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 18626: Add ability to track cardnumber changes for patrons
Kyle M Hall [Thu, 11 May 2017 00:44:12 +0000 (00:44 +0000)]
Bug 18626: Add ability to track cardnumber changes for patrons

Some libraries want to keep a history of cardnumber changes for a
patron. This is a feature that another ILS has.

Test Plan:
1) Apply this patch
2) Enable the BorrowersLog
3) Modify a patron, update his or her cardnumber
4) Notice the entry in the action log containing the old and new cardnumbers
5) Edit a patron, leave the cardnumber the same
6) Note there is no cardnumber change entry in the action logs
7) Disable BorrowersLog, modify a patron cardnumber
8) Note there is no cardnumber change entry in teh action logs

Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17826: Add POD
Kyle M Hall [Fri, 9 Mar 2018 15:49:03 +0000 (10:49 -0500)]
Bug 17826: Add POD

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17826: Allow extended patron attributes to be sent in arbitrary SIP2 fields
Kyle M Hall [Thu, 29 Dec 2016 15:39:28 +0000 (15:39 +0000)]
Bug 17826: Allow extended patron attributes to be sent in arbitrary SIP2 fields

Some libraries need to be able to send additional patron data from the
extended patron attributes in made up SIP2 fields for the patron
information and patron status responses.

Test Plan:
1) Apply this patch
2) Create 3 new patron attributes with the codes CODE1, CODE2, CODE3.
   Make a least one repeatable.
3) Create a patron, add those attibutes for the patron, make sure there
   are at least two instances of the repeatable code
4) Edit your SIP2 config file, add the following within the login stanza:
   <patron_attribute field="XX" code="CODE1" />
   <patron_attribute field="XY" code="CODE2" />
   <patron_attribute field="XZ" code="CODE3" />
5) Using the sip cli emulator, run patron_information and
   patron_status_request messages for the patron
6) Note the values you set for the patron attributes are sent in the
   corrosponding fields!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Daniel Mauchley <dmauchley@duchesne.utah.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: added parentheses on line 488 when assigning hashref to array.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19856: (follow-up) Improve styling of reports sidebar
Jenny Way [Wed, 17 Jan 2018 20:20:23 +0000 (20:20 +0000)]
Bug 19856: (follow-up) Improve styling of reports sidebar

Added divs to report-menu.inc as well. Should work on any reports page
with sidebar now.

Signed-off-by: claude <claude.brayer@cea.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19856: Improve styling of reports sidebar
Jenny Way [Tue, 16 Jan 2018 03:24:41 +0000 (03:24 +0000)]
Bug 19856: Improve styling of reports sidebar

Test Plan
1. Open tools page and click on any of the links with a sidebar
2. Note the layout of the sidebar
3. Open reports page and click on any of the links with a sidebar
4. All the sidebars should have the same layout as the tools one

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20264: DBRev 17.12.00.023
Jonathan Druart [Mon, 19 Mar 2018 20:18:26 +0000 (17:18 -0300)]
Bug 20264: DBRev 17.12.00.023

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20264: Remove syspref checkdigit
Jonathan Druart [Wed, 21 Feb 2018 18:04:01 +0000 (15:04 -0300)]
Bug 20264: Remove syspref checkdigit

According to
http://irc.koha-community.org/koha/2013-06-26#i_1333289
http://irc.koha-community.org/koha/2013-06-26#i_1333589
and Hea data, this syspref is no longer in used and is always set to
false.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4078: DBRev 17.12.00.022
Jonathan Druart [Mon, 19 Mar 2018 20:16:26 +0000 (17:16 -0300)]
Bug 4078: DBRev 17.12.00.022

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4078: Add a new test
Jonathan Druart [Thu, 1 Feb 2018 17:35:06 +0000 (14:35 -0300)]
Bug 4078: Add a new test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4078: Add the ability to display and configure the symbol for prices
Jonathan Druart [Thu, 1 Feb 2018 17:32:39 +0000 (14:32 -0300)]
Bug 4078: Add the ability to display and configure the symbol for prices

The symbol of currencies are not displayed (or not correctly) so far.
This patch set adds the ability to configure the display of the symbol
(with or without a whitespace between the symbol and the price).

Test plan:
1. Execute the update DB entry, go to the currency admin page and tick the
new "Space separation between symbol and value" checkbox
2. Add a fine to a patron and use their credentials to login at the OPAC
3. You should see the "$ 42 due fines and charges" info in the
dashboard
4. Untick the new checkbox to remove the space and reload the OPAC main
page.
=> The space should not be longer displayed ($42)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4078: Pass with_symbol to module
Jonathan Druart [Thu, 1 Feb 2018 17:31:48 +0000 (14:31 -0300)]
Bug 4078: Pass with_symbol to module

The template plugin did not pass the with_symbol flag to the module and
so was not taken into account

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4078: Add the checkbox to the UI
Jonathan Druart [Thu, 1 Feb 2018 17:31:25 +0000 (14:31 -0300)]
Bug 4078: Add the checkbox to the UI

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4078: Update DB entry - add new column currency.p_sep_by_space
Jonathan Druart [Thu, 1 Feb 2018 17:30:53 +0000 (14:30 -0300)]
Bug 4078: Update DB entry - add new column currency.p_sep_by_space

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 4078: DBIC Schema changes
Jonathan Druart [Thu, 1 Feb 2018 17:30:39 +0000 (14:30 -0300)]
Bug 4078: DBIC Schema changes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17457: Add tests for each marc flavour
David Bourgault [Wed, 24 Jan 2018 20:52:50 +0000 (15:52 -0500)]
Bug 17457: Add tests for each marc flavour

+ Added a `run_flavoured_tests` sub that runs for each MARC flavour
* Moved SearchWithISBNVariation tests to the new sub

I copied a lot of the necessary utility functions over Biblio.t (as of Jonathan's suggestion). I also tried to name and organize the code in such a way that it can be reused if anyone else needs to run "flavoured" tests in the future.

prove t/db_dependant/Acquisition.t  OK
QA tool green

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 17457: Adv. Acquisition search with ISBN variations
David Bourgault [Mon, 25 Sep 2017 20:22:51 +0000 (16:22 -0400)]
Bug 17457: Adv. Acquisition search with ISBN variations

Advanced acquisition search will now follow the "SearchWithISBNVariations" system preference.

Test plan :
0) Make sure you have orders pending or completed
1) Enable SearchWithISBNVariations if it is not enabled
2) Search for one of your orders by its ISBN, it should appear
3) Search for the same order by a variation of its ISBN, I used this website to find it : http://www.hahnlibrary.net/libraries/isbncalc.html
You should not get a result.
4) Apply patch
5) Repeat step 2-3. You should get a hit both times.
6) prove t/db_dependent/Acquisition.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: Add POD
Kyle M Hall [Fri, 2 Mar 2018 12:36:20 +0000 (12:36 +0000)]
Bug 19160: Add POD

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: Remove tab characters causing qa script to fail
Kyle M Hall [Fri, 2 Mar 2018 12:32:09 +0000 (12:32 +0000)]
Bug 19160: Remove tab characters causing qa script to fail

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: (follow-up) Fix problems introduced by renaming logout_required to logout_...
Ulrich Kleiber [Wed, 7 Feb 2018 09:06:20 +0000 (10:06 +0100)]
Bug 19160: (follow-up) Fix problems introduced by renaming logout_required to logout_if_required

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: Isolate CAS code into its own module
Jonathan Druart [Thu, 11 Jan 2018 18:43:42 +0000 (15:43 -0300)]
Bug 19160: Isolate CAS code into its own module

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: Move the code from controller to C4::Auth_with_cas
Jonathan Druart [Thu, 11 Jan 2018 18:37:18 +0000 (15:37 -0300)]
Bug 19160: Move the code from controller to C4::Auth_with_cas

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: Move duplicated code to its own private subroutine
Jonathan Druart [Thu, 11 Jan 2018 18:29:22 +0000 (15:29 -0300)]
Bug 19160: Move duplicated code to its own private subroutine

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 19160: CAS Single logout
Chris Cormack [Wed, 7 Jun 2017 21:38:30 +0000 (09:38 +1200)]
Bug 19160: CAS Single logout

CAS supports single logout, where if you logout of one application it
logs you out of all of them.

This bug implements this

You will need a CAS server (with single logout configure),
and at least 2 applications (one being Koha)

1/ In Koha login via CAS
2/ Login to the other application via CAS
3/ Logout of the other application
4/ Notice you are still logged into Koha
5/ Log out of Koha
6/ Apply patch
7/ Login to Koha via CAS, login to other app via CAS
8/ Log out of other app
9/ Notice you are logged out of Koha

If you dont have CAS, this patch should be a no op, you could test that
1/ Login and logout normally
2/ Apply patch
3/ Login and logout still work fine

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Patch works as described, local login still works correctly.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 20268: (follow-up) Correct template error
Owen Leonard [Fri, 23 Mar 2018 13:39:45 +0000 (13:39 +0000)]
Bug 20268: (follow-up) Correct template error

The login template must have a class attribute on the body tag in order
for the template to pass tests.

To test, apply the patch and confirm that the staff client login form
still looks the same. For further confirmation you could update the
IntranetUserCSS system preference with something like this:

.main_main-auth {
    background-color: #CCF;
}

The login form should now have a different background color.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoRevert "Bug 20341: Use AuthorisedValues plugin on the staff side"
Jonathan Druart [Mon, 19 Mar 2018 18:40:09 +0000 (15:40 -0300)]
Revert "Bug 20341: Use AuthorisedValues plugin on the staff side"

This reverts commit a67fdf3bd498bf1c5a90c2847570ea8eff9c52da.

I am not sure we already agreed on that: the UI let the ability to
choose different AV category for each frameworks. I think it should be
discussed widely before removing this possibility.
Even if I am pretty sure it is not handle correctly everywhere.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
6 years agoBug 7143: Update about page for new dev - Maksim Sen
Jonathan Druart [Mon, 19 Mar 2018 18:38:03 +0000 (15:38 -0300)]
Bug 7143: Update about page for new dev - Maksim Sen

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>