koha.git
5 years agoBug 14202: Unexpected parameter for window.open in marc21_linking_section.pl
Marcel de Rooy [Tue, 14 Jul 2015 19:57:10 +0000 (21:57 +0200)]
Bug 14202: Unexpected parameter for window.open in marc21_linking_section.pl

The builder of this plugin includes a window.open call with the name
parameter: \"marc21_field_7\"+ event.data.id +\"\"
Note that this is not the name of the new window.
This trivial patch adjusts this unusual name by tag_editor like other
plugins.

Test plan:
Attach marc21_linking_section to 773$9.
Click on the Tag editor button.
If it opens, it still works :)
Note that the name of the popup is still:
    Koha > Cataloguing > plugin for links

Signed-off-by: Fredreic Demians <f.demians@tamil.fr>
  Plugin still working, with a valid pop-pup window id.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 11431: (QA followup) remove diags
Tomas Cohen Arazi [Fri, 6 Nov 2015 18:08:37 +0000 (15:08 -0300)]
Bug 11431: (QA followup) remove diags

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 15146: Format date of birth on patrons requesting modification page
Marc Véron [Fri, 6 Nov 2015 07:50:20 +0000 (08:50 +0100)]
Bug 15146: Format date of birth on patrons requesting modification page

To reproduce / test

- Log in to Opac
- Go to "your personal details"
- Request a change of the date of birth
- Log in to Staff client
- Follow link to Patrons requesting modifications
  (/koha/members/members-update.pl)
=> The date is not formatted in syspref format

- Apply patch, reload members-update.pl
=> The date is formatted in syspref format

- Approve changes
- Verify that changes are saved

This is independent from C4::Dates removal.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Changes saved Ok, Update patron record follows
dateformat syspref

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14956: (followup) Fix birthday date validation in Opac
Marc Véron [Thu, 5 Nov 2015 13:49:23 +0000 (14:49 +0100)]
Bug 14956: (followup) Fix birthday date validation in Opac

To reproduce / test:

- In Opac: Go to 'your personal details'
- Enter a valid birtday date
- In Staff client: Go to Home > Patrons > Update patron records
  (Link on start page: Patrons requesting modification)
- Verify that the birtday date is correct
- Back in Opac, clear the birthday date, try to submit
  => Validation message appears
