Commit graph

41427 commits

Author SHA1 Message Date
653fe39625 Bug 26636: Regression tests for undef case
This patch adds tests for the case in which there's no object identified
by the supplied $id. It should return undef.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 10:31:47 +01:00
2294095574 Bug 26636: (QA follow-up) Add POD
Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 10:31:47 +01:00
Agustin Moyano
329d09abb6 Bug 26636: Add objects.find helper
This patch adds the objects.find helper. Much like objects.search, it
returns the to_api method with embedded.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 10:31:47 +01:00
Agustin Moyano
6620c56381 Bug 26636: Add tests
This patch adds tests for the new objects.find helper.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 10:31:47 +01:00
ac7d1124ab Bug 24359: (QA follow-up) Fix tests
This patch fixes a rebase issue, and also makes sure the tests do not
rely on any prior data. The query on tmp_holdsqueue is done against the
actual reserve_id so no need to delete all the data from the
tmp_holdsqueue and hold_fill_targets table.

I also noticed the previous subtest wasn't run inside a transaction even
if the code was designed to not depend on prior data as well.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/HoldsQueue.t
=> SUCCESS: Tests pass!
3. Sign off :-D

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 10:31:46 +01:00
Agustin Moyano
445ca21ff0 Bug 24359: Remove hold from holds queue when captured
This patch removes a hold from holds queue when captured by check in.

To test:

1. check out an item from a book with multiple items for patron_1
2. place a biblio level hold for patron_2
3. perl misc/cronjobs/holds/build_holds_queue.pl
CHECK => holds queue shows the placed hold
4. check in the item from step 1 and confirm hold for patron_2
SUCCESS => hold for patron_2 is no longer in holds queue
5. prove t/db_dependent/HoldsQueue.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 10:31:46 +01:00
Agustin Moyano
cdc668764c Bug 24359: Add test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 10:31:46 +01:00
fce91d2bb0 Bug 27863: Use the /libraries route when AllowHoldsPolicyOverride is set
This patch makes the dropdown for changing the pickup location for
existing holds use the GET /libraries route instead of GET
/holds/:hold_id/pikcup_locations if the configuration allows the
override.

Terminology:
- Pickup location, means a library that is marked as valid pickup
  location on its configuration.

To test:
1. Have the circ rules set so 'Hold pickup library match' is set to
   'Item's home library' or 'Any'. The goal is to be able to
   differentiate when all libraries are returned, from the case only
   'valid pickup locations' are returned. The easiest one is 'Item's
   home library'.
2. Set AllowHoldsPolicyOverride
3. Pick a patron from a library that is not a valid pickup location and
   an item that belongs to a library that doesn't match any of the valid
   ones.
=> SUCCESS: Notice Koha allows you to choose any library (because of the
        syspref)
4. Place the hold.
5. Now check on the holds list for the bib, if you can use the dropdown
   to change the pickup location for the hold
=> SUCCESS: You can, sort of
=> FAIL: It doesn't show/search all pickup locations. It only shows the
        valid ones, even though we should be able to override it.
6. Apply this patch
7. Restart all just in case, and reload the holds page for the bib
8. Repeat 5
=> SUCCESS: You are presented all pickup locations!
9. Sign off :-D

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 09:50:44 +01:00
Phil Ringnalda
f17d3dd62c Bug 26964: Newly created macros should be selected in the Advanced editor
The problem is that the newly created macro isn't selected, because the
return values from the call to create it are accidentally thrown away. There
isn't actually any option to save, just a timeout that automatically saves,
but you can tell you are in this broken state because the Delete macro
button is disabled.

Test plan:

1. Prior to applying the patch, Administration - set the preference
   EnableAdvancedCatalogingEditor to Enable
2. Cataloging - Advanced editor - Macros... - New macro...
3. Give it a name, click OK, notice that the Delete macro button is disabled
4. Apply patch, shift+reload
5. Macros... - New macro...
6. Give it a name, click OK, notice that the Delete macro button is enabled
7. Type something in the editor, delete 999 will do nicely, wait half a
   second to see Saved appear at the far right, close the macro popup
8. Macros..., click the name of your macro, verify it really was saved

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-08 15:15:52 +01:00
Joonas Kylmälä
9dcceb66fa Bug 27058: (follow-up) Clarify notforloan checks with a comment
In IsAvailableForItemLevelRequest the check is for holdability and in
ItemsAnyAvailableAndNotRestricted the check is for
checkoutability. These comments should make it more clear because the
notforloan value is used for these two different purposes and is a bit
confusing (we might want to add a new field "notforhold" in future to
make the code self documenting)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-08 15:15:49 +01:00
8c68fa762e Bug 27058: Add test for IsAvailableForItemLevelRequest and notforloan
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-08 15:15:49 +01:00
Joonas Kylmälä
da81064b8b Bug 27058: Remove confusing and unnecessary $biblionumber1 variable
The code is much more understandable now because with $biblio2 and
$biblionumber1 variables use to point to the same biblio one might
have thought $biblionumber1 points to $biblio1 which in this case is
not true. Let's just drop the extra variable because the object
notation of accessing is just as simple.

