Commit Graph

32538 Commits

Author SHA1 Message Date
Katrin Fischer a62ab43562 Bug 10676: Add unit tests - GetItemsInfo
To test:
  prove t/db_dependent/Items.t

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4e139a237b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 97f41c827f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-03-05 15:57:05 +00:00
Katrin Fischer 3e33394757 Bug 10676: Fix behaviour of OpacHiddenItems for items.restricted
The numerical restricted value was overwritten in GetItemsInfo
with the description. So OpacHiddenItems would only work for
restricted using the description, not the numerical value
of the authorised value like for other similar status fields.

This changes GetItemsInfo to use a separate variable for
the description, as it's already done for notforloan and
changes the template files where the variable is used
accordingly.

To test
- Before applying patch
- Configure OpacHiddenItems with:
  restricted: [1]
- Find a record with more than one item and mark one of the items
  as "Restricted Access"
  (assume standard sample data - check authorised value if status doesn't exist)
- Verify the item is still shown in OPAC.
- Apply patch
- Verify that the item is now hidden
- Verify that the status still displays nicely in the staff detail page
- Delete OpacHiddenItems
- Verify that the status is showing nicely in the OPAC detail page

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 39d2885d13)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ceb74447df)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-03-05 15:56:20 +00:00
Magnus Enger 2e8092c678 Bug 12488: Make bulkmarcimport.pl -d use DELETE instead of TRUNCATE
On MySQL >= 5.5 bulkmarcimport.pl with the -d (delete) switch gives
an error like "Cannot truncate a table referenced in a foreign
key constraint". This patch proposes to replace the offending
TRUNCATE with DELETE. Auto incerement counters are reset to 1 to
preserve the functionality from TRUNCATE.

To test:
- Make sure you havae a test database with some records and items
- Run bulkmarcimport.pl with the -d switch
- Observe the error described above
- Apply this patch
- Run bulkmarcimport.pl with the -d switch again
- Observe the lack of an error
- Verify that the newly imported records and items have biblionumber
  and itemnumbers starting with 1

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b7b4694666)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1e65ab6f7f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-03-05 15:26:12 +00:00
Nick Clemens 0dd262a02e Bug 22067: Return if no patron passed to can_see_patron_infos
To test:
1 - Find an adult patron
2 - Add a child to their account
3 - Delete the parent from the db
4 - Attempt to edit the child record
5 - Apply patch
6 - Repeat
7 - Note you can edit the child account
8 - Note guarantor id is not a link

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
No blocker for me, but we are a bit hiding that guarantorid probably should
be a foreign key cleared to NULL at deletion time.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5324268e09)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e7201d27af)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-03-04 22:17:13 +00:00
Lucas Gass 1fc4721ec2 Update release notes for 18.05.10 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-28 00:44:57 +00:00
Lucas Gass e8a0db5c0f Increment version for 18.05.10 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-28 08:34:22 -07:00
Lucas Gass ac78db521c Bug 22395: reverting 21986
This reverts commit e2cfc2615c.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-28 00:12:41 +00:00
Lucas Gass 5fcf912584 Bug 13515: Schema Updates
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-26 05:07:17 +00:00
Lucas Gass 7b94dfaa2d Bug: 13515 DBRev 18.05.09.001
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-25 22:59:29 +00:00
Jonathan Druart 71476f801e Bug 13515: Fix constraint name before deleting it
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1f23384475)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit edd9be57b8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-25 22:39:01 +00:00
Alex Arnaud 9fd399263a Bug 13515: Add unit tests
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 11b9bb3da9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b5061a7319)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-25 22:37:29 +00:00
Jonathan Druart 5bf0567952 Bug 13515: Add a foreign key constraint to messages.borrowernumber
This patch adds a missing foreign key constraint to
mesages.borrowernumber.
To create it sucessfully the entries from the messages table that are
not linked with an existing patron will be removed.

