]> git.koha-community.org Git - koha.git/log
koha.git
9 years agoBug 8064: Little fix for 003, 005, 008 in MARC21
Stefano Bargioni [Tue, 11 Mar 2014 09:22:12 +0000 (10:22 +0100)]
Bug 8064: Little fix for 003, 005, 008 in MARC21

I found a little bug in the patch. Subfield '@' of tags 003, 005, 008 in
MARC21 were not correctly handled by function check_mandatory() in
merge.tt. I fixed the problem. In my opinion, the patch can be signed
off.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 8064: Fix issues with control fields and non-repeatable check
Julian Maurice [Fri, 20 Dec 2013 10:01:09 +0000 (11:01 +0100)]
Bug 8064: Fix issues with control fields and non-repeatable check

Fields < 010 were systematically unchecked during target rebuild because
they have no subfields (unchecking manually all subfields of a field
automatically uncheck the field)
When user check a field or a subfield, we have to uncheck it before
calling (sub)field_can_be_added. Otherwise, field is treated as if it
was already in target record, and this is a problem for non-repeatable
fields.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 8064: Change the way target record is built.
Julian Maurice [Wed, 6 Nov 2013 11:17:45 +0000 (12:17 +0100)]
Bug 8064: Change the way target record is built.

Instead of copying/removing a piece of DOM in target record each time a
checkbox is checked/unchecked, the target record is *entirely* rebuilt
each time a checkbox is checked/unchecked.
This is slower but allow for a more consistent and less error-prone
behaviour.

This patch also fix the mandatory check for subfields

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 8064: Merge several biblios
Julian Maurice [Tue, 28 May 2013 14:24:53 +0000 (16:24 +0200)]
Bug 8064: Merge several biblios

This patch improves the existing merging tool by adding possibility to
merge more than 2 biblios.
There is no functional changes:
  - Add some biblios to a list
  - In the list check some biblios and click on 'Merge selected records'
  - Choose the biblio which will be kept, all others will be deleted
  - On the next page you have all biblios you chose in tabs (left side
    of the screen) and the preview of result (right side)
  - Pick some fields or subfields from records that will be deleted or
    delete some fields from reference record.
  - Click on 'Merge', if there is no errors you are redirected to the
    biblio view.

Added checks for non-repeatable subfields
Added checks for mandatory fields and subfields before submitting the
form.
Added a final report which display deleted records (see syspref
MergeReportFields)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14402: (QA followup) Add notes to usage text about --fees
Kyle M Hall [Tue, 15 Sep 2015 12:28:45 +0000 (08:28 -0400)]
Bug 14402: (QA followup) Add notes to usage text about --fees

Added notes to usage in misc/cronjobs/cleanup_database.pl that
--fees DAYS requires DAYS to be greater than or equal to 1.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14402: Make purge_zero_balance_fees() delete fees with NULL balance.
Barton Chittenden [Thu, 10 Sep 2015 22:03:43 +0000 (22:03 +0000)]
Bug 14402: Make purge_zero_balance_fees() delete fees with NULL balance.

Also, add notes to perldocs and usage that payments and
credits are not linked to fines and may be deleted
independently of the associated fine.

Signed-off-by: Nancy Keener <nkeener@washoecounty.us>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14402: Add option --fees to /misc/cronjobs/cleanup_database.pl
Barton Chittenden [Sat, 18 Jul 2015 20:29:29 +0000 (13:29 -0700)]
Bug 14402: Add option --fees to /misc/cronjobs/cleanup_database.pl

This will call C4::Accounts::purge_zero_balance_fees to remove all rows
from accountlines which have 0 balance, and are more than DAYS old.

Test plan:

  Run: t/db_dependent/Accounts.t

If all unit tests pass, the --fees option to /misc/cronjobs/cleanup_database.pl
should act as documented, because it is a straight pass-through to
C4::Accounts::purge_zero_balance_fees().

http://bugs.koha-community.org/show_bug.cgi?id=14402

Signed-off-by: Nancy Keener <nkeener@washoecounty.us>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14402: Add unit tests for purge_zero_balance_fees()
Barton Chittenden [Sat, 18 Jul 2015 19:58:51 +0000 (12:58 -0700)]
Bug 14402: Add unit tests for purge_zero_balance_fees()

The function C4::Accounts::purge_zero_balance_fees() should delete rows
in accountlines where amountoutstanding is 0 and accountlines.date is
less than the current date minus '$days', i.e a number of days passed
to the function. Tests were added to prove the following:

* accountlines.amountoutstanding is 0, and date is set to CURRENT_DATE.
  The accountlines row should not be deleted. This is merely a sanity check,
  because difference between today's date and the fee date cannot be
  greater than $days.
* 'Before', 'On' and 'After' tests for accountlines.amountoutstanding = 0
    * accountlines.amountoutstanding is 0, and date is set to $days - 1
      days ago. The accountlines row should not be deleted.
    * accountlines.amountoutstanding is 0, and date is set to $days
      days ago.  the accountlines row should not be deleted, because
      the difference must be *greater* than $days.
    * accountlines.amountoutstanding is 0, and date is set to $days + 1
      days ago. The accountlines row *will* be deleted in this case.
* 'Before', 'On' and 'After' tests for accountlines.amountoutstanding > 0.
  (3 tests). The accountlines row will never be deleted, because
  amountoutstanding is not 0.
* 'Before', 'On' and 'After' tests for accountlines.amountoutstanding < 0.
  (3 testes) This tests credits. Again, the accountlines row will never
  be deleted, because amountoutstanding is not 0.

