Commit graph

38594 commits

Author SHA1 Message Date
b422e017ec Bug 23185: Realistic POD for Koha::Objects->search
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2020-05-07 18:20:57 -03:00
fdea245e99 Bug 23185: ->update can only be called on instantiated classes
Since our use ok Koha::Objects, there's been an implicit instantiation
happening in ->search that has somehow hidden the fact that classes need
instantiation...

This change in ->delete and ->update made it clear because of the
failures/hangs on the tests.

This patch instantiates Koha::Patron::Categories before attempting to
call ->update.

The original patches for this bug are correct and the only issue here is
that we need to document better than for some methods, instantiation is
not implicit and is required first. This is awkward and I would prefer
to force everyone to call ->new first. But I understand it would be
inconvenient.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Template/Plugin/Categories.t
=> FAIL: Notice it hangs, Ctrl+c to abort
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests dong hang, and in fact pass
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2020-05-07 18:05:29 -03:00
185d88bac6 Bug 20443: (follow-up) Remove C4::Members::AttributeTypes 2020-05-07 17:05:32 +02:00
4071924f7f
Bug 18308: (RM follow-up) Clarify intent of tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 14:59:35 +01:00
8d97c44b8e
Bug 17355: Fix failing tests
This patch makes the tests pass without deleting mandatory AV cats

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 14:59:30 +01:00
cdf786b0aa
Bug 24163: DBRev 19.12.00.086
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:14:49 +01:00
5eb07b28eb
Bug 24162: Add quantity column to the columns settings config
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:08:58 +01:00
563d316bba
Bug 24162: Add missing filter
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:08:54 +01:00
dccf4518d4
Bug 24162: Add quantity column to the late orders page
This patch add a new column "quantity" to the late orders page

Test plan:
1. Create some orders, close the basket
2. Go to the "Late orders" page
=> You should see a new column "quantity" that contains the number of
items of the order

Sponsored-by: Cork Institute of Technology
Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:08:47 +01:00
a02f0b0777
Bug 24163: UTF-8 encode the output
Specify the UTF-8 charset in the header and Encode the output to avoid encoding issues

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:08:44 +01:00
2042cb6531
Bug 24163: Add the new CSV profile to other installer files
export_format is not populated for other languages apparently...

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:08:41 +01:00
6a5cdfa37f
Bug 24163: (QA follow-up) Fix wordings
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:08:37 +01:00
af4d8a5751
Bug 24163: Add the csv into the DB - as an example
Sponsored-by: Institute of Technology Tralee
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Angela O'Connor Desmond <angela.oconnordesmond@staff.ittralee.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:08:31 +01:00
3cf6d99948
Bug 24163: Allow to define CSV profile for late orders export
This new enhancement adds the ability to create a CSV profile for the late
orders export.
Prior to this, the CSV profile was hardcoded in a template and not
editable (unless you modify the .tt file of course).

The main difficulty of the request was to make the multiple claims dates
accessible from the CSV profile. So far we only accept columns from the
database. However we would like to use the Koha::Acquisition::Order
object to make things easier (it had a ->claims method to access the
different claims).
To acchieve this, we are going to accept the TT syntax for that CSV profile.
It means that only CSV profiles created for 'late_orders' will have the
capability to use the TT syntax (can be extended later of course if
needed).
The alternative was to use specific placeholders, like %claims_count%,
%claimed_date%, but it sounded more powerful and flexible to allow the
TT syntax instead.

Note that the former export (template based) still exists and is the
default option.

Test plan:
0. Apply the patches and execute the update database entry
1. Create some orders, close the basket
2. Claim some of the orders
3. Note the new button at the bottom of the table that have several
entries.
=> The first entry will generate a CSV file using the previous method
=> The second entry will generate it using the new CSV profile, note
that the number of claims as well as the different claims date are
displayed.

4. Bonus point: Edit the CSV profile (Home › Tools › CSV export
profiles) that is named "Late orders (csv profile)", or create a new
one, and modify it.
Export the late orders using this CSV profile and confirm that the
generated CSV file is the one you expect.

Sponsored-by: Institute of Technology Tralee
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Angela O'Connor Desmond <angela.oconnordesmond@staff.ittralee.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:08:21 +01:00
Katrin Fischer
3ebfa1a74a
Bug 15727: Add MARC21 385 - Audience to detail pages
This add 385$m$a to the staff and intranet detail pages.

To test:
- Catalog different variations of 385 and verify the
  display in the OPAC and staff client is ok

Examples can be found in the LOC MARC21 documentation:
http://www.loc.gov/marc/bibliographic/bd385.html

Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:07:02 +01:00
48d887c236
Bug 24769: Regression tests
When regressions are found, we introduce regression tests :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:03:45 +01:00
6ec2d13b9d
Bug 24769: (bug 14711 follow-up 2) Fix typo in parameter name for AddReserve
This patch fixes 2 other occurrences. The first one is in POD of
AddReserve, the other one fixes SIP code

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:03:41 +01:00
05b39b50e0
Bug 24769: (bug 14711 follow-up) Fix typo in parameter name for AddReserve
The parameter is branchcode, not branch.