Test plan:
0/ Do not apply the patch
1/ Add messages to different patrons
2/ Delete one of the patron's record
3/ Have a look at the messages table and notice that the messages for
the deleted patron's record still appear
4/ Apply the patch and execute the update DB entry
5/ Have a look again at the messages table and notice that the messages
for the deleted patron's record have been removed
6/ Delete a patron that have messages
7/ Notice that now the messages are deleted when the patron's record is
deleted

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0daa02a961)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a224d0598e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-25 22:36:49 +00:00
Jesse Maseto 964ce52464 Update release notes for 18.05.09 release 2019-02-22 12:45:22 +00:00
Jesse Maseto 8ae73088f7 Increment version for 18.05.09 release
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-02-22 12:27:47 +00:00
Koha translators a9ece1a15d Translation updates for Koha 18.05.09
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-02-22 08:59:47 -03:00
Katrin Fischer 3947327b65 Bug 21441: Fix wrong reference to a 'holds' table on system information tab
It looks like a typo snuck in on the about page, listing a holds
table instead of reserves.

To test:
- Manually create the same PK (reserve_id) in reserves and old_reserves
- Verify that the message on about > system information now
  correctly lists those tables (not holds and old_reserves)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit cfea47cb06)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d7c112bc0e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-14 22:47:06 +00:00
Jasmine Amohia 03bdf5de73 Bug 21840: Fixed some typos in the templates
intranet-tmpl/prog/en/modules/ill/ill-requests.tt:13
Bibliograpic record ID --> Bibliographic record ID

intranet-tmpl/prog/en/modules/acqui/basket.tt:547
Can't cancel order, ([% books_loo.holds_on_order | html %]) holds are linked with this order cancel holds first -->  ... with this order. Cancel holds first

intranet-tmpl/prog/en/modules/acqui/parcel.tt
Can't cancel order, ([% loop_order.holds_on_order | html %]) holds are linked with this order cancel holds first --> ... with this order. Cancel holds first

intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt:32
Print this slabel --> Print this label

Test plan:
1. Check that the fixes in the patch are correct

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7a58d02159)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a6945032da)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-14 22:43:12 +00:00
Kyle M Hall 81ae463c1e Bug 21829: (QA follow-up) - Update the number of unit tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f3f5b98fd9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 60b1a4f836)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-14 22:35:11 +00:00
Jonathan Druart 5493a99486 Bug 21829: Correctly format dateexpiry in notices (date only)
dateexpiry is a date, we should not display the time
part in notice.

Test plan:
Create a notice with borrowers.dateexpiry, generate this notice.
The value should be displayed without the time part

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5b160af2a0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ecb86a84c1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-14 22:34:50 +00:00
Jonathan Druart f7bcb149d5 Bug 21829: Add tests for dateexpiry format in notices
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 04e121a741)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1106c0fa59)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-14 22:34:24 +00:00
Katrin Fischer c627ae1810 Bug 22119: Add price formatting in more places in circulation
This adds some missing Price filters to some places in circulation.
To check verify the amount are displayed according to setting
of CurrencyFormat (use FR or CH for seeing a change)

Use a patron account with no pending fines at the beginning
for all tests.

1)
- Switch RentalFeesCheckoutConfirmation to "Ask"
- Check out an item with a rental charge
- Verify message is formatted correctly:
  Rental charge for this item: ...

2)
- Switch RentalsInNoissuesCharge to "Don't include"
- Make sure patron has only Rental fines on their account
- Check out another item
- Verify message is formatted correctly:
  The patron has unpaid charges for holds, rentals etc ...

3)
- Switch BatchCheckouts to "Allow"
- Add the patron category of your test patron to BatchCheckoutsValidCategories
- Checkout any item
- Verify the message in the information column is formatted correctly:
  The patron has unpaid charges for holds, rentals etc of ...

Signed-off-by: Jasmine Amohia <jasmineamohia.student@wegc.school.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit dc6be66e2b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 26c59980fe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-14 22:28:26 +00:00
Katrin Fischer 1212be7e49 Bug 22120: Add price formattig to patron summary print
The patron summary print lists the replacement prices
and rental charges of items and totals them. With this
patch they will be formatted according to the
CurrencyFormat system preference.

To test:
- Find or create a patron with some checkouts
- Make sure some items have replacement price set
  and some have a rental charge
- "Print summary" from the account in staff
- Verify that charges and prices in the checkouts
  table are formatted correctly
- Toggle CurrencyFormat to different settings