To test:
 1) prove t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t => passes

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-08 15:15:49 +01:00
Joonas Kylmälä
18128cc810 Bug 27058: Make checkout availability use all notforloan reasons
The ItemsAnyAvailableAndNotRestricted function is checking whether an
item can be checked out and it incorrectly only checks the positive
notforloan values when there can be also negative notforloan
values. If notforloan value is not 0 then it means the item cannot be
checked out. In the case of ordered items the value is negative (-1)
and thus before this change the checkout availability was reported
incorrectly.

To test:
 1) Run prove t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
    Notice it fails
 2) Apply this patch
 3) Run prove t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
    Notice it passes now.

To test via Koha sandbox (Alternatively):
 1) Create circ rule with If all unavailable
 2) Create new biblio
 3) Order a new item to the biblio via acquisitions and set the not
    for loan value to Ordered / -1
 4) Notice you cannot place a hold to the biblio
 5) Apply patch
 6) Notice you can now place a hold to the biblio

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-08 15:15:49 +01:00
Joonas Kylmälä
1c0acc36ba Bug 27058: Add test to show ordered items cannot be checked out
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-08 15:15:49 +01:00
ca4ef19a2b Bug 27650: Fix variable passed to the template in opac-main
$template->param(
+    koha_news           => @all_koha_news,

We must not pass an array, the number of elements of the hash passed to the template may be inconsistent.

It's working because of an error earlier in the script:
+    @all_koha_news   = &GetNewsToDisplay($news_lang,$homebranch);

GetNewsToDisplay returns an arrayref

Test plan:
Define at least 2 news to display on the OPAC main page
Hit opac-main.pl
=> All news are displayed
Click one
=> You see the single news you selected

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-08 15:15:48 +01:00
e5a44214eb Bug 27886: Move non-rancor code into correct section
The template was including code that was not compatible with Rancor, moving
the end of the conditional seems to fix the error

To test:
1 - Open a record in the advanced catalog editor
2 - Create or edit a 100 field with some content, I used 'bruce'
3 - Press Ctrl+shift+l to launch authority search
4 - Perform a search and select an authority
5 - Note the field copies but the pop-ups don't close
6 - Apply patch
7 - Reload the page
8 - Repeat 1-4
9 - The field copies and the windows close

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-08 15:15:45 +01:00
4f96b6767a Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl
Test plan:
Do some checkouts
Checkin with different return dates (several today however)
Check the circulation history and confirm that the checkout list is correct

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:54:13 +01:00
e54fa9a076 Bug 27851: Use filter_by_todays_checkins in printslip.pl
Test plan:
No regression from bug 12224 test plan

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:54:13 +01:00
d6e65d4f99 Bug 27851: Add Koha::Old::Checkouts->filter_by_todays_checkins
The logic for this code is handled at two different places (and in 2
different ways).
Better to centralize and provide tests

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:54:13 +01:00
6161fc1186 Bug 27851: Add tests
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:54:13 +01:00
7e66d32be4 Bug 12224: DBRev 20.12.00.022
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:54:02 +01:00
Katrin Fischer
05b55cc49f Bug 12224: (follow-up) Format today with KohaDates
Updates the slip templates to use [% today | $KohaDates %].
Adding an explicit USE statement is not necessary in this case.

To test:
- When testing the feature according to the test plan, make sure
  that the date for today shows up formatted to the DateFormat
  system preference.

Note: As we are printing today's checkins, I have intentionally left
oft the time. But it could be easily added if a library wanted it.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:49:04 +01:00
fe2bbc7cd8 Bug 12224: Some code improvements
* Use Koha::Patrons->old_checkouts
* perltidy
* Make sure $today_start and $today_end will always be on the same day
(we never know!)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:49:04 +01:00
7a68ab5178 Bug 12224: (QA follow-up) Ensure patron language is respected
Things have moved on a bit since this code was first written, we now
expect a 'lang' parameter passed into GetPrepparedLetter to allow for
translated notices.

Simple fix, so a quick QA follow-up will suffice :)

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:49:04 +01:00
Aleisha Amohia
7784174e3b Bug 12224: (follow-up) Loop old_issues with itemnumber
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:49:03 +01:00
Aleisha Amohia
28b90b684e Bug 12224: (follow-up) Switching to TT notice
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:49:03 +01:00
Aleisha Amohia
4bf59acce6 Bug 12224: (follow-up) Access old_issues table when editing notice
This QA follow-up allows access to the old_issues table when editing the
notice in Tools.