Test plan:
Place a hold on a biblio using ILSDI
Check that the branchcode is correctly filled with the patron's library

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:03:33 +01:00
Katrin Fischer
031e53958a
Bug 22335: Fix comment on suggestions.STATUS in kohastructure.sql
The description on STATUS was incomplete, missing 2 status and
the SUGGEST_STATUS category.

To test:
- Later this will show up in schema.koha-community.org, but
  for now it can only be verified reading the patch.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:02:46 +01:00
Bernardo Gonzalez Kriegel
0a8775cfab
Bug 7947: (follow-up) fix 490 subfield visibility (IT)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:02:11 +01:00
Bernardo Gonzalez Kriegel
2cbe7bc17a
Bug 7947: (follow-up) fix 490 subfield visibility (DE)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:02:06 +01:00
Bernardo Gonzalez Kriegel
09ccb2e968
Bug 7947: (follow-up) fix 490 subfield visibility (EN)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:02:01 +01:00
Katrin Fischer
9569c5e31f
Bug 7947: Update MARC21 440/490 mapping and visibility in uk-UA installer
440 has been obsoleted in the standard for a long time.
490 is now used for series information.

Changes made here only apply for new installations:
- Hide 440 subfields by default
- Make 490 avx visible by default
- Add mapping biblioitems.seriestitle to 490a
- Add mapping biblioitems.volume to 490v

To test:
- Run the web installer for this language and verify changes
  in all frameworks

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:01:55 +01:00
Katrin Fischer
f298b30fe3
Bug 7947: Update MARC21 440/490 mapping and visibility in ru-RU installer
440 has been obsoleted in the standard for a long time.
490 is now used for series information.

Changes made here only apply for new installations:
- Hide 440 subfields by default
- Make 490 avx visible by default
- Add mapping biblioitems.seriestitle to 490a
- Add mapping biblioitems.volume to 490v

To test:
- Run the web installer for this language and verify changes
  in all frameworks

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:01:50 +01:00
Katrin Fischer
f06bd7be16
Bug 7947: Update MARC21 440/490 mapping and visibility in nb-NO installer
440 has been obsoleted in the standard for a long time.
490 is now used for series information.

Changes made here only apply for new installations:
- Hide 440 subfields by default
- Make 490 3avx visible by default
- Add mapping biblioitems.seriestitle to 490a
- Add mapping biblioitems.volume to 490v

To test:
- Run the web installer for this language and verify changes
  in all frameworks

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:01:45 +01:00
Katrin Fischer
fee4fe4f88
Bug 7947: Update MARC21 440/490 mapping and visibility in pl-PL installer
440 has been obsoleted in the standard for a long time.
490 is now used for series information.

Changes made here only apply for new installations:
- Hide 440 subfields by default
- Make 490 3avx visible by default
- Add mapping biblioitems.seriestitle to 490a
- Add mapping biblioitems.volume to 490v

To test:
- Run the web installer for this language and verify changes
  in all frameworks

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:01:40 +01:00
Katrin Fischer
2b72cd6b12
Bug 7947: Update MARC21 440/490 mapping and visibility in it-IT installer
440 has been obsoleted in the standard for a long time.
490 is now used for series information.

Changes made here only apply for new installations:
- Hide 440 subfields by default
- Make 490 3avx visible by default
- Add mapping biblioitems.seriestitle to 490a
- Add mapping biblioitems.volume to 490v

To test:
- Run the web installer for this language and verify changes
  in all frameworks

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:01:36 +01:00
Katrin Fischer
7a722e5970
Bug 7947: Update MARC21 440/490 mapping and visibility in fr-FR installer
440 has been obsoleted in the standard for a long time.
490 is now used for series information.

Changes made here only apply for new installations:
- Hide 440 subfields by default
- Make 490 3avx visible by default
- Add mapping biblioitems.seriestitle to 490a
- Add mapping biblioitems.volume to 490v

To test:
- Run the web installer for this language and verify changes
  in all frameworks

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:01:30 +01:00
Katrin Fischer
1377375344
Bug 7947: Update MARC21 440/490 mapping and visibility in de-DE installer
440 has been obsoleted in the standard for a long time.
490 is now used for series information.

Changes made here only apply for new installations:
- Hide 440 subfields by default
- Make 490 3avx visible by default
- Add mapping biblioitems.seriestitle to 490a
- Add mapping biblioitems.volume to 490v

To test:
- Run the web installer for this language and verify changes
  in all frameworks

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:01:24 +01:00
Katrin Fischer
05b21df1db
Bug 7947: Update MARC21 440/490 mapping and visibility in en installer
440 has been obsoleted in the standard for a long time.
490 is now used for series information.

Changes made here only apply for new installations:
- Hide 440 subfields by default
- Make 490 3avx visible by default
- Add mapping biblioitems.seriestitle to 490a
- Add mapping biblioitems.volume to 490v