Signed-off-by: helene hickey <hickeyhe@wgc.school.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3c2cc8da26)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3638172077)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 23:45:14 +00:00
Katrin Fischer 3c9af06611 Bug 17347: Ignore whitespace before and after on renewing
When an item is checked out, Koha ignores whitespace
at the beginning and the end of the entered barcode.
This makes life easier, if a barcode is C&P from another
page. This patch makes the renewal page behave the same.

To test:
- Checkout an item
- Renew the item from the renew tab or renewal page
  entering the barcode with leading and trailing
  whitespace
- "Barcode not found"
- Apply patch
- Try again
- Barcode should be found now

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0e220869f5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7c881b32b5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 22:41:18 +00:00
Pasi Kallinen f52c6cc83f Bug 21885: Calendar to-date starts before end-date
When adding new holidays to the calendar, you pick the start date,
and then the end date, but the end date calendar will start from
current date, not from the picked start date. Sometimes this means
many extra clicks to pick an end date.

Make the end date calendar start from the beginning date by default.

Test plan:

1) Go to the tools -> calendar
2) Pick a start date somewhere in the future, and then open the
   end date calendar. Notice how it starts before the start date
   of the date range.
3) Apply patch.
4) Pick a start date in the future. The end date calendar should
   automatically default to the same date.
5) Change the start date a day backwards, note how the end date
   does not change.
6) Change the start date after the end date, note how the end date
   adjusts, so it is not in the past.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0939d44c22)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a69fd89124)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 22:35:06 +00:00
Liz Rea 25111a3182 Bug 22282: Fix PDF issue when exporting PDF in French format.
Fixing up QA comments, keeping 1st instance and removing the 2nd.
Original test plan by Christophe Croullebois.

To test :
Without the patch :

1° select in Acquisitions preferences/OrderPdfFormat French 3-page
2° restart plack if needed
3° In acqui/basketgroup.pl select closed tab
4° Click on "Export as PDF" button
5° You should see a blank page saying "Internal Server Error"

With the patch :

Do the same

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0844f2c174)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 981670c68c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 22:16:44 +00:00
Nick Clemens 5675b95d66 Bug 22278: Clear cache when creating new report groups or subgroups
When a user adds a new group we create it, then fetch the groups from the cache. However, we aren't clearing the cache on creation. This patch fixes that

To test:
 0) Start a new report
 1) Pick create for the group
 2) Enter code and value
 3) Save
 4) You remain on the page and value and code are now empty (ok)
 5) BUT: The pull down for the group remains "None" instead of reflecting
    the new group
 6) Open a new tab and browse to reports - note the group exists and the report is in it
 7) On original tab save report again, the group was not selected so is lost
 8) Apply patch
 9) Retest with a new report
10) Group is created, saved, and selected upon save
11) Subsequent edits include the new group
12) Test with subgroups as well

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ea36265697)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f64d0d9038)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 22:11:35 +00:00
Marcel de Rooy 7ce9ac1f7d Bug 21808: Field 711 is not handled correctly in showAuthor XSLT for relator term or code
The test should check $4 or $e for fields ne 111,711.
And should check $4 or $j for 111,711.

Test plan:
Edit a record, add a meeting in 711 without $4 but with $j.
Without this patch the term is not visible, with this patch it is.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6179f23dd8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9199083de8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 21:16:30 +00:00
Kyle M Hall 708fcf8b4c Bug 22097: CataloguingLog should be suppressed for item branch transfers
Bug 18816 missed the fact that a branch transfer triggers ModItem and
thus generates an action log line. We should not be creating those
action logs, especially considering the transfers table itself already
documents the transfer.

Test Plan:
1) Enable CataloguingLog
2) Transfer an item to another branch
3) Note the new action log line created
4) Apply this patch
5) Create another item transfer
6) No new action log line should be created!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b3c25b64b8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0f0218bc83)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 21:12:12 +00:00
Jonathan Druart e347ef104a Bug 21907: Fix article requests count for non-superlibrarians
The query generates "Column 'branchcode' in where clause is ambiguous"