http://bugs.koha-community.org/show_bug.cgi?id=14402

Signed-off-by: Nancy Keener <nkeener@washoecounty.us>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14402: Add function purge_zero_balance_fees to C4/Accounts.pm
Barton Chittenden [Sat, 18 Jul 2015 18:41:38 +0000 (11:41 -0700)]
Bug 14402: Add function purge_zero_balance_fees to C4/Accounts.pm

http://bugs.koha-community.org/show_bug.cgi?id=14402

Signed-off-by: Nancy Keener <nkeener@washoecounty.us>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 7369: Duplicate item and add dropdown buttons for item actions
Nick Clemens [Sat, 21 Mar 2015 16:27:04 +0000 (12:27 -0400)]
Bug 7369: Duplicate item and add dropdown buttons for item actions

This patch adds a link to duplicate existing items on the edit items screen

To test:
1 - Apply patch
2 - navigate to the edit items screen for a record with existing items
3 - click the duplicate link and ensure item info but not barcode are carried over
4 - save the item and ensure it is added correctly
5 - check that all previous functionality on page works as before

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 15158: Fix t/db_dependent/Circulation/GetTopIssues.t
Julian Maurice [Mon, 9 Nov 2015 13:41:00 +0000 (14:41 +0100)]
Bug 15158: Fix t/db_dependent/Circulation/GetTopIssues.t

create_biblio was returning biblioitemnumber instead of biblionumber.
This can cause problems when biblionumber and biblioitemnumber are not
the same.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14867: userid not generated when defined in BorrowerUnwantedField
Fridolin Somers [Tue, 22 Sep 2015 07:49:39 +0000 (09:49 +0200)]
Bug 14867: userid not generated when defined in BorrowerUnwantedField

When userid is not provided when creating a new patron, it is generated
using surname and firstname.  The bug is when userid is defined in
syspref BorrowerUnwantedField, the input text is missing in patron
creation form. When saving you always get an alert message :
"Username/password already exists". No patron can be created.

This patch corrects by adding this case to userid generation conditions.

Test plan :
- add 'userid' in syspref BorrowerUnwantedField
- try to create a new patron : /cgi-bin/koha/members/memberentry.pl
- there is not input text for userid
- choose non-existing surname and firstname
- click on save
  => Without patch : patron is not created, you see the alert message
     "Username/password already exists"
  => With patch : patron is created, userid is generated with surname
     and firstname
- remove 'userid' in syspref BorrowerUnwantedField and check it can be
  defined in patron creation form

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  The issue is there, and this patch fixes it.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14388: Funds should be sorted by budget_code
Jonathan Druart [Thu, 2 Jul 2015 15:42:16 +0000 (16:42 +0100)]
Bug 14388: Funds should be sorted by budget_code

Before this patch, the funds were sorted by budget_id, which does not
make any sense.

This patch adds a sort by budget_code on the fund list (acqui/acqui-home.pl and
admin/aqbudgets.pl)

Test plan:
On both pages (acqui/acqui-home.pl and admin/aqbudgets.pl) confirm that
the funds are now sorted by fund code (DB column budget_code)

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14687: Patron's transaction history changes items' order after paying fines.
Joonas Kylmälä [Mon, 17 Aug 2015 12:40:05 +0000 (12:40 +0000)]
Bug 14687: Patron's transaction history changes items' order after paying fines.

Sorts Patron's accounting data consistently from newest to oldest.
It doesn't depend on anymore to timestamp (which can be same for multiple
entries) from database but instead uses accountline's id to sort.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 12540: Display "Every" on editing a MMT action if previously selected
Jonathan Druart [Tue, 22 Sep 2015 10:16:28 +0000 (11:16 +0100)]
Bug 12540: Display "Every" on editing a MMT action if previously selected

On creating a marc modification template action, the "All" is changed with
"Every" if the condition field is the same as the original field.

But on editing, the "All" value is not replaced. For consistency, it
should.

Test plan:
1/ Create the following action:
    Copy field 650$x to 650$y if 650$z matches "foobar"
Note that the "All" is replaced with "Every" when the condition is the
same field as the original field.
2/ Save
3/ Edit the action.
The "Every" should be selected.

Without this patch, "All" is selected.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 15151: Avoid DB access to load C4::Members
Tomas Cohen Arazi [Fri, 6 Nov 2015 14:21:56 +0000 (11:21 -0300)]
Bug 15151: Avoid DB access to load C4::Members

In order to avoid loading Koha::NorwegianPatronDB a DB query was
used. Instead, a require should be used. This causes non-db_dependent
tests that load C4::Members to fail.

To test:
- Shut mysql down
  $ sudo service mysql stop
- Run the tests:
  prove t/Circulation_barcodedecode.t
=> FAIL: DB connection is expected, tests fail
- Apply the patch
- Run the tests:
  prove t/Circulation_barcodedecode.t
=> SUCCESS: Tests pass
- Sign off .-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
9 years agoBug 14878: (QA followup) Remove useless diag
Tomas Cohen Arazi [Fri, 6 Nov 2015 17:42:28 +0000 (14:42 -0300)]
Bug 14878: (QA followup) Remove useless diag

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
9 years agoBug 14878: Tests - Create the branchcodes when needed
Jonathan Druart [Tue, 22 Sep 2015 16:34:16 +0000 (17:34 +0100)]
Bug 14878: Tests - Create the branchcodes when needed

Tests assume that the branchcodes CPL/MPL/etc. already exist in the DB.
If they need them, they should create them.

Test plan:
Execute the differente test files on a DB without any branchcode or
at least without CPL/MPL branches.
Confirm that the tests pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>