- Enter an invalid date (32/32/2999 or 00/00/0000), try to submit
  => Birthday date field is cleared, validation message appears.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Wrong today corrected

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14956: C4::Dates from files opac/*.pl
Marc Véron [Mon, 5 Oct 2015 12:38:08 +0000 (14:38 +0200)]
Bug 14956: C4::Dates from files opac/*.pl

Remove C4::Dates from files:
-  opac/opac-memberentry.pl
-  opac/opac-reserve.pl
-  opac/opac-search-history.pl
-  opac/opac-showreviews.pl
-  opac/opac-suggestions.pl
-  opac/opac-serial-issues.pl
-  opac/opac-alert-subscribe.pl
-  opac/opac-ics.pl

To test:
- Apply patch
- Verify, that self registration and holds work as before
- Verify that tabs in catalog item detail work and display
  as before
- For serials: Verify that subscriptions work as before. It is a
  little bit hidden, in tab Subscriptions, then 'More details', then
  tab 'Brief history', button 'Subscribe to email notificatin on
  new issues'
- For ics: Can not be tested at the moment, not yet used (Bug 5456),
  pls. have a look at the code changes

(Amended following comment #2)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 15150: Make t/ tests skip if Test::DBIx::Class absent
Tomas Cohen Arazi [Fri, 6 Nov 2015 13:29:21 +0000 (10:29 -0300)]
Bug 15150: Make t/ tests skip if Test::DBIx::Class absent

Tests in t/ should always pass for building the Debian packages
for Koha. But we've started using Test::DBIx::Class for writing
mocked tests, and that lib is not (yet) packaged fro Debian 7+.

This means build is failing. Devs and jenkins use the lib from CPAN.

This patch makes the tests skip if the lib is absent.

To test:
- Install Test::DBIx::Class
  $ sudo cpanm Test::DBIx::Class
- Run the tests:
  $ prove t/
=> SUCCESS: Tests pass
- Uninstall Test::DBIx::Class
  $ sudo cpan -U Test::DBIx::Class
- Run the tests:
  $ prove t/
=> SUCCESS: Tests still pass (those needing the lib are skipped)
- Sign off :-D

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. All test pass successful

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 15130: useless unitialization warnings when updating authorities
Lyon3 Team [Wed, 4 Nov 2015 16:06:10 +0000 (17:06 +0100)]
Bug 15130: useless unitialization warnings when updating authorities

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Fixes a trivial coding error.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14632: (QA followup) Restore missing "Delete batch" button.
Kyle M Hall [Fri, 6 Nov 2015 14:20:31 +0000 (09:20 -0500)]
Bug 14632: (QA followup) Restore missing "Delete batch" button.

This button was removed by accident in bug 14676

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14632: Fix alert message for single item batch
Indranil Das Gupta [Mon, 3 Aug 2015 04:27:53 +0000 (09:57 +0530)]
Bug 14632: Fix alert message for single item batch

Fixes the incorrect msg "Please select at least label to delete."
for attempts to delete from single patron batches. Notifies the
user that doing so will delete the batch. It disallows direct
deletion, instead suggests the users to use the 'Delete batch'
option assuming the users know what they are doing.

Test plan
=========

1/ Load a single patron batch in edit mode and attempt to delete
   the single record. The JS alert message will inform that "Please
   select at least label to delete."
2/ Apply patch and refresh page and try to delete the single record
   again.
3/ This time the alert will inform the user that doing so will delete
   the batch and should that be desired action to choose the 'Delete
   batch' option from the toolbar.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  It works as before but with an understantable warning message.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 15117: Transfer Order: Better user information and translation handling
Marc Véron [Wed, 4 Nov 2015 09:13:46 +0000 (10:13 +0100)]
Bug 15117: Transfer Order: Better user information and translation handling

While transferring an order, a untranslatable JavaScript confirmation
dialog pops up.

This patch moves the information about the order to be transferred to the
top of the screen to better inform the user what order is to be transferred,
and simplifies the confirmation dialog.

To test:
- Apply patch
- Transfer an order from a basket to another basket
- Verify, that on top of the screen an information is displayed about which
  order from which vendor and basket is to be transferred
- Verify that the transfer works OK
- Update a po lang file and confirm you see the string and you are able
  to translate it.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Dialog box with readable & translatable info.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14673: Work around change to AddIssue return
Colin Campbell [Tue, 11 Aug 2015 15:51:53 +0000 (16:51 +0100)]
Bug 14673: Work around change to AddIssue return

Return from AddIssue used to be due date or undef.
Now it is less straightforward returning am issue object
if an issue row is created or undef. If the issue is a renewal
undef is returned. As that case was not handled properly it
caused the server site to crash the listener causing a
communications error on the client.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14045: Fix failing tests if issuing rules exist
Jonathan Druart [Fri, 6 Nov 2015 13:24:39 +0000 (13:24 +0000)]
Bug 14045: Fix failing tests if issuing rules exist

If there is issuing rules defined, one test does not pass as it assumes
there is none defined.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14836: (QA followup) Add missing transaction
Tomas Cohen Arazi [Thu, 5 Nov 2015 14:05:29 +0000 (11:05 -0300)]
Bug 14836: (QA followup) Add missing transaction

Bug 15081 removed transaction handling from t::lib::TestBuilder so this
patchset had to be ammended to handle it on its own.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14836: (QA followup) Fix number of unit tests
Kyle M Hall [Fri, 30 Oct 2015 18:42:55 +0000 (14:42 -0400)]
Bug 14836: (QA followup) Fix number of unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14836: Add tests for Koha::Patron::Categor[y|ies]
Jonathan Druart [Thu, 29 Oct 2015 09:08:07 +0000 (09:08 +0000)]
Bug 14836: Add tests for Koha::Patron::Categor[y|ies]

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14836: Move Koha::PatronCategor* to Koha::Patron::Categor*
Jonathan Druart [Thu, 29 Oct 2015 08:47:08 +0000 (08:47 +0000)]
Bug 14836: Move Koha::PatronCategor* to Koha::Patron::Categor*

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14836: Add Koha::PatronCategor[y|ies] classes
Jonathan Druart [Wed, 16 Sep 2015 15:50:17 +0000 (16:50 +0100)]
Bug 14836: Add Koha::PatronCategor[y|ies] classes

Note that some of the routines are retrieved from bug 10363 (branch
limitations).
They are not all used in these patch set, but they will permit to
replace the subroutines in C4::Form::MessagingPreferences, in the next
step.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14836: Use Koha::PatronCategor[y|ies] in admin/categories.pl
Jonathan Druart [Wed, 16 Sep 2015 15:50:43 +0000 (16:50 +0100)]
Bug 14836: Use Koha::PatronCategor[y|ies] in admin/categories.pl

Test plan:
Add/edit/remove patron categories from the administration module
(admin/categories.pl).
You should get message feedback after each action.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Operations in admin/category is unchanged, and functionnal

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 9468: DBRev 3.21.00.053
Tomas Cohen Arazi [Thu, 5 Nov 2015 13:49:15 +0000 (10:49 -0300)]
Bug 9468: DBRev 3.21.00.053

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 9468: (QA followup) Remove GetSupportList dependency from updatadatabase.pl
Kyle M Hall [Mon, 24 Aug 2015 10:46:30 +0000 (06:46 -0400)]
Bug 9468: (QA followup) Remove GetSupportList dependency from updatadatabase.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 9468: followup insert ignore
Jonathan Druart [Mon, 20 Apr 2015 09:14:59 +0000 (11:14 +0200)]
Bug 9468: followup insert ignore

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 9468: [QA Followup]
Kyle M Hall [Fri, 17 Apr 2015 16:47:59 +0000 (12:47 -0400)]
Bug 9468: [QA Followup]

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 9468: sample SUGGEST_FORMAT values
Galen Charlton [Mon, 5 May 2014 00:30:24 +0000 (00:30 +0000)]
Bug 9468: sample SUGGEST_FORMAT values

This patch adds some sample values for the SUGGEST_FORMAT
authorized value list for new installations.

To test
-------
[1] Verify that the new SQL inserts added by this patch work.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 9468: use new SUGGEST_FORMAT list
Galen Charlton [Mon, 5 May 2014 00:23:19 +0000 (00:23 +0000)]
Bug 9468: use new SUGGEST_FORMAT list

This patch uses the new SUGGEST_FORMAT authorized value list for
populating the list of suggestion item types/document types.  It
also improves the display by using the staff or OPAC description of
the authorised value rather than the code.

To test:

[1] Enter a suggestion via the OPAC and select an item type (which
    I will call "desired format" for the rest of this test plan).
[2] Verify that the saved suggestion displays the desired format
    description in both staff and OPAC.
[3] Verify that organizing the list of suggestions by item type
    now works in the staff interface, rather than displaying "Unknown"
    in each tab header.
[4] Verify that existing suggestions' desired formats are displayed
    correctly.
[5] Verify that suggestions can have their desired format edited
    in the staff inteface.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 9468: define new SUGGEST_FORMAT authorize value
Galen Charlton [Mon, 5 May 2014 00:19:52 +0000 (00:19 +0000)]
Bug 9468: define new SUGGEST_FORMAT authorize value

This patch defines a new authorized called SUGGEST_FORMAT for
populating a list of patron-understandable formats for expressing
how they would prefer suggested items to be purchased.  For
database upgrades, it populates it based on the value returned by the
GetSupportList() routine.

To test
-------
[1] Run the database update.
[2] Verify that there is a new authorised value called SUGGEST_FORMAT
    whose codes and descriptions correspond to the list of "item types"
    available on the patron suggestion form.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 9468: make av-build-dropbox.inc available to OPAC
Galen Charlton [Mon, 5 May 2014 00:13:28 +0000 (00:13 +0000)]
Bug 9468: make av-build-dropbox.inc available to OPAC

This patch makes the av-build-dropbox.inc template include introduced
by the latest patches for bug 766 available to the prog and Bootstrap
themes in the OPAC.

See later patches in this series for testing.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Remove OPAC prog file

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 8296: (RM followup) DBIx update
Tomas Cohen Arazi [Thu, 5 Nov 2015 13:46:19 +0000 (10:46 -0300)]
Bug 8296: (RM followup) DBIx update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 8296: DBRev 3.21.00.052
Tomas Cohen Arazi [Thu, 5 Nov 2015 13:45:01 +0000 (10:45 -0300)]
Bug 8296: DBRev 3.21.00.052

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 8296: Follow-up - don't display publisheddate when publisheddatetext is empty
Katrin Fischer [Thu, 30 Oct 2014 22:18:50 +0000 (23:18 +0100)]
Bug 8296: Follow-up - don't display publisheddate when publisheddatetext is empty

To test:
- make sure you have a subscription where only some fields have a published date (text) set
- check the subscription detail page, issues tab
- check the serial collection page
- both pages should show an empty field, when published date (text) has not been set

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 8296: Fix unit tests in t/db_dependent/Serials.t
Julian Maurice [Fri, 10 Oct 2014 07:22:54 +0000 (09:22 +0200)]
Bug 8296: Fix unit tests in t/db_dependent/Serials.t

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 8296: Display publisheddatetext in OPAC bootstrap theme
Julian Maurice [Thu, 31 Jul 2014 08:37:48 +0000 (10:37 +0200)]
Bug 8296: Display publisheddatetext in OPAC bootstrap theme

and remove modifications for OPAC prog theme

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 8296: Don't fill text field automatically
Julian Maurice [Tue, 23 Jul 2013 07:43:02 +0000 (09:43 +0200)]
Bug 8296: Don't fill text field automatically

+ minor fixes:
  * Add bug number to updatedatabase
  * Fix colspan in serials-edit.tt

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 8296: Follow up for QA
Julian Maurice [Fri, 14 Sep 2012 15:01:46 +0000 (17:01 +0200)]
Bug 8296: Follow up for QA

1 redefined variable removed

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 8296: set input maxlength to the same of sql field length
Julian Maurice [Fri, 14 Sep 2012 14:20:01 +0000 (16:20 +0200)]
Bug 8296: set input maxlength to the same of sql field length

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 8296: Add descriptive (text) published date field for serials
Julian Maurice [Fri, 22 Jun 2012 15:25:54 +0000 (17:25 +0200)]
Bug 8296: Add descriptive (text) published date field for serials

Add a new field serial.publisheddatetext for displaying published date
in another format that dateformat syspref permit.

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: (RM followup) DBIx update
Tomas Cohen Arazi [Thu, 5 Nov 2015 13:40:57 +0000 (10:40 -0300)]
Bug 14544: (RM followup) DBIx update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 15095: (RM followup) DBIx update
Tomas Cohen Arazi [Thu, 5 Nov 2015 13:40:24 +0000 (10:40 -0300)]
Bug 15095: (RM followup) DBIx update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14781: Creation of barcode types 2of5 not functional
Marc Véron [Fri, 4 Sep 2015 07:50:07 +0000 (09:50 +0200)]
Bug 14781: Creation of barcode types 2of5 not functional

This patch fixes the rendering of "COOP2of5" or "Industrial2of5" barcodes in the label creator module.

To test:
- Create a label layout with COOP2of5 barcode type
- Create labels (make sure that the items's barcode values are numeric only!)
- Export batch and download PDF.

Without patch:
- No barcodes rendered
With patch
- Barcodes should render as expected. Test for both barcode types.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, tested both formats.
Non digit barcode is not printed.

No koha-qa errors, no t/ & xt/ errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Note: To be printed, barcode should be numerical.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 15083: Remove acqui/currency.pl
Jonathan Druart [Thu, 29 Oct 2015 14:43:58 +0000 (14:43 +0000)]
Bug 15083: Remove acqui/currency.pl

This script has scary FIXMEs and can be removed.
It is never called from Koha code.
On the way, this patch remove the C4::Budgets::ModCurrencies subroutine,
which was only called from this script.

Test plan:
  git grep 'acqui/currency.pl
and
  git grep ModCurrencies
should not return anything.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No more ModeCurrencies, no call to acqui/currency.pl
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14157: Notices tab in the patron record should not depend on EnhancedMessagingPre...
Sophie Meynieux [Wed, 4 Nov 2015 18:04:26 +0000 (19:04 +0100)]
Bug 14157: Notices tab in the patron record should not depend on EnhancedMessagingPreferences to display

Overdue and Hold notices can be sent even if EnhancedMessagingPreference is set to "Don't Allow", so Notices tab have to be visible in all cases.

Test plan :
  - without patch :
    - set EnhancedMessagingPreference to "Don't Allow" and go to patron record : there is no Notices tab
    - set EnhancedMessagingPreference to "Allow" and og to patron record : there is a Notices tab

  - apply this patch :
    - go to patron record, you cas see a Notices tab
    - change the value of EnhanceMessagingPreferences, Notices tab is always visible.

Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: DBRev 3.21.00.051
Tomas Cohen Arazi [Thu, 5 Nov 2015 13:04:58 +0000 (10:04 -0300)]
Bug 14544: DBRev 3.21.00.051

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Fix 'Back to lists' links on sharing a shelf
Jonathan Druart [Fri, 16 Oct 2015 10:29:54 +0000 (11:29 +0100)]
Bug 14544: Fix 'Back to lists' links on sharing a shelf

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Fixes regression: display author and dateadded on the list view [intranet]
Jonathan Druart [Fri, 16 Oct 2015 10:02:33 +0000 (11:02 +0100)]
Bug 14544: Fixes regression: display author and dateadded on the list view [intranet]

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Fix 'back to lists' link
Jonathan Druart [Fri, 16 Oct 2015 09:47:24 +0000 (10:47 +0100)]
Bug 14544: Fix 'back to lists' link

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: [QA Follow-up] DBIx::Class changes
Marcel de Rooy [Fri, 16 Oct 2015 07:09:17 +0000 (09:09 +0200)]
Bug 14544: [QA Follow-up] DBIx::Class changes

One of the follow-ups added a belongs_to from Biblioitem to Item just
as biblioitemnumber was a foreign key to Item. The relation goes the
other way.

As a temporary measure, I added set_primary_key in the local section of
Virtualshelfcontent. Should be moved later with a real db rev.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: [QA Follow-up] Added some test descriptions
Marcel de Rooy [Fri, 16 Oct 2015 06:58:05 +0000 (08:58 +0200)]
Bug 14544: [QA Follow-up] Added some test descriptions

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: QA fixes - some minor bug fixes
Jonathan Druart [Mon, 12 Oct 2015 08:34:41 +0000 (09:34 +0100)]
Bug 14544: QA fixes - some minor bug fixes

See comment 171 and 172 for more details.

This patch mainly fixes typo or silly error in templates.

It also uses the relationships added by previous patch to join the
biblioitems and items tables (changes in opac-shelves.pl and
shelves.pl).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Add missing biblio <=> biblioitems <=> items relationships to the schema
Jonathan Druart [Mon, 12 Oct 2015 09:40:46 +0000 (10:40 +0100)]
Bug 14544: Add missing biblio <=> biblioitems <=> items relationships to the schema

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Adjusted by a follow-up.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: [QA Follow-up] Fix warning about transaction
Marcel de Rooy [Fri, 9 Oct 2015 11:26:39 +0000 (13:26 +0200)]
Bug 14544: [QA Follow-up] Fix warning about transaction

When running Virtualshelves.t, you have this warning:
DBD::mysql::db begin_work failed: Already in a transaction at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1339.

By moving the DBI lines after creating the TestBuilder object, the warning
will be gone.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Handle database error when creating a shelf with DB admin account
Alex Arnaud [Wed, 2 Sep 2015 08:04:04 +0000 (10:04 +0200)]
Bug 14544: Handle database error when creating a shelf with DB admin account

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I don't think this is useful, it will be a mess if we have to check this
case everywhere. But it works!
I let the cut to the QAer or RM.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: DB Changes: Set a default value for sortfield
Jonathan Druart [Wed, 26 Aug 2015 13:48:35 +0000 (14:48 +0100)]
Bug 14544: DB Changes: Set a default value for sortfield

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Fix regression on adding a new list
Jonathan Druart [Wed, 26 Aug 2015 13:24:25 +0000 (14:24 +0100)]
Bug 14544: Fix regression on adding a new list

The user should not be allowed to create a new list and get a friendly
error message if he tries.

The "New list" links are removed.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Remove wrong tips about permissions
Jonathan Druart [Tue, 18 Aug 2015 13:13:15 +0000 (14:13 +0100)]
Bug 14544: Remove wrong tips about permissions

The owner of a list should not need any permission to remove contents.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Get rid of C4::VirtualShelves and C4::VirtualShelves::Page
Jonathan Druart [Tue, 18 Aug 2015 09:54:17 +0000 (10:54 +0100)]
Bug 14544: Get rid of C4::VirtualShelves and C4::VirtualShelves::Page

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Move HandleDelBorrower to C4::Members
Jonathan Druart [Tue, 18 Aug 2015 09:50:06 +0000 (10:50 +0100)]
Bug 14544: Move HandleDelBorrower to C4::Members

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Get rid of GetSomeShelfNames
Jonathan Druart [Mon, 17 Aug 2015 19:45:34 +0000 (20:45 +0100)]
Bug 14544: Get rid of GetSomeShelfNames

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Get rid of GetShelfContent
Jonathan Druart [Mon, 17 Aug 2015 17:46:42 +0000 (18:46 +0100)]
Bug 14544: Get rid of GetShelfContent

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Get rid of ShelfPossibleAction
Jonathan Druart [Mon, 17 Aug 2015 14:57:27 +0000 (15:57 +0100)]
Bug 14544: Get rid of ShelfPossibleAction

Bug 14544: (follow-up) Get rid of ShelfPossibleAction

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Make the OPAC side independent of Page.pm
Jonathan Druart [Mon, 10 Aug 2015 15:53:06 +0000 (16:53 +0100)]
Bug 14544: Make the OPAC side independent of Page.pm

Bug 14544: Fix redirect on editing a list

If you edit a list from the list view, after saving the form, you are
not redirected to the list view (but on the edit form).

Bug 14544: Cosmetic: &rsaquo; should be a class divider

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Get rid of GetShelves
Jonathan Druart [Thu, 16 Jul 2015 16:42:03 +0000 (17:42 +0100)]
Bug 14544: Get rid of GetShelves

This does not work for now, see later.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Get rid of GetBibliosShelves
Jonathan Druart [Thu, 6 Aug 2015 14:28:12 +0000 (15:28 +0100)]
Bug 14544: Get rid of GetBibliosShelves

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Make the intranet side independent of Page.pm
Jonathan Druart [Wed, 5 Aug 2015 15:37:02 +0000 (16:37 +0100)]
Bug 14544: Make the intranet side independent of Page.pm

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Koha::Virtualshelfcontent[s]
Jonathan Druart [Thu, 16 Jul 2015 16:13:40 +0000 (17:13 +0100)]
Bug 14544: Koha::Virtualshelfcontent[s]

Get rid of AddToShelf and DelFromShelf

Bug 14544: Allow a user to delete his own contents

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Get rid of GetAllShelves
Jonathan Druart [Thu, 16 Jul 2015 11:29:48 +0000 (12:29 +0100)]
Bug 14544: Get rid of GetAllShelves

Signed-off-by: Koha Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Move share routines to Koha::Virtualshelfshare and Koha::Virtualshelfshares
Jonathan Druart [Thu, 16 Jul 2015 10:24:56 +0000 (11:24 +0100)]
Bug 14544: Move share routines to Koha::Virtualshelfshare and Koha::Virtualshelfshares

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Get rid of ModShelf
Jonathan Druart [Wed, 15 Jul 2015 16:26:09 +0000 (17:26 +0100)]
Bug 14544: Get rid of ModShelf

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Get rid of DelShelf
Jonathan Druart [Wed, 15 Jul 2015 16:16:34 +0000 (17:16 +0100)]
Bug 14544: Get rid of DelShelf

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Get rid of AddShelf
Jonathan Druart [Wed, 15 Jul 2015 16:06:35 +0000 (17:06 +0100)]
Bug 14544: Get rid of AddShelf

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Get rid of GetShelf
Jonathan Druart [Wed, 15 Jul 2015 13:43:34 +0000 (14:43 +0100)]
Bug 14544: Get rid of GetShelf

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14544: Add Koha::Virtualshelf and Koha::Virtualshelves
Jonathan Druart [Wed, 15 Jul 2015 13:21:01 +0000 (14:21 +0100)]
Bug 14544: Add Koha::Virtualshelf and Koha::Virtualshelves

The 2 modules C4::VirtualShelves and C4::VirtualShelves::Page are really badly
coded and buggy.
It became complicated to fix and enhance them.
This rewrite will make the code more robust and the list feature will be easier
to change.

Some new modules are added to the Koha namespace (Koha::Virtualshelf,
Koha::Virtualshelves, Koha::Virtualshelfshare[s] and Koha::Virtualshelfcontent[s])
to take advantage of Dbix::Class.

The patchset fixes some bugs:
1/ Bug 6279 - Can't delete lists from the second page of lists in the OPAC
2/ The owner of a list should not need any permission to remove content from
his lists.
3/ No feedback messages when actions are done

Test plan:
A) Intranet and OPAC
1/ Create more than 20 private and public lists with different users
2/ Edit some and confirm that the changes are taken into account
3/ Share some lists with other users
4/ Add / remove contents
Be sure you have some lists with more than 20 items (to test the pagination)
5/ Play with permissions and confirm it works as expected.
For private lists:
They should not be viewed by anyone else, if they are not shared
If they are shared (OPAC only):
a. "Allow anyone else to add entries"
  Should allow the user with whom the list is shared to add entries.
b. "Allow anyone to remove his own contributed entries."
  Should allow the user with whom the list is shared to remove his own entries.
c. "Allow anyone to remove other contributed entries."
  Should allow the user with whom the list is shared to remove any entries.

For public lists:
They should be viewed by anyone else.
a. "Allow anyone else to add entries"
  Should allow any user to add entries.
b. "Allow anyone to remove his own contributed entries."
  Should allow any user to remove his own entries.
c. "Allow anyone to remove other contributed entries."
  Should allow any user to remove any entries.

6/ Download and sent lists.

7/ Confirm that the "Add to" feature works as expected.

8/ Confirm that the "Add an item to" works as expected.

9/ Delete some lists.

10/ Print some lists and subscribe to the RSS feed (OPAC only) (with more than
20 items).

11/ Use the remove "Remove share" links.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14965: Remove C4::Dates from 'lists' in folder reports
Marc Véron [Tue, 6 Oct 2015 12:39:38 +0000 (14:39 +0200)]
Bug 14965: Remove C4::Dates from 'lists' in folder reports

Remove C4::Dates from:

- reports/bor_issues_top.pl
- reports/borrowers_out.pl
- reports/cat_issues_top.pl
- reports/itemslost.pl

To test:

- Go to Home > Reports
- Verify that following reports behave as before:
  - 'Patrons with the most checkouts (reports/bor_issues_top.pl)
  - 'Most circulated items' (reports/cat_issues_top.pl)
  - 'Patrons who haven't checked out (reports/borrowers_out.pl)
  - 'Items lost'

Amended to fix issue with reports/borrowers_out.pl / see comment #3
Amended to fix issue with reports/bor_issues_top.pl / see comment #7
http://bugs.koha-community.org/show_bug.cgi?id=14965

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Code OK. The 4 reports works for me as before (same results).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 15098: Itemtype description missing from facets for itypes in a search group
Bernardo Gonzalez Kriegel [Wed, 4 Nov 2015 12:24:10 +0000 (09:24 -0300)]
Bug 15098: Itemtype description missing from facets for itypes in a search group

This patch adds a second variable to hold item types info
just for facets.

In case we have an item type in a search category, it's description
is removed from GetItemTypesCategorized, which is good for advanced
search, but no for facets

A second var is needed which holds all item type info.

To test:
On top of Bug 15092 patches (no really needed, but I write this on top
of them)
1) Add an item type to a search group
2) Do a search in opac, in facets will see only item type code,
no description, for that item type
3) Apply the patch
4) Repeat search, now description must be present

Followed test plan including translated descriptions. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 15123: Acquisition: Better context for "Transferred from..." to avoid ambiguity...
Marc Véron [Wed, 4 Nov 2015 09:58:50 +0000 (10:58 +0100)]
Bug 15123: Acquisition: Better context for "Transferred from..." to avoid ambiguity in translation

This patch moves the word "basket" out of the <a> tags to have a better context for translation.

To test:
- Transfer an order from one basket to another basket
- Verify that "basket" is detached from the strings "Transferred to" rsp
  "Transferred from" by th <a> tag (See screenshot)
- Apply patch
- Verify that the word "basket" is now otuside the <a> tags

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tested with es-ES

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agobug 15112: Make greybox consistent size across label/card creator
Liz Rea [Mon, 2 Nov 2015 23:20:25 +0000 (12:20 +1300)]
bug 15112: Make greybox consistent size across label/card creator

Also fixes minor issue with buttons stacking on patroncards/edit-batch
and labels/label-manage

To test:

Export a batch every way you can:

multiple together from label/label-manage
individual items from labels/label-edit-batch
selected items from labels/label-edit-batch
export full batch from labels/label-edit-batch

multiple together from patroncards/manage
individual cards from patroncards/manage
individual cards from patroncards/edit-batch
selected cards from patroncards/edit-batch
export full batch from patroncards/edit-batch

Also notice that before this patch, the delete and export buttons
were stacking on the table rows, and  that now they are not doing
that anymore. It may take a force refresh to see the behaviour and
the change.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 14955: Don't double encode chars in the "Show more" link
Jonathan Druart [Mon, 5 Oct 2015 10:17:23 +0000 (11:17 +0100)]
Bug 14955: Don't double encode chars in the "Show more" link

Bug 13789 has fixed this issue for the facet links (select/unselect) but
not for the "Show more" facets link.

This patch reuses the "url" variable, generated for the facets, for
these links. A new "local_url" variable is used to build links for each
entry.

Test plan (for OPAC and intranet):
- Search for a very common term
- Filter the results using facets
- You should get more than 5 entries for a facet and 1 selected:
Author
 author 1
 author 2 [x] # Selected
 author 3
 author 4
 author 5
 Show more # you see this link if there is 5+ values for this facet
- Click on the Show more link
Without this patch, the url contains double-encoded characters and you
will certainly don't get any results
With this patch, you should get results.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 15066: Make transfer rotating collection works under Plack
Jonathan Druart [Tue, 27 Oct 2015 09:21:24 +0000 (09:21 +0000)]
Bug 15066: Make transfer rotating collection works under Plack

This patch the 2 following errors:
Undefined subroutine &C4::RotatingCollections::transferbook called at
C4/RotatingCollections.pm line 451.
Undefined subroutine &C4::RotatingCollections::GetTransfers called at
C4/RotatingCollections.pm line 450.

And this warning:
"my" variable $colId masks earlier declaration in same scope at
/home/koha/src/rotating_collections/transferCollection.pl line 75.

Test plan:
Create a rotating collection
Transfer it to another branch
It should work with this patch

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 15092: (followup) Descriptions not show for search categories
Bernardo Gonzalez Kriegel [Tue, 3 Nov 2015 18:15:54 +0000 (15:15 -0300)]
Bug 15092: (followup) Descriptions not show for search categories

If we have some item types in search categories, description
is not show in opac advanced search

To test:
1) Add some item type to a search category
2) Go to OPAC > Advanced search
empty description for that category
3) Apply the patch
4) Repeat 2), description must be present

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 13799: Add types for patron's fields in Swagger spec
Julian Maurice [Wed, 4 Nov 2015 13:29:19 +0000 (14:29 +0100)]
Bug 13799: Add types for patron's fields in Swagger spec

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 13799: Rename t/.../v1/borrowers.t to t/.../v1/patrons.t
Julian Maurice [Fri, 30 Oct 2015 07:49:23 +0000 (08:49 +0100)]
Bug 13799: Rename t/.../v1/borrowers.t to t/.../v1/patrons.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 13799: Reword 'borrower' to 'patron'
Julian Maurice [Wed, 7 Oct 2015 15:19:34 +0000 (17:19 +0200)]
Bug 13799: Reword 'borrower' to 'patron'

Also, complete the Swagger definition of a patron

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 13799: Change 'required' value type from string to boolean
Julian Maurice [Wed, 7 Oct 2015 12:19:58 +0000 (14:19 +0200)]
Bug 13799: Change 'required' value type from string to boolean

String is not accepted as a valid value in more recent versions of
Swagger2 module

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 13799: Allow to set Mojolicious secret in $KOHA_CONF
Julian Maurice [Wed, 7 Oct 2015 09:10:12 +0000 (11:10 +0200)]
Bug 13799: Allow to set Mojolicious secret in $KOHA_CONF

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 13799: Change Mojolicious default mode to 'production'
Julian Maurice [Wed, 7 Oct 2015 09:00:45 +0000 (11:00 +0200)]
Bug 13799: Change Mojolicious default mode to 'production'

This avoid getting a debug page when URL is wrong.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 13799: (QA followup) make tests use random data
Tomas Cohen Arazi [Thu, 24 Sep 2015 17:21:55 +0000 (14:21 -0300)]
Bug 13799: (QA followup) make tests use random data

With the introduction of TestBuilder there's no need to
rely on existing data on the DB (the original patch relies
on categories and branches already existing).

This patch creates a random branch, category and two borrowers
with the fixed data that is needed for the tests. It adjusts
the tests to use the randomized data instead of the previously
fixed one.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
The feature works as expected and all tests passes. koha-qa.pl too.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 13799: Fix API unit tests
Julian Maurice [Wed, 23 Sep 2015 08:06:13 +0000 (10:06 +0200)]
Bug 13799: Fix API unit tests

They were failing because of the now required 'borrowers' permission

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 13799: Add missing license notices
Julian Maurice [Tue, 22 Sep 2015 09:08:53 +0000 (11:08 +0200)]
Bug 13799: Add missing license notices

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 13799: Add cookie-based authentication to REST API
Julian Maurice [Mon, 31 Aug 2015 15:00:52 +0000 (17:00 +0200)]
Bug 13799: Add cookie-based authentication to REST API

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 13799: RESTful API with Mojolicious and Swagger2
Julian Maurice [Wed, 4 Mar 2015 15:46:33 +0000 (16:46 +0100)]
Bug 13799: RESTful API with Mojolicious and Swagger2

Actual routes are:
  /borrowers
    Return a list of all borrowers in Koha

  /borrowers/{borrowernumber}
    Return the borrower identified by {borrowernumber}
    (eg. /borrowers/1)

There is a test file you can run with:
  $ prove t/db_dependent/rest/borrowers.t

All API stuff is in /api/v1 (except Perl modules)
So we have:
  /api/v1/script.cgi     CGI script
  /api/v1/swagger.json   Swagger specification

Change both OPAC and Intranet VirtualHosts to access the API,
so we have:
  http://OPAC/api/v1/swagger.json   Swagger specification
  http://OPAC/api/v1/{path}         API endpoint
  http://INTRANET/api/v1/swagger.json   Swagger specification
  http://INTRANET/api/v1/{path}         API endpoint

Add a (disabled) virtual host in Apache configuration api.HOSTNAME,
so we have:
  http://api.HOSTNAME/api/v1/swagger.json   Swagger specification
  http://api.HOSTNAME/api/v1/{path}         API endpoint

Add 'unblessed' subroutines to both Koha::Objects and Koha::Object to be
able to pass it to Mojolicious

Test plan:
  1/ Install Perl modules Mojolicious and Swagger2
  2/ perl Makefile.PL
  3/ make && make install
  4/ Change etc/koha-httpd.conf and copy it to the right place if needed
  5/ Reload Apache
  6/ Check that http://(OPAC|INTRANET)/api/v1/borrowers and
     http://(OPAC|INTRANET)/api/v1/borrowers/{borrowernumber} works

Optionally, you could verify that http://(OPAC|INTRANET)/vX/borrowers
(where X is an integer greater than 1) returns a 404 error

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 15014: Returns 0 if everything went fine
Jonathan Druart [Fri, 16 Oct 2015 09:02:26 +0000 (09:02 +0000)]
Bug 15014: Returns 0 if everything went fine

Be kind and return 0 if the sample file has been generated correctly.
Otherwise you are a bad guy and you make Plack returns an internal error
(exited nonzero: 1 at /home/vagrant/kohaclone/tools/import_borrowers.pl line 390.)

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Works as expected
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected here too.

5 years agoBug 12933: DBRev 3.21.00.050
Tomas Cohen Arazi [Wed, 4 Nov 2015 15:45:51 +0000 (12:45 -0300)]
Bug 12933: DBRev 3.21.00.050

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 12933: (QA followup) Add missing notice templates and other small fixes
Katrin Fischer [Sat, 24 Oct 2015 18:58:04 +0000 (20:58 +0200)]
Bug 12933: (QA followup) Add missing notice templates and other small fixes

- Fixes page title of slip print window: Members > Patrons
- Fixes error message if no notice template is found
- Fixes a stray template variable that resulted in the
  borrower number showing in the 'Print' pull down
- Fixes xt/sample_notices.t by adding the sample notice to
  it-IT and es-ES

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 12933: (QA followup) Rename GetOverdues to GetOverduesForPatron
Kyle M Hall [Mon, 26 Jan 2015 13:39:17 +0000 (08:39 -0500)]
Bug 12933: (QA followup) Rename GetOverdues to GetOverduesForPatron

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 12933: (QA followup) Add Unit Tests
Kyle M Hall [Fri, 2 Jan 2015 00:18:18 +0000 (19:18 -0500)]
Bug 12933: (QA followup) Add Unit Tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 12933: (QA followup) Rename parse_letter to parse_overdues_letter
Kyle M Hall [Thu, 1 Jan 2015 23:48:03 +0000 (18:48 -0500)]
Bug 12933: (QA followup) Rename parse_letter to parse_overdues_letter

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 12933: Add new OVERDUES_SLIP letter
Kyle M Hall [Tue, 16 Dec 2014 13:10:02 +0000 (08:10 -0500)]
Bug 12933: Add new OVERDUES_SLIP letter

Signed-off-by: Amy Purvis <APurvis@galencollege.edu>
Signed-off-by: Laurie McKee <lmckee@littleelm.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 12933: Add ability to print overdue slip from staff intranet
Kyle M Hall [Tue, 16 Sep 2014 16:51:13 +0000 (12:51 -0400)]
Bug 12933: Add ability to print overdue slip from staff intranet

Some librarians would like to be able to print an overdues slip from the
staff intranet. This slip would be defined as the print transport
version of the ODUE slip.

Test Plan:
1) Apply this patch
2) Locate a patron with overdues
3) Define a print version of the OVERDUES_SLIP slip
4) Try Print > Print overdues

Signed-off-by: Amy Purvis <APurvis@galencollege.edu>
Signed-off-by: Laurie McKee <lmckee@littleelm.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 15095: marc_modificacation_template_actions DB not consistent between fresh and...
Tomas Cohen Arazi [Sat, 31 Oct 2015 14:57:42 +0000 (11:57 -0300)]
Bug 15095: marc_modificacation_template_actions DB not consistent between fresh and updated DB

A review of the 3.20.00 + upgrade DB, compared to a fresh master install
highlighted an inconsistency on that table. This is mysqldbcompare's
output for it:

-   `action` enum('delete_field','update_field','move_field','copy_field','copy_and_replace_field') COLLATE utf8_unicode_ci DEFAULT NULL,
?                                                                        -------------------------                          ^^^^^^
+   `action` enum('delete_field','update_field','move_field','copy_field') COLLATE utf8_unicode_ci NOT NULL,

So one ENUM value is missing on fresh installs, and an upgraded one
yields a DEFAULT NULL configuration for the 'action' column.

To test:
1) have a v3.20.00 DB:
  > CREATE DATABASE koha_master_upgraded;
  $ git checkout v3.20.00
  $ mysql koha_master_upgraded < installer/data/mysql/kohastructure.sql
2) upgrade it to latest master by running:
  $ git checkout origin/master
  $ perl installer/data/mysql/updatedatabase.pl
3) Create a new DB
  > CREATE DATABASE koha_master_fresh;
  $ mysql koha_master_fresh < installer/data/mysql/kohastructure.sql
4) Run mysqldbcompare (you need mysql-utilities installed for that)
  $ mysqldbcompare --difftype=differ --server1=root@localhost \
                   --skip-data-check --skip-table-options \
                   --run-all-tests  koha_master_upgraded:koha_master_fresh
=> FAIL: You will notice the marc_modification_template_actions discrepancy
- Repeat from 1), but apply this patch on 2) before the upgrade.
=> SUCCESS: The DB's discrepancies are now irrelevant [1]
- Sign off :-D

[1] Only KEY definition order is 'wrong', but it is not relevant.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 11431: DBRev 3.21.00.049
Tomas Cohen Arazi [Wed, 4 Nov 2015 15:09:28 +0000 (12:09 -0300)]
Bug 11431: DBRev 3.21.00.049

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 11431: (QA followup) Make audio alerts sql top level
Kyle M Hall [Wed, 4 Nov 2015 15:08:39 +0000 (10:08 -0500)]
Bug 11431: (QA followup) Make audio alerts sql top level

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
5 years agoBug 11431: (QA followup) Typo in help file / variable name
Katrin Fischer [Sat, 24 Oct 2015 10:01:52 +0000 (12:01 +0200)]
Bug 11431: (QA followup) Typo in help file / variable name

Fixes the variable name to avoid a double-up that made it
impossible to turn off the sounds in general. If AudioAlerts
are turned off, they will only work on the audio administration
page now so you can set up and test the different sounds there.

Also fixes a little typo in the help file.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>