Test plan:
1 - Enable 'IndependentBranchesPatronModifications' and article requests
2 - Sign in as non-superlibrarian
3 - View plack log
4 - Refresh mainpage, see error in logs

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ab9e4ca6a4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9c82370126)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 21:01:13 +00:00
Owen Leonard 3debb1e0dc Bug 16231: Correct permission handling in subscription edit
This patch corrects the way subscription edit menu items are displayed
according to the user's permissions settings.

To test, apply the patch and log in to the staff client as a user who
has permission to create, edit, and delete subscriptions.

- Locate an subscription and view the details for it.
- Confirm that each "Edit" menu item works correctly.
- Repeat the process when logged in as a user with varying combinations
  of create, edit, and delete permissions.
- Test as a user limited by IndependentBranches.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7520ede899)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f2151c1bbc)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 06:01:12 +00:00
Martin Renvoize 60f8ca789f Bug 22254: Correction to datehandling in test
Adding 13 months is not always the same as adding 1 month and then
adding 12 months in DateTime maths.  This patch rectified the test
to match the correct behaviour in koha.

Test plan.

1) Modify the test (around line 268) to test against the suspect
   leap date of 2019-01-31 and watch the test fail.
2) Apply the patch (which also adds this modification to test
   for such a leap date) and watch the test now pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1da0ba48b6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 413f34ba24)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 05:47:07 +00:00
Marcel de Rooy 91f25db7b3 Bug 22236: Translation should generate tags with consistent attribute order
When running misc/translator/translate, the order of attributes in the translated templates is not consistent and may vary. This is caused by the random order of hash keys in perl.

This causes things like this in run 1:
<input type="submit" class="btn" value="Plaats aanvraag" />
And this in run 2:
<input value="Plaats aanvraag" type="submit" class="btn" />
As you can see, there is actually no difference apart from the order.

When comparing the result of various translation runs, I would rather get rid of such noise and only see the real changes.

The needed change is not trivial to find, but only requires a simple addition to a sort operation in tmpl_process3.pl. The current sort only makes sure that the '/' comes at the end. We should sort the names of the keys too when this value is 0 (just meaning: no end tag symbol).

Test plan:
[1] Run a translation without this patch and set a few templates aside.
[2] Run a translation with this patch.
[3] Run a compare (diff) on the templates copied in step 1. Verify that the
    only changes are found in the sort order of attributes in html tags.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fb62e8d1fc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 150de6dfe7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 02:47:52 +00:00
Fridolin Somers 800e3ae8eb Bug 22242: Javascript error in value builder cased by Select2
Same as Bug 17780 but in value builders.

Select2 (Bug 13501) introduced divs and inputs that broke some
assumptions about the expected HTML structure. This patch checks if
input has name attribute, because some inputs in Select2 have not.

It brakes value builders marc21_linking_section.tt and
unimarc_field_4XX.tt.

Test plan :
1)  On a MARC21 database
2)  Define 774$0 as a regular subfield
3)  Define 774$4 with an authorised value category
4)  Define 774$t with value builder marc21_linking_section
5)  Create a new record
6)  Use value builder in 774$t
7)  Search for a record and click choose
8)  Without patch : a popup window does not close and show a blank
    screen
9)  With patch : popup windows get close and you see in field 774 $0 and
    $t field with values
10) Same tests with a UNIMARC database on field 461 with value builder
    unimarc_field_4XX.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Tested successfully with MARC21

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3ca0234d34)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 55b20ad1a7)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 02:44:59 +00:00
Tomas Cohen Arazi a69546fcea Bug 19816: Implement dateonly for rfc3339 format
This patch implements the dateonly option for the rfc3339. This is
described in the OpenAPI 2.0 specification [1]. The required output
format is described on RFC 3339 [2], as 'full-date'.

[1] https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#dataTypeFormat
[2] https://tools.ietf.org/html/rfc3339#section-5.6

To test:
- Apply the regression tests patch
- Run:
 k$ prove t/DateUtils.t
=> FAIL: Tests fail because dateonly is not implemented
- Apply this patch
- Run:
 k$ prove t/DateUtils.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b2dce05ddf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dcc0478089)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 02:41:14 +00:00
Tomas Cohen Arazi 12f0e63b3a Bug 19816: Regression tests
This patch adds tests for the rfc3339 behaviour when dateonly => 1.