Signed-off-by: Alexandra Speer <alexandra.speer@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:49:03 +01:00
a343bb5d81 Bug 12224: (follow-up) Move button to patron column in checkins table
This patch moves the "Print checkin slip" out of its own column and into
the colum containing patron information. I think this makes more sense
because the slip is specific to a patron, not the individual item which
has been checked in.

Also changed: printcheckinslip function should be triggered via a class,
not a non-unique ID. The function should handle the click using
"preventDefault" rather than "return false."

To test, apply the patch and check in some items checked out to various
patrons.

- In the table of checked-in items, confirm that the "Print checkin
  slip" appears correctly in the column of patron information.
- Confirm that the button works correctly to print the correct slip for
  the associated patron.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Alexandra Speer <alexandra.speer@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:49:03 +01:00
Aleisha Amohia
29d173a6fd Bug 12224: Print a slip of borrower's checkins for today
To test:

1) Apply patch and run installer
2) Check out two items (or more) to a borrower
3) Check in two items (or more) for this borrower (you should end up on
    circ/returns.pl)
4) Notice the checked-in items table has started building. There should
be a new column with the button 'Print checkin slip' in each row.
5) Click the button and confirm the checkin slip opens for printing in a
new window.
6) Go to the patron's account
7) Click the Print dropdown. Confirm there is a 'Print checkin slip'
option. Click this and confirm the checkin slip opens for printing in a
new window.

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Alexandra Speer <alexandra.speer@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:49:03 +01:00
Petro Vashchuk
ebf123bf13 Bug 27745: prevent warning for uninitialized value as a hash key
When you edit and save items with an empty "c - Shelving location"
field, it gets stored into the database as "NULL",
which is allowed in the database, and the field is not "required",
so this seems expected.

But when the search page is rendered, it gets value by location key
($shelflocations->{ $item->{location} }) which gives undef warning.

Solved by checking if $item->{location} is perl true.

To reproduce:
    1) Edit the book or create new one with an empty shelving location.
    2) Use the search feature to have that book in the searched list.
    3) Check plack-intranet-error.log to find "Use of uninitialized
value in hash element" error.
    4) Apply the patch.
    5) Repeat the search and check the logs again to ensure that error
didn't appear again.

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:48:31 +01:00
42a32bc172 Bug 27795: Misalignment of TOTAL value in lateorders page
This patch corrects the colspan in the footer of the late orders page.

It also adds a quantity total cell to the footer and changes the
container of the buttons at the bottom of the page from a <p> tag to
the standard <fieldset class="action">.

To test, apply the patch and go to Acquisitions -> Late orders.

In the footer of the late orders page, there should be a total under the
"Quantity" column. The total cost number should be correctly aligned
under the "total cost" header cell.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:48:31 +01:00
4add0cbc2d Bug 27752: Correct eslint errors in batchMod.js
This patch makes minor changes to batchMod.js in order to address errors
raised by ESLint. These changes include whitespace changes, so diff
accordingly.

To test, apply the patch and go to Tools -> Batch item modification.

- Submit a batch of barcodes for modification.
- Uncheck some checkboxes to hide columns in the table showing your
  submitted items.
- Return to the batch item modification page and submit your batch
  again.
- The columns you selected should still be hidden.
- Submit a batch of items for deletion.
- The same columns should be hidden here too.

To confirm that ESLint is happy with the changes you could open the file
for editing using an editor with ESLint integration, or install ESLint
on the command line:
https://eslint.org/docs/user-guide/command-line-interface

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:48:31 +01:00
e91308d729 Bug 27410: (follow-up) Updates to accommodate currency entry
This patch makes two modifications in order to allow the entry of
currency strings (e.g. 1.25).

 - Inputmode changed to "decimal"
 - Regex pattern changed to "^\d+(\.\d{2})?$" as found in
   admin/debit_types.tt

To test, apply the patch and test entry of various strings in the manual
invoice "amount" field. Confirm that the field only accepts digits or
digits followed by a decimal and two digits.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:48:31 +01:00
Mazen Khallaf
d1c89f5c50 Bug 27410: Update intranet-tmpl/prog/en/modules/members/maninvoice.tt to reflect ACC2
Test Plan:
1. Open intranet-tmpl/prog/en/modules/members/maninvoice.tt
2. Search for instances of 'input type="number"'
3. If none are found then patch was successful

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:48:31 +01:00
f0d4fac8dd Bug 27408: (follow-up) Updates to accommodate currency entry
This patch makes two modifications in order to allow the entry of
currency strings (e.g. 1.25).
- Inputmode changed to "decimal"
- Regex pattern changed to "^\d+(\.\d{2})?$" as found in
  admin/debit_types.tt