To test:
- Run the web installer for this language and verify changes
  in all frameworks

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 11:01:15 +01:00
Katrin Fischer
21d0d69b4f
Bug 18670: Remove RewriteLog and RewriteLogLevel from sample config files
It looks like RewriteLog will no longer work with Apache 2.4 and later.

RewriteLog
Those familiar with earlier versions of mod_rewrite will
no doubt be looking for the RewriteLog and RewriteLogLevel
directives. This functionality has been completely replaced
by the new per-module logging configuration mentioned above.
http://httpd.apache.org/docs/current/mod/mod_rewrite.html

All lines removed were commented out, so there should be
no change in behaviour or side effects.

To test.
- Verify every mention of RewriteLog has been removed from Koha
- Verify patch by reading it

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 10:59:03 +01:00
8457804bcf
Bug 23185: (RM follow-up) Minor POD wording update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 10:58:20 +01:00
fe2ac51b27
Bug 23185: (QA follow-up) Add POD for Koha::Objects->update
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 10:58:17 +01:00
633befb5f0
Bug 23185: (QA follow-up) Semantics, split fields and options
This patch improves the semantics of the update routine to more clearly
separate the 'fields' we're modifying from the 'options' we wish to
apply to the modification.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 10:58:14 +01:00
6235d0cfa1
Bug 23185: Make Koha::Objects->update loop on the object set if needed
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 10:58:10 +01:00
085cc7c4d2
Bug 23185: Add tests
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 10:58:04 +01:00
cd141a7445
Bug 18308: fix failing tests
#   Failed test 'check_password hook tests'
 #   at t/db_dependent/Koha/Plugins/Patron.t line 83.
 [The password was rejected by a plugin]# Looks like your test exited with 255 just after 5.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 10:52:02 +01:00
0575bc22d1
Bug 18308: (RM follow-up) Fix failing tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-05 10:49:07 +01:00
a6985d167e
Bug 25133: (follow-up) Move changes to timepicker.inc
Witht the changes in calendar.inc there can be a js error where the timepicker is not
included. Moving the changes to timepicker.inc should resolve this

Note: in previous patches the amnames/pmnames were removed. It is possible they had
no effect because they were declared in two files, so I have left them in timepicker.inc

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 13:45:31 +01:00
164b8127e7
Bug 24161: (follow-up) DBIC changes
Define koha_object[s]_class methods

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 12:48:23 +01:00
910acdbcfa
Bug 24161: (follow-up) Fix typo in POD
#   Failed test 'POD test for Koha/Acquisition/Orders.pm'
 #   at /usr/share/perl5/Test/Pod.pm line 187.
 # Koha/Acquisition/Orders.pm (43): Non-ASCII character seen before =encoding in 'uivalent'. Assuming UTF-8
xt/author/podcorrectness.t .. 622/829 # Looks like you failed 1 test of 829.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 12:48:17 +01:00
67f695001a
Bug 25350: Load Emoji picker assets more efficiently
This patch moves the Emoji picker JS assets out of opac-bottom.inc and
into opac-detail.tt. This prevents the assets from being loaded on every
page of the OPAC when they're only used on opac-detail.

The patch also combines and minifies the 4 JavaScript files used by the
feature. opac-detail.tt now loads only the one file.

To test, apply the patch and make sure the TagsEnabled and
TagsInputOnDetail preferences are enabled.

- Log in to the OPAC and view the detail page for a bibliographic
  record.
- Click the "Add tag(s)" link
- Verify that the emoji-picker works for adding emojis

Signed-off-by: David Roberts <david@koha-ptfs.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 09:44:45 +01:00
d6ab917213
Bug 24161: Schema Fixes
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 09:44:45 +01:00
a18e944400
Bug 24161: DBRev 19.12.00.085
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 09:44:45 +01:00
e294eb1dd7
Bug 24161: (follow-up) DB changes
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 09:44:45 +01:00
1cf3f11bbd
Bug 24161: Fix license statements
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 09:44:44 +01:00
6b34eab857
Bug 24161: Display claimed dates vertically
Signed-off-by: Angela O'Connor Desmond <angela.oconnordesmond@staff.ittralee.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 09:44:44 +01:00
6a8f3ba98f
Bug 24161: DBIC manual changes
No idea what's happening with the current_timestamp, but previous change
was wrong.

Signed-off-by: Angela O'Connor Desmond <angela.oconnordesmond@staff.ittralee.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 09:44:44 +01:00
b2de93144a
Bug 24161: Add tests
Sponsored-by: Cork Institute of Technology
Signed-off-by: Angela O'Connor Desmond <angela.oconnordesmond@staff.ittralee.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 09:44:44 +01:00
33745001d1
Bug 24161: Remove GetLateOrders
Sponsored-by: Cork Institute of Technology
Signed-off-by: Angela O'Connor Desmond <angela.oconnordesmond@staff.ittralee.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 09:44:44 +01:00