To test:
- Run:
  $ kshell
 k$ prove t/DateUtils.t
=> SUCCESS: Tests pass
- Apply this patch
- Run:
 k$ prove t/DateUtils.t
=> FAIL: dateonly is not implemented

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7e69ab62a5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 41115fc79d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 02:40:54 +00:00
Lucas Gass f69a3ef875 Bug 22132: Add RESTBasicAuth syspref - Revert
This reverts commit 5b020c9816.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 00:39:57 +00:00
Lucas Gass 626955bbfd Bug 22132: Unit tests - Revert
This reverts commit 2b12b70de4.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 00:39:19 +00:00
Lucas Gass 2bc1e0f84f Bug 22132: Add Basic authentication to the API - Revert
This reverts commit 2403b01021.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 00:38:41 +00:00
Lucas Gass a59f0f707d Bug 22132: (QA follow-up) Tests - use Mojo builtin for auth - Revert
This reverts commit 7296f1d0bf.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 00:37:34 +00:00
Lucas Gass b3b82d15b6 Bug 22132: (QA follow-up) set_password now expects a hashref - Revert
This reverts commit c028f91674.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 00:36:46 +00:00
Lucas Gass 1521585a47 Bug 22132: DBRev 18.05.08.001 - Revert
This reverts commit 5dd2bed00c.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-12 00:35:50 +00:00
Lucas Gass 5dd2bed00c Bug 22132: DBRev 18.05.08.001
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-07 23:31:38 +00:00
Tomas Cohen Arazi c028f91674 Bug 22132: (QA follow-up) set_password now expects a hashref
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 63f40e519c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3c8f67afe8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-07 23:17:28 +00:00
Martin Renvoize 7296f1d0bf Bug 22132: (QA follow-up) Tests - use Mojo builtin for auth
Mojolicious has built in handling for encoding/decoding of of basic auth
paramenters. We should use it to simplify our test here.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8ee08c3922)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a9b3b01dd9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-07 23:17:03 +00:00
Tomas Cohen Arazi 2403b01021 Bug 22132: Add Basic authentication to the API
This patch implements Basic authentication for the API to aid testers
and developers with tools like Postman.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/auth_basic.t
=> SUCCESS: Tests pass!
- Open Postman or your favourite tool
- In Authorization, choose Basic auth.
- Enter the username and password of a known privileged user.
- Hit an endpoint with Postman, for example:
  ] GET http://kohadev-intra.myDNSname.org:8081/api/v1/patrons
=> SUCCESS: Basic authentication is great!
- 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: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 26af040c79)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 14e2dd9c9f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-07 23:16:36 +00:00
Tomas Cohen Arazi 2b12b70de4 Bug 22132: Unit tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 103670e726)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4730724c66)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-07 23:16:20 +00:00
Tomas Cohen Arazi 5b020c9816 Bug 22132: Add RESTBasicAuth syspref
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3ffed7d55a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3741027605)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-07 23:15:55 +00:00
Olivia Lu fcc13aaf77 Bug 20634: Changing the identical label "Library:" to "Location" in Inventory Home.
To find fix:

1. Go to tools
2. Go to Inventory
3. Verify that under Item location filters the label should be "Location"

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a3993a7582)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 92001cc504)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-07 01:29:26 +00:00
Kyle M Hall 4c5ec5ae42 Bug 21495: Regression in hold override functionality
The changes caused by the patches for bug 11512 have broken existing
workflows for many libraries and are widely considered to be a bad move.
We should revert this behavior.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Rhonda Kuiper <kuiper@roundrocktexas.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3987046624)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e3fde6153e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-02-07 01:19:43 +00:00
Jasmine Amohia 7983a81223 Bug 19994: Used Modern::Perl in Authorities perl scripts
Test plan:
1. Review code of the following files and confirm that 'use Modern::Perl;' is used in place of
'use strict; use warnings;'

auth_finder.pl
authorities-home.pl
authorities.pl
blinddetail-biblio-search.pl
detail-biblio-search.pl
detail.pl
export.pl
merge.pl
merge_ajax.pl

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 843c4a4bae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 69802bed3e)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2019-02-06 18:02:00 +00:00