To test, apply the patch and test entry of various strings in the manual
credit "amount" field. Confirm that the field only accepts digits or
digits followed by a decimal and two digits.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:48:31 +01:00
Mazen Khallaf
5b3c5dc376 Bug 27408: Update intranet-tmpl/prog/en/modules/members/mancredit.tt for ACC2
Test Plan:

1. Open intranet-tmpl/prog/en/modules/members/mancredit.tt
2. Search for instances of 'input type="text"
3. If none are found then patch was successful

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:48:31 +01:00
99d37eaa6e Bug 27668: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:48:31 +01:00
efeed28f7f Bug 27668: Improve validation of patron entry form in the OPAC
This patch improves the way we handle required fields in the patron
entry/update form in the OPAC. Instead of doing multiple checks for each
field using mandatory.defined(), the template now loops over a list of
fields and sets a "required" variable for any which are required.

Then, for each form field, the "required" variable is used to set
classes on labels, input fields, and the "required" text hints. The
class on form fields acts as a hook for the jQuery validator plugin. The
class on the text hints allows us to hide the text hint using CSS,
eliminating the necessity of using a template conditional.

The patch also adds the missing validator-strings include which enables
translation of the jQuery validator plugin's validation error messages.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - Go to Administration -> System preferences and enable
   PatronSelfRegistration.
 - Select multiple fields to be required using the
   PatronSelfRegistrationBorrowerMandatoryField preference.
 - In the OPAC, start the process of registering for an account.
 - The fields you designated as mandatory should each have a "Required"
   label under them.
 - Try to submit the form without entering any data. The required fields
   should now be highlighted in red and have another label, "This field
   is  required."
 - Fill in the required fields and submit the form. It should submit
   correctly.
 - Modify the PatronSelfRegistrationBorrowerMandatoryField preference
   and select all fields as mandatory. Confirm that all fields in the
   patron entry form work correctly.
 - Test that form validation works correctly when modifying a logged-in
   patron's existing account.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:38:58 +01:00
63ce989b61 Bug 27777: (alternate) Improve tables on Point of Sale page for low screen resolutions
This alternate solution makes these minor changes:

- The Bootstrap grid classes are adjusted so that the breakpoint
  between the two-column layout and the single-column layout happens at
  a wider browser-width.
- The DataTable configurations are modified to set "autoWidth" to
  "false," which gives us a more fluid behavior.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:38:58 +01:00
755081fdc3 Bug 27776: Remove default sort order of sales table
This patch drops the default sort on table initialisation so that the
table remains sorted in the order in which items are added unless the
user explicitly chooses to apply a sort order.

We also correct a mistake in the targets for disabling sorting on the
'Actions' column and update the hidden 'CODE' column to use the same
syntax as the other definitions for consistency.

Test plan
1/ Enable the point of sale system and set some debit types to allow
sale.
2/ Navigate to the point of sale page and added some items to sell
3/ Update the price for a few lines and note the sort order does not
change.
4/ Update the quantity for a few lines and note the sort order does not
change.
5/ Sort a column using the headers and note it works
6/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:38:58 +01:00
35b5e29988 Bug 27717: Display date of birth even if the patron is under 1
This patch moves the 'age' condition to below the date of birth display,
allowing the date to display for babies.

Test plan
1/ Add a user with a date of birth within the last year
2/ Check that the date of birth appears on the patron details page
(under contact details) with the patch applied.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:38:58 +01:00
2cd4c6011a Bug 25674: Remove default vhost
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 12:27:23 +01:00
476ab4758c Bug 25674: Add documentation
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 12:27:23 +01:00
ac5f628559 Bug 25674: Adapt koha-create
This patch adds the following option switches to koha-create:

--mb-host
--mb-port
--mb-user
--mb-pass
--mb-vhost

They are used to override the default values on instance creation.

To test:
1. Play with the several option switches and verify that the resulting
   koha-conf.xml contains the expected data.
=> SUCCESS: It works as expected
2. Sign off :-D

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

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 12:27:23 +01:00
ce11b59ce1 Bug 25674: Add placeholders for RabbitMQ configuration
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 12:27:22 +01:00
0104de7c22 Bug 26742: Remove die from connect
The change was not advertised and it needs to be done on a separate bug
report (+ test coverage)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 12:27:22 +01:00
8663f23a93 Bug 26742: Add configuration to koha-conf.xml for message broker
The connection details for the message broker should be configurable.
This patch adds configuration options to koha-conf.xml. If they
are not specified, then default connection details will be used.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 12:27:22 +01:00
75a210aef4 Bug 22824: DBRev 20.12.00.021
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:26:04 +00:00
f9df71447b Bug 22824: Add warning to the about page
Just in case, add a warning to the about page.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

JD amended patch: there was a "bad space" between "warnNoActiveCurrency"

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
Julian Maurice
9aa20245fc Bug 22824: Fix encoding of misc/admin/koha-preferences output
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00