Commit graph

14576 commits

Author SHA1 Message Date
70fe2b1286 Bug 27980: (QA follow-up) Add missing case
We missed one last case ;)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
1eda15cfc7 Bug 27980: (follow-up) Address missing instance
- Search history -> Current and previous catalog searches

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
ce2f162589 Bug 27980: Replace obsolete title-string sorting: Catalog templates
This patch modifies several catalog templates to replace the use of
the "title-string" DataTables sorting method with the newer
"data-order" attribute.

To test, apply the patch and view the following pages to confirm that
columns containing dates sort correctly when using any setting of the
"dateformat" system preference:

 - Catalog -> Search -> Bibliographic detail page
 - Catalog -> Search -> Bibliograhpic detail page -> Checkout history
 - Search history
   - Current and previous catalog search sessions
   - Current and previous authority search sessions

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
c0b5671416 Bug 27975: Replace obsolete title-string sorting: Administration templates
This patch modifies two administration templates to replace the use of
the "title-string" DataTables sorting method with the newer
"data-order" attribute.

To test, apply the patch and view the following pages to confirm that
columns containing dates sort correctly when using any setting of the
"dateformat" system preference:

- Administration -> Currencies and exchange rates
- Administration -> Budgets
  - Both the "Active budgets" and "Inactive budgets" tabs

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
5b98ac36f3 Bug 27974: (follow-up) Address missing instance
- Circulation -> Article requests
  - Both the "Pending" and "Processing" tabs.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
e64c760059 Bug 27974: Replace obsolete title-string sorting: Circulation templates
This patch modifies several circulation templates to replace the use of
the "title-string" DataTables sorting method with the newer
"data-order" attribute.

To test, apply the patch and view the following pages to confirm that
columns containing dates sort correctly when using any setting of the
"dateformat" system preference:

- Circulation -> Checkout notes
  - To populate the table, enable the "AllowCheckoutNotes" system
    preference enabled, log in to the OPAC as a user with checkouts.
    From the "Your summary" page use the "Report a problem" fields to
    submit notes.
- Circulation -> On-site checkouts
  - Requires the "OnSiteCheckouts" system preference to be enabled and
    and for some items to be checked out as on-site checkouts.
- Circulation -> Overdues
- Circulation -> Holds to pull
- Circulation -> Transfers to send
  - Requires the "StockRotation" preference to be enabled, some rotas
    to be set up, and for the stockrotation cron job to be executed.
- Circulation -> Transfers to receive
- Circulation -> Holds queue

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-04-06 15:56:30 +02:00
ad701eac46 Bug 27805: (follow-up) Update more instances
This patch updates some preferences I missed in the first round:

- NoticeBcc
- ILLDefaultStaffEmail
- PayPalUser
- EmailSMSSendDriverFromAddress

I've also modified the preferences CSS so that fields with type "email"
are styled the same as fields with the "long" class to give more room
for email addresses.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
Katrin Fischer
a717cc052e Bug 27607: (QA follow-up) Make label match patron form: ZIP/Postal code
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
848993a24a Bug 27607: Add the ability to compare patron records during merge process
This patch adds an option to compare two patron records during the
patron merge process. It can't work with more than two patrons, so the
option only appears if one has selected only two patrons to merge.

This patch also adds links to the patron names for opening the patron
record in a new tab.

To test, apply the patch and perform a search for patrons in the staff
client Patrons module.

 - Select two patrons in the list of search results and click "Merge
   selected patrons."
 - On the merge patron records page, confirm that the two patron names
   are links which, when clicked, open the patron details in another
   tab.
 - Click a radio button to select the patron whose record will be
   the basis of the merge. The "Compare patrons" button and "Merge
   patrons" should go from disabled to enabled.
 - Click the "Compare patrons" button. A modal window should display
   highlighting the differences in some selected values in the patron
   record. The patron you selected as the basis for the merge should
   appear on the left.
 - Close the modal and select the other patron as the basis of the
   merge. "Compare patrons" again. The other patron should now appear in
   the left pane of the comparison.
 - Test that the "Merge patrons" button in the modal window works
   correctly to submit the merge form and that the correct patron is
   used as the basis for merging.
 - Repeat the same process above but select more than two patrons for
   merging. The "Compare patrons" button should not appear.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
d4eb9abba1 Bug 27749: Phase out jquery.cookie.js: Search to hold
This patch modifies the "search to hold" process for patrons and clubs
so that the newer jquery-cookie plugin is used instead of jquery.cookie.

To test, apply the patch and locate a patron in the staff interface.

 - From the patron checkout or details page, click "Search to hold" in
   the toolbar."
 - Perform a catalog search which will return results.
 - On the search results page you should see a "Place hold for..." link
   with the correct patron information under each result.
 - In the toolbar above the search results you should see a "Place hold"
   button with a dropdown menu which also references the patron you
   selected.
 - Test that each option works to place a hold for your patron.
 - Test that the "Forget..." menu option works to remove "place hold
   for" options.
 - Test that your "Place hold for" option is also remembered on the
   bibliographic detail page.

To test the changes to Patron Clubs:

 - If necessary, create a patron club:
   https://koha-community.org/manual/20.11/en/html/tools.html?highlight=club#patron-clubs
 - Add one or more patrons to the club:
   https://koha-community.org/manual/20.11/en/html/tools.html?highlight=club#enrolling-a-patron-in-a-club-from-the-staff-client
 - From the patron clubs page, choose "Search to hold" from the club's
   "Actions" menu.
 - Perform the same tests above.

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

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-04-06 15:56:30 +02:00
41ac425425 Bug 27738: Fix wording
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
Séverine QUEUNE
dad0a18c7a Bug 28077: Add a colon after the 'Reason' label on edit suggestion page
This patch corrects the missing colon on the 'Edit purchase suggestion'
page.
To test :
- go to Acquistions > Suggestions
- edit a suggestion
- on 'Suggestion management' bloc, see the colon missing after the
'Reason' label
- apply patch
- refresh the page
- colon should now be displayed

Happy sign off !

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
4df8e3ef02 Bug 28044: Increase specificity of calendar tables CSS
This patch adds increased specificity to the CSS which should add colors
to the tables of holidays. The default DataTable CSS was overriding the
custom color-coding.

This patch also moves the calendar CSS into a separate file.

To test, apply the patch and go to Tools -> Calendar.

If necessary, add at least one of the following:
- Unique holiday
- Holiday repeating weekly
- Holiday repeating monthly
- Holiday exception

In the table listing each kind of holiday, the color of the table header
should match the colors in the "Key" section under Hints. The color
should be correct regardless of how the table is sorted.

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-04-06 15:56:30 +02:00
08bebe336c Bug 28033: Fix minor capitalization errors
This patch corrects capitalization in two templates:

- Administration -> Desks:
  "Modify Desk" / "New Desk" -> "Modify desk", "New desk" in breadcrumbs
  menu.
- Reports -> Most-circulated items:
  "Most-circulated Items" -> "Most-circulated items" in breadcrumbs.

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-04-06 15:56:30 +02:00
Phil Ringnalda
d5e7d37d8a Bug 27738: Set fallback for unset DefaultCountryField008 to |||, "no attempt to code"
Current code intended to set a fallback of xxu, an unknown state in the US,
but because the preference is always defined, just sometimes unset, it
actually falls back to three spaces, an invalid value. This patch instead
uses the fallback value ||| which means no attempt to code.

Test plan:
1. Without the patch, verify that the value of the system preference
DefaultCountryField008 is empty.
2. Cataloging - New record - Default framework (if you have the Advanced
editor enabled, Settings - Switch to basic editor, this only applies to the
basic editor)
3. On tab 0, click in the text input for field 008 which fills in default
values, then click the Tag editor button at the end of the field
4. In the popup window, verify that the value for 15-17 is shown as ###
indicating three spaces
5. Apply patch, repeat the steps above, verify that the value is now |||

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
af0fc2f0f0 Bug 27926: (QA follow-up) Switch to using data-order
This patch switches away from using the title attribute for ordering and
instead uses data-order which is supported in modern DataTables.  This
has the effect of allowing our ordering to continue to work but without
adding the unwanted tooltip on hover.

Test plan
1/ Ensure sorting is still working as expected
2/ Hover over any of the date of birth fields and note that you are not
longer faced with a tooltip.
3/ Signoff

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
a1f5f363bc Bug 27926: Add 'title-string' for dates on circ-patron-results
This patch adds the title string sorting for the data of birth field in
the circulation patron results table.  This has the side effect of
adding a tooltip that displays the date of birth in ISO format, so I'm
not entirely sure it's the right approach.

Test plan
1/ Set your date format preferences to British English (dd-mm-yyyy)
2/ Do a search that will yield multiple patrons via "Check out"
3/ Try sorting on date of birth and not the order is incorrect.
4/ Apply the patch
5/ Refresh the page and try sorting on date again
6/ The order should now be correct
7/ 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-04-06 15:56:30 +02:00
5787203a70 Bug 28074: Make current_search.offset an integer instead of string
To test:
1. Do a search with 3-4 results, go to the record and use the browse
   controls, when you get to the last record if you attempt to go to the
   'next' you'll end up on a page which says 'record not found.'
2. Do a search with exactly 10 results. Click on the first record, the
   'next' arrow is not a link, you cannot move to the next result.
3. Apply patch
4. Repeat steps 1-2 and the problems should be gone.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
Katrin Fischer
8a6bb8c6cd Bug 27900: (QA follow-up) Rephrase link text
See discussion on IRC from today :)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
Katrin Fischer
6f9d888942 Bug 27900: (QA follow-up) Add missing filter
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
191184f28a Bug 27900: Add a link back to the basket view if no result
Since bug 24347 the neworderbiblio view has been removed and we now
display the usual search result.
When adding a new order from a search, if there is no result we should
let the user get back to the basket view.

Test plan:
Add to basket from an existing record
Do a search with no results and confirm that there is a new "Go to the
basket view" link

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:30 +02:00
d972ddb79e Bug 27846: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:38 +02:00
bad2e0fb5d Bug 27846: (follow-up) Use background SVG for breadcrumb dividers
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:38 +02:00
1a4c089dc1 Bug 27846: (QA follow-up) Apply changes to transfers_to_send
It looks like the transfers to send page was added after these changes
were coded up.. This patch just impliments them for this page too.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:38 +02:00
a682c620ee Bug 27846: (follow-up) Add id back to breadcrumbs container
I think the "breadcrumbs" ID is worth saving for past and future CSS
customization reasons.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:38 +02:00
d415a5c748 Bug 27846: (follow-up) Indentation corrections
This patch makes some indentation changes to make things (in my opinion)
more consistent. Diffing while ignoring whitespace should show no
changes except to acqui/basket.tt where some lines were broken up.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:38 +02:00
e9126cdc02 Bug 27846: (follow-up) Use SCSS-style nesting for style additions
This patch takes the changes introduced to the SCSS file in the previous
patches and converts it to use SCSS-style nesting to generate the
same output.

There should be no visible changes as a result.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:38 +02:00
cf2fc6aadd Bug 27846: (follow-up) Markup corrections
This patch makes minor markup corrections which were introduced by the
previous patches or discovered during testing.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:38 +02:00
7a6183763f Bug 27846: tools and virtualshelves folders
Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the tools and virtualshelves folders have
   breadcrumbs that are in a <nav aria label="Breadcrumb"
   class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:38 +02:00
311ddeddf9 Bug 27846: rotating_collections, serials, suggestion and tags folders
Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the rotating_collections, serials,
   suggestion and tags folders have breadcrumbs that are in a <nav aria
   label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:38 +02:00
47ea9c8987 Bug 27846: reports, reserve and reviews folders
Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the reports, reserve and reviews folders
   have breadcrumbs that are in a <nav aria label="Breadcrumb"
   class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
2203900066 Bug 27846: offline_circ, patroncards, patron_lists, plugins and pos
Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the offline_circ, patroncards,
   patron_lists, plugins and pos folders have breadcrumbs that are in a
   <nav aria label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to
   the page you are currently on

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
d237208de5 Bug 27846: members folder
Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the members folder have breadcrumbs that
are in a <nav aria label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
belonging to these files look the same as before, but the '>' symbol is
replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
page you are currently on

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
9e16fe97a2 Bug 27846: labels folder
Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the labels folder have breadcrumbs that
   are in a <nav aria label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
1ae1e6dfe3 Bug 27846: clubs, course_reserves, errors and ill folders
Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the clubs, course_reserves, errors and
   ill folders has breadcrumbs that are in a <nav aria
   label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
e0053d3263 Bug 27846: circ folder
Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the circ folder have breadcrumbs that are
   in a <nav aria label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
ec04fcb16a Bug 27846: authorities, catalogue and cataloguing folders
Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the authorities, catalogue and
   cataloguing folders have breadcrumbs that are in a <nav aria
   label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
cde5aa1050 Bug 27846: admin folder
Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the admin folder has breadcrumbs that are
   in a <nav aria label="Breadcrumb" class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
1b4b52fd25 Bug 27846: modules and modules/acqui folders
Modified breadcrumbs to be accessible, in particular for a
screen-reader.

Made the block of breadcrumbs be a <nav aria label="Breadcrumb"
class="breadcrumb"> with an ordered list inside. The last breadcrumbs
also has aria-current="page" to specify that it is the current page.

To test:
1) Apply patch
2) Build scss file
3) Ensure each of the files in the modules folder and the modules/acqui
   folder has breadcrumbs that are in a <nav aria label="Breadcrumb"
   class="breadcrumb"> block
4) Ensure that there is an ordered list in the block of breadcrumbs
5) Ensure that the last breadcrumb has aria-current="page"
6) Ensure that the breadcrumbs on each page of the staff client
   belonging to these files look the same as before, but the '>' symbol
   is replaced with '/' and the last breadcrumb has bold text
7) Ensure that when the last breadcrumb is clicked it takes you to the
   page you are currently on

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
21c6c6c383 Bug 27846: changed scss for breadcrumbs
Changed styling for breadcrumbs to be accessible

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
6284849703 Bug 28004: Fix breadcrumbs on authorised_values.tt
To Test:
  - go to a category with at least one value, see the complete breadcrumb "Home › Administration › Authorized values › Authorized values for category" with link on the 3 first menus
  - create a new category / go to an empty category ; see the incomplete breadcrumb "Home › Administration › Authorized values" with link only on the 2 first menus
  - Apply patch
  - go to category with at least one value, breadcrumbs should look like Home › Administration › Authorized values › Authorized values for category CATEGORY
  - got to category with no values, breadcrumbs should look the same as category with values

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
Joonas Kylmälä
3aee4f4eca Bug 27936: Clarify AllowItemsOnHoldCheckoutSIP syspref help text
The waiting reserves have always been impossible to checkout via
SIP2. There was some confusion whether this is actually true but if
you check the commit "Bug 25690: Remove duplicated logic in SIP2
checkouts" (338ba1d769) and the removed code around line

  $self->screen_msg("Item is on hold for another patron.");

you will be sure that it has been impossible to checkout waiting holds.

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-04-01 18:51:37 +02:00
Catherine Ma
607d7f0a60 Bug 27397: The description input field when defining numbering patterns is too short
Test Plan:
1. go to the serials module
2. click on manage numbering patterns in the left hand navigation
3. add or edit a pattern
4. check the description field is as short as the name field, but can
take much more text
5. add patch
6. repeat steps 1-3
7. check the description field is larger than the name field (it should)

Sponsored by Catalyst IT

Works OK!

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
0053cc6c3e Bug 28042: Button corrections in OAI set mappings template
This patch makes minor markup changes in the OAI set mappings template
so that the "Add" button looks consistent with other buttons in the
table.

Also changed: Removed unnecessary inline style attributes.

To test, apply the patch and go to Administration -> OAI sets
configuration

- If necessary, create an OAI set.
- Click the "Actions" button and choose "Define mappings."
- In the table of form fields, confirm that the "Add" button is styled
  similarly to the "Delete" button.
- Confirm that the "Add" button works as expected.

Signed-off-by: Amit Gupta <amitddng135@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
d156d5a9fe Bug 28032: Button corrections in point of sale pages
This patch corrects some markup inconsistencies in some templates
related to point of sale:

- Point of sale -> Library details. The "btn-xs" class has been added to
  "Record cashup" and "Cashup all" buttons.
- Administration -> Debit types and Administration -> Credit types:
  - Font Awesome icons are removed from the "save" and "cancel" controls
    in order to keep them consistent with other templates.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
5aa24a6a47 Bug 27869: let user know something went wrong with csv upload
To test:
-attempt to upload a malformed CSV file
-nothing happens, check the console and see the error: Uncaught TypeError: arrData[(arrData.length - 1)] is undefined
-apply patch
-try again
-now you should at least see a warning that something went wrong
-attempt to upload a good CSV file, it should work

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
13bb39f4c6 Bug 26999: Make 'Any library' translatable when placing a hold
This patch makes the 'Any library' string translatable, by converting it
into a flag and using it accordingly on the request.tt template.

To test:
1. Have the 'Hold pickup library match' set to 'any library' on the
   circultation rules.
2. Open the page to place a hold on a biblio with some items
=> SUCCESS: The item says 'Any library' on the 'Allowed pickup
locations' column.
3. Apply this patch
4. Repeat 2
=> SUCCESS: No behavior change
=> SUCCESS: The string is on the template
5. Sign off :-D

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
20d5a458f3 Bug 28043: Some patron clubs operations don't work from later pages of results
This page changes the way event handlers are defined for some operations
on the patron clubs page. These changes make it possible for the
controls to work on multi-page tables of clubs.

To test, apply the patch and got to Tools -> Patron clubs.

- If necessary, add enough patron club templates and patron clubs that
  there are more than 10 of each.
- Click to the second page of club templates and try to delete a
  template. It should work correctly.
- Click to the second page of clubs and try to delete a club. It should
  work correctly.
- Add one or more patrons to a club (from the checkout or patron details
  page).
- Click to the second page of clubs and try the "Search to hold" menu
  item. It should redirect you to the search page.
- After entering a search, the results page should include "Place hold
  for <club>" links with each result.

Signed-off-by: Amit Gupta <amitddng135@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
07bf1726e8 Bug 27999: Display the description of authorized values category
This patch corrects a parameter in the authorized values template so
that the right value is passed for displaying the description of an
authorized value category.

To test, apply the patch and go to Administration -> Authorized values.

- In the table of authorized values, click on one which has a
  description in the "Description" column.
- On the page titled "Authorized values for category XXX," you should
  see that description under the heading.
- Use the "Show category" dropdown to try some other categories.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
7dcb4287e0 Bug 28003: Invoice adjustments using inactive budgets do not indicate that status
This patch affects the display of existing invoice adjustments to indicate when using an inactive budget

To recreate
1 - In acquisitions go to a vendor
2 - Click 'Receive'
3 - Create an invoice
4 - Finish receiving
5 - Go to Admin->budgets
6 - Duplicate your current budget
7 - Mark the original budget inactive
8 - View the invoice you created
9 - No indication the budget is inactive
10 - Apply patch
11 - Reload the page
12 - The fund shows '(inactive)'
13 - The dropdown to edit the funds also indicates which funds are inactive

Note that adding new adjustments does show only the active budget unless you request to see inactive.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:04:49 +02:00
08c6e629de Bug 27937: Set datepicker when date is valid
When validating dates in JavaScript it is acceptable to have single digit days or months e.g,:
2011-6-16

When parsing in Koha::DateUtils->dt_from_string we die on these

This patch uses JS to set the datepicker which normalizes the date as Koha expects

To test:
 1 - Add new patron
 2 - Enter birthdate as 2/11/1986
 3 - Complete required fields
 4 - Save
 5 - Get ISE
     The given date (2/11/1986) does not match the date format (us) at /kohadevbox/koha/Koha/DateUtils.pm line 175
 6 - Apply patch
 7 - Repeat 1-2
 8 - Note that when you change focus (click on another field) the date is formatted as '02/11/1986'
 9 - Save patron, success!
10 - Edit patron, try setting DOB to 2/1/1986
11 - Change focus and note date is formatted as '02/01/1986', save
12 - Repeat with other settings of system preference 'dateformat'

Signed-off-by: Donna <donna@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Bug 27937: (QA follow-up) Fix indentation

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:04:47 +02:00
8424f402be Bug 27807: (QA follow-up) Unique values only
This patch filters the final _order_by clause such that we only have
unique data fields present and we take the first occurence of a field.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 17:58:49 +02:00
548562ca17 Bug 27807: Add multi-column ordering support to datatables wrapper
This patch add mutli-column ordering support to the datatables api
wrapper.

Test plan
1/ Add a series of cities to the system with various combinations of
city and state such that you can distinguish sorting on city + state in
city ascending + state ascending, city ascending + state descending etc.
2/ Attempt to sort on the two fields in the table (Click the 'City'
heading to sort on city name, then Shift Click on 'State' to add 'state'
ordering on top.. Shift click again on state to reverse the 'state'
ordering but maintain the 'City' ordering.
3/ Confirm the various ordering comes out correctly.
4/ Signoff

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 17:58:49 +02:00
27fce8b0c2 Bug 26942: Allow style and link tags in NewsEditor TinyMCE
To Test:
-Make sure the sys pref 'NewsToolEditor' is set to TinyMCE
-Go to any news item and add this line:  <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
-Save the news item
-Re-open the same news item again in TinyMCE.
-The editor has removed that line. Annoying!
-Apply patch
-Try again, the <link> should stay now

Signed-off-by: Amit Gupta <amitddng135@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 17:58:49 +02:00
Petro Vashchuk
8245bc6f2d Bug 25946: borrowerRelationship can be empty
Do not show the empty dropdown with no options if borrowerRelationship
is disabled (empty) in the syspref.

To reproduce:
    1) Go to system preferences and disable borrowerRelationship.
    2) Create a new patron or modify the existing one.
    3) Under "Guarantor Information" click on "Search to add" button.
    After performing the search, select different patron to act as
    guarantor.
    4) Observe that there's empty dropdown for the relation type.
    5) Apply the patch.
    6) Repeat steps above.
    7) Observe that dropdown is no longer there.

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-04-01 17:06:38 +02:00
126326b8b3 Bug 27816: "Click to edit" in Point of sale is untranslatable
This patch adds an option to the Point of sale jEditable configuration
to explicitly set the title attribute to "Click to edit." This will
allow the string to be picked up for translation.

To test, apply the patch and test that the correct string is
translated. In this example I'm testing fr-FR:

  - Update a translation:

    > cd misc/translator
    > perl translate update fr-FR

  The "Click to edit" string should already have been translated, so
  it's not necessary to update the .po file.

  - Install the updated translation:

    > perl translate install fr-FR

In the staff interface, switch to the language you're testing and open
the point of sale page. Add some items for purchase. They should appear
in the "This sale" table. Hover your mouse over the values in the "Coût"
and "Quantité" columns. You should see the translated string, "Cliquer
pour modifier."

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2021-03-18 15:03:30 +01:00
a6d77fb428 Bug 27967: Add min attribute to borraccount modals
This patch adds a min attribute to the form fields of the borrower
account page modals to prevent negative values being entered
inappropriately.

Test plan
1/ Trigger the refund modal from the borrower account page.
2/ Attempt to enter a negative value for the amount to refund and note
with the patch applied you face a validation error (without the patch,
upon submission of a negative value you will be faced with a server side
error)
3/ Trigger the discount modal from the borrower account page.
4/ Attempt to enter a negative value for the amount to discount and note
with the patch applied you face a validation error (without the patch,
upon submission of a negative value you will be faced with a server side
error)
5/ Signoff

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2021-03-18 15:03:29 +01:00
1b32e66380 Bug 27933: Fix patron search result ordering
On bug 27715 we restrict the order by dt params for security reasons.
However in some cases the param passed is "columnname" instead of
"table.columnname".
We should make sure the table is part of the sort fieldname.

Test plan:
Do a "normal" patron search (from the patrons home page) and another
patron search (guarantor for instance).
Sort by cardnumber, date of birth, expiration date, asc, desc and
confirm it works as expected.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2021-03-18 15:03:26 +01:00
deb2f6317a Bug 27835: (follow-up) Update language, remove warn, add feedback
This patch:
 - Updates lanugage to be clearer 'ChargeFinesOnClosedDays' vs 'ChargeFinesOnCloseDay'
 - Removes a stary warn
 - Add an 'updated' counter and provides feedback in fines.pl

Test plan:
 0 - Apply patches, updatedatabase
 1 - set finesCalendar to 'ignore', ChargeFinesOnClosedDays to "Don't charge"
 2 - Checkout an item due yesterday
 3 - Ensure circ rules have a fine amount and interval set
 4 - Make today a holiday
 5 - perl misc/cronjobs/fines.pl -v
 6 - 0 updated
 7 - ChargeFinesOnClosedDays to "Charge"
 8 - perl misc/cronjobs/fines.pl -v
 9 - 1 updated
10 - set fines calendar to 'use'
11 - perl misc/cronjobs/fines.pl -v
12 - 1 updated (NOTE: This is wrong maybe, but handle on another bug)
13 - set ChargeFinesOnClosedDays to "Don't charge"
14 - perl misc/cronjobs/fines.pl -v
12 - 0 updated

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2021-03-18 15:03:23 +01:00
5007e24e90 Bug 27835: Add new syspref ChargeFinesOnCloseDay
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2021-03-18 15:03:23 +01:00
ec4bb0539a Bug 27969: Change wording on returns page
To test:
1- go to /cgi-bin/koha/circ/returns.pl, click Checkin settings to show options
2- it says "Remember due date ..."
3- apply patch, reload
4- it says "Remember return date ..."

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-17 14:19:21 +01:00
5ba6200191 Bug 18532: (follow-up) Fix rebasing issue
When the ILL notices were added, a bad rebase got rid of the notice
description in both messaging-preference-form.inc and opac-messaging.tt

This patch restores that line:

1. Set AutoRenewalNotices to 'according to patron...'
2. Edit a patron category
=> FAIL: There's an 'Unknown' label for 'Auto renewal'
3. Look at a patron's messaging preferences
=> FAIL: There's an 'Unknown' label for 'Auto renewal'
4. Look at a patron's messaging preferences in OPAC
=> FAIL: There's an 'Unknown' label for 'Auto renewal'
5. Apply this patch
6. Repeat 2, 3, 4
=> SUCCESS: 'Auto renewal' is displayed as expected

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:31 +01:00
Agustin Moyano
bc0ee173df Bug 18532: (follow-up) Fix notice message, add notice to all installer languages and fix preference message
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:31 +01:00
39faff6606 Bug 18532: Add individual issues to digest notice and hide auto_renewals messaging preference when not needed
This patch enhances auto_renewals message, removes auto_renewals messaging preference when AutoRenewalNotices is not set to ‘preferences’ and uses that preference to send notices in automatic_renewals.pl script.

To test:

1. Apply patches
2. updatedatabase
3. make sure automatic renewals are allowed in circ rules, have a positive number of allowed renewals and a positive number for renewal period
4. Check AutoRenewalNotices preference
SUCCESS => AutoRenewalNotices has the value ‘cron’ (means that It keeps the usual behaviour)
5. Checkout two items for a patron, and set them as automatic renewal and set due date as your current yesterday
6. perl misc/cronjobs/automatic_renewals.pl -c -v
SUCCESS => items were renewed, but there is no message in message_queue table in mysql
7. Repeat step 5
8. perl misc/cronjobs/automatic_renewals.pl -c -s -v
SUCCESS => items were renewed, and there is one message per item in message_queue table in mysql
9. Change AutoRenewalNotices to ‘never’
10. Repeat step 5
11. perl misc/cronjobs/automatic_renewals.pl -c -s -v
SUCCESS => items were renewed, but there is no message in message_queue table in mysql, even with the -s switch
12. Check any patron’s category, and any detail page in staff or OPAC interface, and in any of them you should find Auto Renewals messaging preference
13. Change AutoRenewalNotices to ‘preferences’
14. Repeat step 12, but this time all of them shows the Auto Renewals messaging preference.
15. Repeat step 5 with a patron that has no messaging preference setted
16. perl misc/cronjobs/automatic_renewals.pl -c -s -v
SUCCESS => items were renewed, but there is no message in message_queue table in mysql, because patron didn’t choose to receive messages
17. Grab a category and modify auto renewals messaging preferences, and save
18. Create a new patron from that category.
SUCCESS => created patron has the same messaging preference for auto renewals
19. Grab that patron and change auto renewals messaging preference to email but not digest
20. Repeat step 5 for that last patron.
21. perl misc/cronjobs/automatic_renewals.pl -c -v
SUCCESS => Items were renewed, and there is a message for each item in message_queue table in mysql.
22. Change auto renewals messaging preference from the same patron and set to email and digest.
23. Repeat step 5.
24. perl misc/cronjobs/automatic_renewals.pl -c -v
SUCCESS => items where renewed, and now there is only one message in message_queue table with the details of both renewed items.
25. Check that any changes to a patron’s auto renewals messaging preference in staff is reflected in OPAC, and the other way arround too.
26. Sign off

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:31 +01:00
14896e2032 Bug 18532: (follow-up) Remove digest switch and add preference
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:31 +01:00
Agustin Moyano
b29e015f7d Bug 18532: set auto_renewals as patron messaging preference
This patch adds the "Auto renewals" messaging preference on intranet and OPAC, and adds digest feature to misc/cronjobs/automatic_renewals.pl script.

(Deprecated test plan. Please check the last patch)
To test:
1. apply patches
2. perl installer/data/mysql/updatedatabase.pl
3. make sure automatic renewals are allowed in circ rules, have a positive number of allowed renewals and a positive number for renewal period
4. go to patron categories in administration of staff interface and choose a category.
CHECK => in "Default messaging preferences for this patron category" has a "Auto renewals" row and has email and digest options checked
5. grab a patron and go to details page
CHECK => patron's messaging preferences has a "Auto renewals" row with email and digest options checked
6. some settings and save
7. go to opac with that same patron to "your messaging" option
CHECK => patron's messaging preferences has a "Auto renewals" row, and displays changes made in staff interface.
8. uncheck email and digest from "Auto renewals" row and save
9. check out an item for that patron, and set it as automatic renewal and set due date as your current yesterday
10. perl misc/cronjobs/automatic_renewals.pl -c --send-notices -v
SUCCESS => item was renewed, and in message_queue table there is no new message for the patron
11. update patrons messaging preferences and set email option of "Auto renewals" row as checked
12. repeat steps 9 and 10
SUCCESS => item was renewed, but in message_queue table there is a new message of type AUTO_RENEWALS
13. update patrons messaging preferences and set email and digest options of "Auto renewals" row as checked
14. repeat steps 9 and 10
CHECK => item was not renewed
15. run step 10 again, but add -d flag, like this:
    perl misc/cronjobs/automatic_renewals.pl -c --send-notices -v -d
SUCCESS => item was renewed, and in message_queue table there is a new message of type AUTO_RENEWALS_DGST
16. Sign off

Signed-off-by: tgoat <tgoatley@gmail.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Marti Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:31 +01:00
242ae7a6d8 Bug 26272: Add ajax driven cashup modal to library page
This patch adds an ajax driven cashup summary modal to the library
registers summary page.

Test plan
1/ Enable UseCashRegisters in the system preferences
2/ Add at least one cash register to your library
3/ Make some payments of various types (Cash, Card) against the cash
register
4/ View the register transactions details page
5/ Make a refund against a payment
6/ Cashup
7/ View the cashup summary by clicking on the 'Summary' link on the
register page.
8/ Navigate to the 'libraries' summary page
9/ View the cashup summary by clicking on the 'Summary' link in the
registers table.
10/ 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-16 16:08:30 +01:00
3fdbb20e6a Bug 26633: Add advanced editor link on admin home page
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:30 +01:00
51eaf2467b Bug 26633: (QA follow-up) Add error handling for loading transfer limits table
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:30 +01:00
6fcec196b0 Bug 26633: Add ability to bookmark the page you are viewing
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:30 +01:00
94cefde05d Bug 26633: Remove jquery.checkboxes.min.js include
No longer exists and not used in this template

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:30 +01:00
953980a5dd Bug 26633: (QA follow-up) Action buttons should not remain grayed out if the same action is used multiple times in a row
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:30 +01:00
Katrin Fischer
241acf9714 Bug 26633: (QA follow-up) Change label to "collection" as we display the description
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:30 +01:00
fd57518148 Bug 26633: Add advanced editor for transfer limits
The current transfer limits editor works great for Koha instances with
small numbers of branches. However, for consortiums with dozens or even
hundreds of libraries, the editor does not work well or effectively.

We should provide an "advanced" editor displays all to/from library
combinations in a grid and allows them to be edited in a manner somewhat
similar to the transport cost matrix editor.

Test Plan:
1) Apply this patch
2) Browse to the transfer limits editor
3) Click the new "Switch to advanced editor" link
4) Select a collection code/item type to edit limits for
5) Test the "Check all" function
6) Test the "Uncheck all" function
7) Test the "Check" column function
8) Test the "Uncheck" column function
9) Test the "Check" row function
10) Test the "Uncheck" row function
11) Test individual checkboxes/table cells

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>

Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:30 +01:00
Phil Ringnalda
41d33deba4 Bug 27737: (follow-up) Minimal CSS changes to avoid regressions
To keep the specificity of the rules we want to have apply to both the
biblio editor and also the authorities editor, we need to add the ID for
the authorities editor, rather than remove the ID for the biblio editor.

Also, the removal of the selectors for #authoritiestabs descendents was
regressing the display of authority record details, which is where that
plural authoritiestabs element lives.

Test plan:

1.  With neither patch from this bug applied, Cataloging - New record -
    Default framework.
2.  Shrink and widen your browser window, noticing how the input fields
    flex to remain the full width, keeping the controls to duplicate and
    delete a subfield out directly to the right of the input.
3.  Authorities - search for Perl (or any term that will match a record),
    click the linked authority term to open the Authority detail display
4.  Note how the field number, field description, and subfield descriptions
    are all different colors, and subfield codes are on the same line as
    the subfield contents.
5.  Apply both patches from this bug.
6.  Cataloging - New record - Default framework
7.  Verify that the input fields still behave the same as you widen and
    shrink your browser window
8.  Authorities - New authority - Chronological Term
9.  Verify that the input fields now behave like the ones in the biblio
    editor, shrinking and widening to fill the width of the page, keeping
    the controls to duplicate and delete subfields immediately to the
    right of the field
10. Authorities - search for Perl, click the linked authority term to open
    the Authority detail display
11. Verify that the tag number, field description and subfield descriptions
    are still properly colored and subfield codes are still on the same
    line as the subfield contents.

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

Trivial fixup for a copy-paste failure, missed the y on
subfield_loop_mandator

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 12:04:02 +01:00
a2ef47a498 Bug 27737: Tag editor for authority lookup broken in authority editor
This patch changes the markup structure for the authorities
editor so that it better matches that of the basic bibliographic
record editor. This allows the authority-linking JavaScript to
correctly target fields on both pages.

To test, apply the patch and go to Authorities in the staff client.

 - Create or edit an authority record.
 - Switch to tab 5 and if necessary click one of the tag names (e.g.
   "SEE ALSO FROM TRACING--PERSONAL NAME") to expand the subfields.
 - Click the "..." plugin link next to subfield a ("Personal name" in
   this example).
 - In the popup window, search for an authority record.
 - Click "Choose" next to one of the results.
 - The popup window should close and the authority editor should contain
   data from the record you chose, including a value in $9 and $a.
 - Test with various records to confirm that data in other fields is
   copied correctly, for instanct $d, dates associated with a name, $t
   title of a work.
 - Test other JavaScript-driven interactions in the editor:
   - Duplicate repeatable tag
   - Remove repeatable tag
   - Empty tag
   - Reorder sortable tags (e.g. multiple 500 tags)
   - Reorder sortable subfields
   - Duplicate repeatable subfield
   - Remove repeatable subfield
   - Empty repeatable subfield

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

https://bugs.koha-community.org/show_bug.cgi?id=22737

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 12:04:02 +01:00
29de576ae9 Bug 26273: (QA follow-up) Use escape_str/price for escaping
This patch uses the global escape_str/escape_price functions in the register
page.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-11 16:33:25 +01:00
1ff61e7206 Bug 26273: (follow-up) Add 'Cashier' to the cashups table
This patch adds the 'Cashier' field as discussed on the bug report.

Test plan
1/ Apply patch and reload the register page to refresh the table
2/ Note that a 'Cashier' field now appears in the table
3/ Sorting and searching on 'Cashier' should work as expected
4/ Default sorting should remain as 'Date' order.
5/ Signoff

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

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

Bug 26273: (QA follow-up) Check for null firstname

This patch adds a test for firstname being defined before constructing
fullname from it.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-11 16:33:25 +01:00
45baee1aae Bug 26273: (follow-up) Format dates and money correctly.
This patch adds the missing formatting for the Datetime and Amount
fields.

Test plan
1/ Apply patch and reload register page to re-display the cashups table
2/ Note that the 'Date' field now displays a nicely formatted date
without an offset.
3/ Note that the 'Amount' field now displays the number according to
your money formatting preferences (with 2 decimal places in most cases)
4/ 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-11 16:33:25 +01:00
26419d5560 Bug 26273: Add historic cashups table to register page
This patch adds a historic cashups table to the bottom of the register
transaction details page.  It will only display if one or more cashups
have taken place and contains links to allow display of the summary
detail modal for each cashup.

Test plan
1/ Enable UseCashRegisters
2/ Undertake a few transactions and cashups
3/ View the 'Register details' page
4/ Note the appearance of a 'Cashup history' section at the bottom of
the page
5/ Note that 'Summary' button displays the relevant modal
6/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Daniel Jones <daniel.jones@cheshiresharedservices.gov.uk>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

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

Bug 26273: (QA follow-up) Remove unrequired table_controls div

Looks like a copy/paste issue.. I don't believe we need this div at all
for the table to function as expected and adding it just creates uneeded
whitespace.

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

Bug 26273: (QA follow-up) Add horizontal rule to distinguish tables

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-11 16:33:24 +01:00
68c37861c0 Bug 27930: Move _escape_* from acqui/parcel.tt to js/staff-global.js
This patch moves the _escape_str and _escape_price functions into the
staff-global.js include

Test plan
1/ The acquisitions parcel page should look the same before and after
the patch.
2/ Signoff

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-11 16:30:56 +01:00
3c65a3cdfe Bug 22569: (QA follow-up) Use itemtype description
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-11 11:51:40 +01:00
bc45249291 Bug 22569: (QA follow-up) Make 'reason' translatable
Add a transfer_reasons include file for easy translation of the transer
reason codes.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-11 11:51:40 +01:00
a8df1af9e5 Bug 22569: Add a 'Transfers to send' report
This patch adds a 'Transfers to send' report to the circulation page
which displays items which have been triggered for transfer but not
marked as sent.

Test plan
1) Setup a rotation plan and add some items to it as per the
   manual
2) Run the stockrotation cronjob with the --execute flag
3) Check that the expected items appear in the new 'Transfers to send'
   page.
4) Confirm that items marked with 'StockRotationAdvance' provide the
   option to mark the item as 'In demand' (Which will cancel the
   transfer and mark the item as in demand such that it will wait at the
   current branch for an additional stage period before being
   automatically picke for transfer again)
5) Setup a rotating collection
6) Trigger a collection transfer for the above collection
7) Check that the expected items appear in the new 'Transfers to send'
   page'.

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>

Bug 22569: (QA follow-up) Rename script to snake_case

As requested, we simply rename the script, and references to it, to use
snake_case to make it clearer.

Bug 22569: (QA follow-up) Rename branchesloop to libraries

Bug 22569: (QA follow-up) Fix indentation in template

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-11 11:51:40 +01:00
25f391b00d Bug 27813: Restore default order on suggestion list view
Prior to 20.05, suggestions on /cgi-bin/koha/suggestion/suggestion.pl sorted by
suggesteddate by default. On 20.05 and later, they're sorting by title instead.
We should go back to the previous behavior.

Test plan:
Create some suggestions
Edit the suggestions.suggesteddate in the DB
List the suggestions and confirm that there are sorted by oldest first

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-11 11:05:09 +01:00
0381d9e524 Bug 27815: "Remove" in point of sale untranslatable
This patch modifies the Point of Sale template so that the "Remove"
button can be translated. The string in the JavaScript block wasn't
wrapped in the correct function.

To test, apply the patch and test that the correct strings are
translatable. In this example I'm testing fr-FR:

- Update a translation:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for the strings pulled from
  the template: e.g. misc/translator/po/fr-FR-staff-prog.po
- Locate strings pulled from pos/pay.tt for translation to confirm the
  update, e.g.:

  #: koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt:189
  #, c-format
  msgid "Remove"
  msgstr "Enlever"

- Install the updated translation:

  > perl translate install fr-FR

- In the staff client, go to Point of Sale.
- Switch to the French translation and click the "Ajouter" button next
  to one of the items for purchase.
- In the "This sale" table, the item you added should have a
  corresponding "Enlever" button.

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-09 17:20:47 +01:00
David Nind
ed582b4558 Bug 27405: (follow up) Updates to accommodate currency entry
This patch makes two modifications to allow the entry of
currency strings (for example, 1.25) so that it is consistent with other
payment entry forms.

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

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 17:20:47 +01:00
Catherine Ma
7de833b527 Bug 27405: Update koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt for ACC2
This replaces the number type input in
intranet-tmpl/prog/en/modules/pos/register.tt so that it is
consistent with ACC2 guidelines.

Test plan:
1. Enable the EnablePointOfSale (set to Enable) and UseCashRegisters
   (set to Use) system preferences.
2. Add a new cash register for a library (Home > Point of sale > Create
   a new cash register)
3. Add some sample items for sale (Home > Point of sale > Configure
   items for purchase)
4. Add some sales (Home > Point of sale > Add some items, enter a
   payment and sleect Confirm)
5. Issue a refund (Home > Point of sale > Register details > select
   Issue refund for an item)
6. Try to enter text, numbers with several decimal places, and , or
   multiple .
7. Apply the patch.
8. Repeat steps 4-6 - should continue to function as expected, with
   appropriate warning messages for invalid entries.
9. Search koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt for
   input type="number" - there should be no occurences.
10. Sign off!

Sponsored by Catalyst IT

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-09 17:20:47 +01:00
010181a6a0 Bug 27652: Display patron's categories for sysprefs expecting them
This patch adds a new type of system preference entry option: patron
category. A preference with this type will show either a <select> with
patron categories to choose from or a multiple-select menu for choosing
one or more.

This prevents possible errors from incorrect category codes being
entered manually.

To test, apply the patch and run the database update.

- Go to Administration -> System preferences.
- Test each of the updated preferences to confirm that the available
  options are correct and that your selections are correctly saved.

  - Single category selections, PatronSelfRegistrationDefaultCategory
    and GoogleOpenIDConnectDefaultCategory. With each of these you
    should see a dropdown where you can select of all the existing
    patron categories.

  - Multiple selections, OPACHoldsIfAvailableAtPickup and
    BatchCheckouts: These preferences should have an option for
    selecting one or more system preferences at once.

- Test the pages affected by the updated system preferences:

- With BatchCheckouts enabled, confirm that the batch checkout page is
  correctly limited by patron category.

- Set the OPACHoldsIfAvailableAtPickup preference to "Don't allow" and
  select at least one patron category in the
  OPACHoldsIfAvailableAtPickupExceptions preference.
- Log in to the OPAC as a patron whose category was not selected in
  the OPACHoldsIfAvailableAtPickupExceptions preference.
- Try to place a hold on an item which is available at a library.
- When confirming the hold, the libraries where the item is available
  should be disabled in the "Pick up location" dropdown.
- Repeat the process as a patron whose category was selected in
  OPACHoldsIfAvailableAtPickupExceptions. There should be no disabled
  pickup locations.

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-09 17:20:47 +01:00
3432b3bd5e Bug 27766: Hide expired news items by default
This patch modifies the news page in the staff interface so that expired
news items are hidden by default. A checkbox in the sidebar can be
checked to show the hidden rows.

To test you should have multiple news items, some expired and some
unexpired.

 - Apply the patch and go to Tools -> News
 - The table of news items as it initially appears should not include
   any expired news items.
 - In the sidebar, check the "Show expired" checkbox.
 - The expired news items should now appear.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 15:05:31 +01:00
c473a70332 Bug 27751: Phase out jquery.cookie.js: Batch item modifications
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.
- Also test that the "Show all columns" and "Hide all columns" buttons
  work and that the changes persist across batches.

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-09 15:05:30 +01:00
745ba3d9d3 Bug 27699: Add register information to responsive staff interface header menu
This patch adds register information to the version of the header menu
shown when the browser width is narrower.

To test, apply the patch and enable the UseCashRegisters system
preference.

- If necessary, create at least one cash register for your library under
  Administration -> Cash registers.
- From any page in the staff interface you should see a menu in the
  header showing your username and logged-in branch.
- Expand the menu and choose "Set library, desk and register."
- Select a cash register and save.
- The cash register information should now appear in the header menu.
- Narrow the width of the browser until the menu collapses and shows
  only a user icon.
- When you expand this version of the menu you should see the
  currently-suggested register.

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-09 15:05:26 +01:00
76f929f760 Bug 27682: (follow-up) Make sure table is drawn with correct width
The DataTables plugin calculates the width of the fixed header based on
the initial width of the corresponding table. Since these tables are
inside jQueryUI tabs, the width changes when the tabs are initialized
and jQueryUI adds its classes to the table's container.

This patch "manually" adds the relevant classes to the markup so that
the table's container is drawn with the right padding from the start.

Also fixed: Don't try to destroy "oldTableId" if the tableInit function
didn't pass an oldtabid.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 15:05:25 +01:00
c9b4abac0f Bug 27682: Add a floating table header for Search engine configuration
This patch adds DataTables options to the tables on the search engine
configuration pages. The table on the "Search fields" tab will be
sortable, all tables will be searchable, and all tables will have
floating headers.

To test you should have the SearchEngine preference set to
"Elasticsearch."

- Apply the patch and go to Administration -> Search engine
  configuration (Elasticsearch)
- Test the tables under each tab, "Search fields," "Bibliographic
  records," and "Authorities," the table has a search filter and the
  header row "sticks" to the top of the browser window as you scroll
  down.
- The "Search fields" table should be sortable, but the other two should
  not--they have drag-and-drop row reordering.

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-09 15:05:25 +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
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
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
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
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
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
241a7958f2 Bug 22824: Replace wrong auto replacement
This must be "no", it has been caught by the previous sed

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>

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
1fe1b704f9 Bug 22824: Fix yes/no vs 1/0
Patch generated with:
 perl -p -i -e 's# no: # 0: #' **/*.pref
 perl -p -i -e 's# yes: # 1: #' **/*.pref

no must be 0 and yes must be 1!

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>

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
ebb8c02266 Bug 22824: Correct on/off behaviour
Here things are starting to be a bit tricky.
IMO we don't want to replicate the ImplicitTyping behaviour from
YAML::Syck but handle correctly the different value.
We have the list of available values in the .pref file, the values in DB
must match them.

We want 1 or 0 in DB.

2 more occurrences:
finesMode => Dealt on bug 27676 ('off' is ok here)
itemBarcodeInputFilter => 'OFF' is correct here

Note that we don't use ~ or true/false in *.pref

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>

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
f882b1c60a Bug 22824: Fix searching.pref
One .pref file make YAML::XS fails.
The correct display must be, before and after this patchset:
 If "Unescape escaped" is selected this will allow writing regular expressions "\/like this\/" while "/this/", "or/this" will be escaped and interpreted as regular strings.

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>

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
bb954554b3 Bug 24623: Phase out jquery.cookie.js: Advanced MARC editor
This patch changes cookie handling in the MARC editor templates so that
the js-cookie plugin is used instead of jquery.cookie.

To test, apply the patch and go to Cataloging.

 - Search for a title using the cataloging search in the header search
   form.
 - In the search results, choose "Edit record" from the "Actions" menu.
 - By default you should be taken to the "basic" MARC editor.
 - From the "Settings" menu button, choose "Switch to advanced editor."
 - Return to the cataloging home page and perform another search.
 - Now when you choose "Edit record" you should be taken directly to the
   advanced editor.
 - In the advanced editor, choose "Switch to basic editor" from the
   "Settings" menu.
 - The basic editor should now be saved as the default.
 - Test also with "Edit record" links in catalog search results.

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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
aeb55f4138 Bug 24624: Remove unused jquery.cookie.js plugin
This patch removes inclusion of the jquery.cookie.js plugin from the
"Receive orders" page in Acquisitions. It is unused.

To test apply the patch and follow the process for receiving an order in
Acquisitions:

- Acquisitions -> Vendor -> Receive shipments -> Receive a new shipment
- The table of pending orders should display correctly, and there should
  be no JavaScript errors in the browser console.

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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
74d6f85742 Bug 26960: Move batch item modification template JavaScript to the footer
This patch modifies the batch item modification template so that the
JavaScript is in the footer, conforming with best practices.

The items form can contain <script> tags injected by cataloging plugins.
These are moved from the body of the page into the footer be repeating
the template loop that previously output the script tag.

To test, apply the patch and test the process of submitting items for
batch modification.

After submitting a batch of items, test the "Edit items" form.
Confirm that JavaScript-dependent interactions work correctly:

 - Select2-styled dropdowns
 - RegEx checkboxes
 - Datepicker
 - Plugins like:
   - dateaccessioned.pl on 952d
   - stocknumberam123.pl on 952i
   - callnumber.pl on 952o

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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
64127b42ff Bug 26959: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
cec3eb7513 Bug 26959: (follow-up) Fix CSS for column selection labels
This patch modifies the staff interface SCSS in order to fix the display
of column selection checkbox labels on the batch item modification page.
Even though the style of the elements defines the "white-space" as
"nowrap," adding whitespace within the element (as was done to correct
indentation) still created problems.

Changing the display property of the elements to "inline-block" corrects
this.

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
3b0a3f8753 Bug 26959: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
ff49528a04 Bug 26959: Reindent batch item modification template
This patch reindents the batch item modification template to make
indentation consistent. Some lines have been split up.

Some markup issues have been corrected: Removed script "type" attribute,
removed obsolete "CDATA" markers, removed obsolete IE-specific
conditional comment.

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

- Test the process of submitting a barcode file, and item number file,
  and a list of barcodes.
- Confirm that everything works as expected.

Use your preferred method for checking the differences between files
while ignoring whitespace. I use diff with the  "-w" flag, but I've been
known to leave my car keys in the refrigerator from time to time. The
only changes you see should be split lines.

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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
Joonas Kylmälä
948b7ff598 Bug 25690: (follow-up) Correct grammar in warning messages
This makes the meaning of the warnings a bit more clear.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
1b289f74cc Bug 25690: (QA follow-up) PROCESSED -> PROCESSING for consistency
PROCESSED gave the apearance that the item processing had been completed
whereas in reading the code it appears to actually signify that the item
is awaiting/in proessing state.

This patch updates the variable to be PROCESSING consistently throughout
the codebase.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
Joonas Kylmälä
fd0bc2204c Bug 25690: Make CanBookBeIssued return In Processing state as needing confirmation
This prevents checking out to a patron an item with hold to someone
else in the In Processing state via staff interface.

Also the checkout error message via SIP is now a more clearer one: "Item is
on hold for another patron." Before it was "Item cannot be issued:
$confirmation".

Also the branch transfer and batch checkout pages are adapted to this new
confirmation message as well.

To test:
 1) Create bib level hold to an item for patron A
 2) Check-in that item via SIP2, now the hold state should be "In processing"
 3) Apply patch
 4) Try to checkout the item to patron B via staff interface and
    notice we get now confirmation prompt do we really want to do it
    because it is in processing.

 In order to not have to setup SIP2 server, alternatively steps 1) and
 2) can be done so that you check-in the item in staff interface and
 make it Waiting, and then with SQL change it to "In processing":

 UPDATE reserves SET found = "P" WHERE reserve_id = XXX;
 UPDATE reserves SET waitingdate = NULL WHERE reserve_id = XX
 UPDATE reserves SET expirationdate = NULL WHERE reserve_id = XXX;

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
Joonas Kylmälä
fbef547832 Bug 25690: Remove double usage of 'Reserved' return value
The patch "Bug 19116: Hold not set to waiting after transfer" added a
new meaning to 'Reserved' return value of C4::Reserves::CheckReserves
function. Let's remove double usage and have separate Transferred
return value so we can differentiate between attached and non-attached
holds. This will come useful in future refactorings.

This patch does no changes to the logic except in the
/cgi-bin/koha/circ/branchtransfers.pl and circulation.pl we now give
similarly to waiting state notice about hold being transferred.

To test:
   1) Apply this patch
   2) Create a new item level hold so that pickup library is different
   than where the item is currently. Then return the item so that hold
   is being attached and transferred.
   3) Go to branchtransfers.pl and try to create a new transfer: it
   should prompt you with message "Item is attached to a hold and
   being transferred for XXX" and provide you with option to cancel
   the hold or to ignore the transfer.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
db5aadaeb9 Bug 25846: (follow-up) Show "No cover image available" message
This patch restores the use of a "No cover image available" message in
staff interface search results when no cover image was found by any
image service.

The patch also corrects markup in the search results template which was
preventing the "Adlibris cover image" text from being correctly hidden.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 08:38:09 +01:00
965f65340a Bug 27473: Remove the redirect after 10sec
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:53:59 +01:00
79dba46e3a Bug 27473: (follow-up) Remove the redirect message
I don't think it's necessary to remove the redirect because I don't
think it does any harm, but why include a message about it? I think we
should treat this step like all the others and provide a button to take
the user to the next page.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:53:59 +01:00
Katrin Fischer
0762bd3942 Bug 27473: (follow-up) Change wording of the button
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:53:59 +01:00
Eden Bacani
d6d7a6d3e1 Bug 27473: Improved link text in installer
Test Plan
1. run reset_all to run koha installer
2. Check that after importing sample data step that link says 'Continue
to the next stage'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:53:59 +01:00
7369fa5e50 Bug 26618: (QA follow-up) Update messages syntax
As highlighted, we were not using the standard form of message passing
here. This patch updates the template and controller to adopt the more
usual syntax.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:13 +01:00
87c3911bb8 Bug 26618: Remove use of transferbook in RotatingCollections
This patch replaces the use of C4::Circulation::transferbook in
C4::RotatingCollections with calls to Koha::Item->request_transfer and
adds handling for the various failure cases which that can throw.

We also introduce additional feedback for the end user where it did not
exist before. Now we notify the user if some of the collection could not
be transfers or if transfers were queued rather than set to request
immediately.

Test plan
1/ Set up a rotating collection
2/ Transfer the collection
3/ Confirm the action succeeds
4/ Set up some branch transfer limits that will affect items in your
collection
5/ Transfer the collection
6/ Note that the transfer succeeds but some items are returned as
failures

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:13 +01:00
7e919d12d8 Bug 24446: Catch daterequested in circ returns
Update C4::Circulation::AddReturn to use Koha::Item->get_transfer to
find requested transfers and use Koha::Item::Transfer->receipt to complete
transfer requests if they have arrived at their destination or return the
relevant 'WrongTransfer', 'WasTransfered' and 'TransferTrigger' messages
to the end user.

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:13 +01:00
f1845ff19b Bug 25846: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:12 +01:00
fa349d4cf1 Bug 27703: Make ID of category select field unique
Duplicate element IDs on the authorized values page are invalid and
cause a problem with the JavaScript intended to submit the form when the
category select field changes.

This patch changes the ID of the label and the field and makes the
corresponding change to the JavaScript.

To test, apply the patch and go to Administration -> Authorized values.

 - Click an authorized value category to view its contents.
 - Using mouse or keyboard, make a selection from the "Show category"
   dropdown menu.
 - The form should submit automatically and direct you to the
   corresponding category.
 - Validate the HTML of the page and confirm that there are no errors.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 11:59:01 +01:00
Aleisha Amohia
3c75c48249 Bug 27803: Ensure publicationyear or copyrightdate shows in Holds to Pull
If marcflavour is set to MARC21, use biblio.copyrightdate. If
marcflavour is set to something other than MARC21, use
biblioitem.publicationyear. This is to match previous behaviour of this
feature.

To test:
1) Set your marcflavour system preferenece to MARC21.
2) Go to Administration -> Koha to MARC mapping to confirm what MARC tag
maps to biblio.copyrightdate.
3) In your terminal, run misc/batchRebuildBiblioTables.pl from the shell
to confirm the mapping is locked.
4) Edit a biblio, fill in whichever field is mapped to biblio.copyrightdate
and Save.
5) Place a hold on this biblio. (It must have an available item to allow
placing holds.)
6) Go to Circulation -> Holds to Pull.
7) Confirm your hold shows in the table with the copyrightdate.
8) Set your marcflavour system preference to something other thatn
MARC21.
9) Go to Administration -> Koha to MARC mapping to confirm what MARC tag
maps to biblioitem.publicationyear.
10) In your terminal, run misc/batchRebuildBiblioTables.pl from the shell
to confirm the mapping is locked.
11) Edit a biblio, fill in whichever field is mapped to biblioitem.publicationyear
and Save.
12) Place a hold on this biblio. (It must have an available item to allow
placing holds.)
13) Go to Circulation -> Holds to Pull.
14) Confirm your hold shows in the table with the publicationyear.

Sponsored-by: Catalyst IT
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 11:57:51 +01:00
bfaae61487 Bug 8976: (follow-up) Code cleaning
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 11:57:51 +01:00
12d50cb5d8 Bug 27794: Add link to biblio in lateorders page
This patch modifies the late orders page so that the late order title
uses the "biblio-title" include to display a standard title with a link
to the bibliographic detail page.

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

In the table of late orders, confirm that the title display correctly
and links to the correct bibliographic record.

Signed-off-by: Severine QUEUNE <severine.queune@bulac.fr>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:23 +01:00
f8a92cb8e8 Bug 27792: (follow-up) Double escape the escape
The JSON patturn wasn't getting interpreted correctly for me.. the `\`
characters needed escaping with a second `\`.

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-01 15:14:23 +01:00
50c4efb18d Bug 27792: Improve jEditable configuration for point of sale fields
This patch alters the configuration of the "cost" and "quantity"
editable fields in the "This sale" table on the Point of Sale page:

 - Reduce field with to reduce jumpy table re-draws.
 - Replace "numeric" input type with "text"
 - Add pattern attribute for enforcing currency/number entry

To test you must have EnablePointOfSale and UseCashRegisters enabled and
configured.

 - Apply the patch and go to the Point of Sale page.
 - Add some items for purchase.
 - In the "This sale" table, click the values in the "cost" and
   "quantity" columns and try editing their values.
 - The form field which appears should not fill the width of the table
   column.
 - The fields should enforce the correct input: Currency for the "cost"
   column, digits for the "quantity" column.
 - The fields should update when you click out of them and the correct
   values should appear in the "Collect payment" area.

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-01 15:14:23 +01:00
c4f17c10ff Bug 27592: Link audio alerts to corresponding preference and back
This patch adds links from the audio alerts page to system preferences
and back.

To test, apply the patch and disable the "AudioAlerts" system
preference.

- Log in to the staff interface as a user with permission to access
  audio alerts and system preferences.
- Go to Administration -> Audio alerts.
- You should see an alert, "Audio alerts are disabled."
  - Test the link to system preferences. It should take you a
    preferences search which returns only "AudioAlerts."
- On the system preference page, test that the link to audio alerts
  works correctly.

- Disable audio alerts again.
- Log in to the staf interface as a user with permission to access audio
  alerts but WITHOUT permission to access system preferences.
- Go to Administration -> Audio alerts.
- You should see an alert, "Audio alerts are disabled."
- There should be no link to system preferences.

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-01 15:14:23 +01:00
927a62ba6f Bug 25846: Improve handling of multiple covers on catalog search results in the staff client
This patch modifies the template, JS, and CSS for the staff
interface catalog search results in order to gracefully handle multiple
cover images.

The changed version loops through any cover images which might be
embedded and checks that they are successfully loaded. Only
successfully-loaded images are shown. Only the first image is shown, and
the others can be "paged through" using generated navigation controls.

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

Enable multiple cover image services. The patch was developed with these
services available:

 - Amazon
 - Local cover images (including multiple local cover images)
 - Coce (serving up Amazon, Google, and OpenLibrary images)
 - Images from the CustomCoverImages preference

Perform a variet of searches and confirm that cover images are
displaying correctly, whether there be 0, 1, 2, or more covers
available for each.

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-01 15:14:23 +01:00
Katrin Fischer
d55746004b Bug 26937: (QA follow-up) Rephrase and link CheckPrevCheckoutDelay description
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
Matthias Meusburger
5a31f88d52 Bug 26937: Add an optional delay to the CheckPrevCheckout syspref.
The CheckPrevCheckout allows to check a borrower's checkout history to see if
the current item has been checked out before.

This patch adds an optional syspref: CheckPrevCheckoutDelay

It allows to specify the maximum number of days since the last checkin
that will trigger CheckPrevCheckout's warning.

Test plan:

 - Apply the patch.

 - Set CheckPrevCheckout to "Do" and CheckPrevCheckoutDelay to n.

 - Checkout and check-in an item for a patron.

 - Try to checkout the same item.

 - Check that you have a warning:
   "Patron has previously checked out this title: Check out anyway?"

 - Update the returndate column from the old_issues table to have a returndate
   older than n days ago.

 - Try to checkout the same item.

 - Check that you don't have the warning.

 - Prove t/db_dependent/Patron/Borrower_PrevCheckout.t

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-01 15:14:22 +01:00
8650f8111b Bug 8976: Code cleaning
It was tricky to write the previous patch so I decided to clean the
ground (a bit) for later, taking advantage of having people who are
going to test the whole area.
We can move it to its own bug report if QA wants to.

Sponsored-by: Orex Digital

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
ebe11f70e2 Bug 8976: Sort subfields for authority records
Same patch for the authority frameworks/records

Sponsored-by: Orex Digital

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
b387502eaf Bug 8976: Add the ability to sort subfields for the MARC frameworks
This new enhancement adds the ability to change the default order the subfields.

Both bibliographic and authority MARC subfield structure are taken into
account. And so the item edition as well (in the different screens when
item can be added/edited).

This will answer the following needs that have been listed in the
comments of the bug report:
- $i in 7xx fields should be the first subfield in the sequence
- 300 fields are sorted number first when cataloguers enter the letter fields first
- 100 field, it's commonly $a, $q, $d.

Test plan:
1. Edit a MARC frameworks, field 300
2. Resort the subfield (drag and drop the tab of the subfield) as you
like
3. Save
=> Notice that the list of fields are displayed following the order you
chose
4. Edit it again
=> The order is correctly kept!
5. Create a new bibliographic record
6. Notice that the subfields are order in the same sequence
7. Fill different subfields, not all
8. Save, edit again
9. Note that the subfields that have been filled are listed first, then
the empty ones. But the sequence defined at the framework level is kept.
10. Do the same for an authority framework and create/edit an authority
record
11. Modify item (952) subfields order
12. Create an item and confirm that the order is correct
13. Modify the ACQ framework, 952, modify the order of the subfield
14. Create a new order and confirm that the item form has the subfield
ordered following the sequence defined at the framework level

QA: Note that this patch is about bibliographic records only, next
patches deal with authotiries and items.

Sponsored-by: Orex Digital

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
9dd997e2d3 Bug 27316: Convert 'undef' for sort to Yes and use Yes/No instead of 0/1
This patch changes the interface to remove the undef option
We also update existing mappings and set default of 1

Comment previously indicated undef was treated differently, but in the code we treat undef as 1
That code is untoched to avoid creating problems for older mappings that may be reloaded

To test:
1 - View the ES mappings, note you can set columns to Undef, 0, 1
2 - Set some to undef
3 - Apply patches
4 - Update database
5 - Undef now show as 'Yes'
6 - Confirm you can set columns as Yes/no
7 - Confirm that mandatory columns display correct value when readonly (see issues field)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 13:50:03 +01:00
fa1671aba5 Bug 27680: Add support for sorting fields with multiple data points
This patch adds proper handling for sorting a single column that is
constructed of multiple data entities.. i.e `"data": "string1:string2"`

It does NOT add support for filtering on multiple columns yet.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 13:50:03 +01:00
ba7f51f3d1 Bug 27680: Take first order column for ordering
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 13:50:03 +01:00
ae62da0ff6 Bug 27754: Correct eslint errors in basket.js
This patch makes minor changes to basket.js in the staff interface
templates in order to quiet warnings from ESLint. Besides whitespace,
most changes are to correct undeclared or unnecessarily declared
variables.

To test, apply the patch and verify that the cart still works
correctly.

 - Perform a catalog search in the staff interface.
 - Test adding single or multiple items to the cart from the search
   results page.
 - Testing adding and removing titles to the cart from the bibliographic
   detail page.
 - Open the cart and test the various controls in the toolbar to confirm
   that they still work correctly.

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-01 11:28:03 +01:00
2a2a04a641 Bug 25777: Disable misleading datatables table information display z3950
This patch disables the table information display on z3950_search.pl,
since it only includes search result counts for that page, which is
misleading to end users.

To test:
1)  Do not apply the patch
2)  Do a Z39.50 search from cataloguing for "test" against Library of
    Congress.
3)  Note the bottom of the page says "Show 1 to 20 of 20" and
    "Showing page 1 of 501"
4)  Do a Z39.50 search from Acquisitions for "test" against Library of
    Congress (Acquisitions -> Vendor -> Basket -> Add to basket -> From
    external source).
5)  Apply the patch and restart Plack
6)  Repeat Step #2
7)  Note the bottom of the page now only says "Showing page 1 of 501"
8)  Note the search bar is gone
9)  Repeat step #4
10) Note the bottom of the page now only says "Showing page 1 of 501"
11) Note the search bar is gone

Squashed and mixed authorship added below
Co-authored-by: Owen Leonard <oleonard@myacpl.org>
Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 11:28:03 +01:00
fa8a60ddc8 Bug 27798: Add warning to IndependentBranches system preference
Test Plan:
1) Apply this patch
2) Search system preferences for IndependentBranches
3) Note the warning about changing the setting on a production system

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

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

JD Amended patch:
* Fix commit title
* Don't split the syspref's description, otherwise the sentence will be
split in the POs

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 11:28:03 +01:00
3e8e15cc64 Bug 27071: (follow-up) Provide a more meaningful error message
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 09:56:19 +01:00
83277da4e2 Bug 27661: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:20:08 +01:00
1b1939fe92 Bug 27733: Add "_sort_by" paramter to pickup_locations API query
On the place hold page in the staff interface, add a "_sort_by"
parameter with the "name" value so that the list of libraries is
returned in name order.

To test, apply the patch and locate a title in the staff interface which
has holds on it.

- View the holds information for that title.
- In the table of exising holds, expand the "Pickup library" dropdown
  for any of the entries. The list of libraries should be in order by
  library name.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
9a9865d40a Bug 27732: JavaScript error on place hold page in the staff interface
This patch moves the "$.fn.select2.defaults" definition from the top of
the page to the bottom so that jQuery will be loaded first.

The patch also changes the "dropdownAutoWidth" default so that the
dropdown is sized correctly for its contents, regardless of the width of
the initial <select>.

To test, apply the patch and place a hold in the staff interface for a
title which already has existing holds.

- On the "Place a hold" page, before selecting a patron, you should see
  a table of exising holds. Test the "Pickup library" dropdown. It should
  work correctly.
- The width of the dropdown should accommodate its contents without
  forcing any library name to wrap.
- There should be no errors in the browser console.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
ebb70e4d16 Bug 27713: Duplicate search field IDs in MARC framework administration template
This patch makes a minor change to the MARC framework administration
template so that the ID of a form field on the page isn't a duplicate of
one in the header search form.

To test, apply the patch and go to Administration -> MARC bibliographic
framework -> MARC structure.

- Test the "Search for tag" form field to confirm that it works
  correctly.
- Validate the HTML of the page to confirm that there are no "Duplicate
  ID" errors.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
d0182ab805 Bug 27332: Hide branchcode and note is RenewSerialAddsSuggestion if off
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-02-23 13:16:07 +01:00
6aa9f78258 Bug 27332: Use the branchcode from the subscription when renewing
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-02-23 13:16:07 +01:00
2029b7ef8b Bug 27661: Use td.bg-success for ES and memcached as well
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
ab23dfa3a1 Bug 27661: (QA follow-up) Use bootstrap classes
This patch removes the local status_* css rules in favour of using the
bg-* rules that are shipped with the bootstrap version we are using and
then updates the relevant lines in the template to use those classes.

We also update the default table styling which adds background color to
the odd table rows so that our local classes take precidence.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
Katrin Fischer
fdd6f94844 Bug 27661: (QA follow-up) Capitalization
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
7ed120dfb5 Bug 27661: Update about for message broker status
This patch updates the about page with regards to the message broker
status and adds some small formatting improvements for displaying the
status.

Test plan
1/ Run through the yarn build process to update the CSS file.
2/ View the about page without RabbitMQ installed
3/ View the about page with RabbitMQ installed
4/ Note the formatting and message change and signoff

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:16:07 +01:00
Blou
bdfb78a69a Bug 23929: Invoice adjustments should filter inactive funds
Looking at invoice details, this makes the Adjustments Fund dropdown act
exactly like the Shipping Fund dropdown above, with a Show inactive
checkbox to help filter (by default) the inactive funds out of the list.

Test plan:
0) requires a database with inactive (old) funds along with active ones.
1) Go to invoice details page
2) Click "Add adjustment"
3) Open the drop down beside the Fund label, you should see EVERY fund in database.
4) Compare with behavior of Shipping fund dropdown above.  Not every fund is listed there
5) Apply patch
6) Now behavior is the same, only active fund are listed by default.
7) click "Show inactive" checkbox and see all the funds in the dropdown.

Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:12:56 +01:00
a825c72938 Bug 26208: Perform batch checkin/renewals serially rather than asynchronously
The issue here seems to be that when multiple requests hit at once they may not register that the renewal
performed by the request should lift restrictions on the account.

To mitigate this we can simply perform the renewals one after the other.

To test:
1 - have multiple overdue items on one patron
2 - run overdues.pl with triggers set to generate a restriction
3 - renew all overdues with the Renew All button
4 - restriction is not removed even though patron no longer has overdue items
5 - Apply patch
6 - Make all items overdue again
7 - Click Renew All
8 - Items are renewed and restriction removed
9 - Checkout items to patron again (overdue or not)
10 - Click 'Select all' in checkin column
11 - Click 'Renew/Checkin selected items'
12 - Confirm checkin succeeds as before patches

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

Bug 26208: (follow-up) Remove debugging statements

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:07:45 +01:00
9d2092e36f Bug 27694: use HTML filtering on News Tool textarea
To test:
1. Add some HTML enties to your codemirror in the News Tool. Example: <option value="(itype:DVD and loc:*NEW) AND NOT index-term-genre:&quot;television&quot;">Movies</option>
2. Save and re-eneter the tool, the HTML entites have been converted
3. Apply patch
4. Try again, HTML entities should not be converted

Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-18 11:53:18 +01:00
Agustin Moyano
740331c39e Bug 27719: Apply _escape_str and _escape_price where needed
This bug replaces calls for .escapeHtml and format_price for there null
checking counterparts

To test:

1: have a fresh Koha Testing Docker
2: have a basket set to create item records on ordering
3: populate basket from a marc file, only setting price and fund for the items
4: close basket
5: click to Receive, create invoice
6: on parcel.pl, "Processing" alert never resolves
CHECK => The console shows:
parcel.pl?invoiceid=1:810 Uncaught TypeError: Cannot read property 'format_price' of null
    at render (parcel.pl?invoiceid=1:810)
    at datatables.min_20.1200012.js:57
    at Object.b.fnGetData (datatables.min_20.1200012.js:51)
    at B (datatables.min_20.1200012.js:56)
    at Ha (datatables.min_20.1200012.js:64)
    at P (datatables.min_20.1200012.js:68)
    at vb (datatables.min_20.1200012.js:79)
    at datatables.min_20.1200012.js:76
    at i (datatables.min_20.1200012.js:74)
    at Object.success (datatables.min_20.1200012.js:75)

And that error points toward:
                        "data": "replacement_price",
                        "render": function(data, type, row, meta) {
                            return (row.replacement_price).format_price();
                        },
                    },
7: apply patch
8: redo steps 5 and 6
SUCCESS => "Processing" alert doesn't hangs, and prices with null values
are empty.

Sponsored-by: Virginia Polytechnic Institute and State University

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-02-18 11:52:01 +01:00
0269d2b30e Bug 24108: Remove extra spaces
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
Katrin Fischer
3f755c3ab1 Bug 24108: (QA follow-up) Add staff detail page to syspref description
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
234cced91d Bug 24108: Make export file names consistent
This patch renames the systempreference to be a bit clearer and uses
explicit options rather than a yes/no

Additionally it standardizes the export from the advanced cataloging editor
with that from the details page

To test:
 1 - Apply patches
 2 - Update database and restart all the things
 3 - Open a record in the advanced editor and save it as marc and xml
 4 - Note the file name is 'bib-{biblionumber.{format}'
 5 - Edit the syspref 'DefaultSaveRecordFileID' to be control number
 6 - Repeate 3-4 on a record with and without a control number
 7 - If control number present fiule name should be 'record-{controlnumber}.{format}'
 8 - Otherwise it should be as above
 9 - Repeat tests from the details page of a record
10 - Repeat tests from the opac details page of a record

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-02-17 16:28:25 +01:00
0b1f162dcc Bug 24108: (QA follow-up) Adjust wording and use perl for update file
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-02-17 16:28:25 +01:00
John Doe
88b751e54f Bug 24108: (follow-up) Fix typo with .xml extension
Signed-off-by: David Nind <david@davidnind.com>

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

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

JD amended patch:
* Fix author's patch

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
Cori Lynn Arnold
227077c43d Bug 24108: Advanced editor: configure if biblionumber or control number is used for saved files
Creates a new system preference "SaveRecordbyControlNumber" (renamed in
follow-up patch with "DefaultSaveRecordFileID") which is
initially set to 0 (off/no). By default saving .mrc (and .xml) will be
saved by the biblionumber. If the record does not yet have a biblionumber,
the record will be saved as record.mrc or record.xml

Test plan:
1)  Apply the patch, flush_memcached and restart_all
2)  Enable the "EnableAdvancedCatalogingEditor" system preference
4)  Save the record using the drop down box selecting "Save as MARC (.mrc)
    file.
5)  Note that the file saved is the same as the biblionumber at the top of
    the Advanced Editor interface.
6)  Repeat steps 3-5 for the .xml save option
7)  Update the new system preference "SaveRecordbyControlNumber" and
    change to "Save by ControlNumber"
8)  Verify that there is not a 001 field in the record (delete it if
     there is)
9)  Repeat steps 3-5 for both .mrc and .xml options (the file should still
    be saved as the biblionumber if there is no control field)
10) Add a 001 field to the record such as "001  abc00012345"
11) Repeat step 4 for both .mrc and .xml and verify that the files
    saved are named abc00012345.mrc and abc00012345.xml
12) Sign off!

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

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

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

JD amended patch:
* Remove change to obsolete sysprefs.sql
* Fix author's patch
* Update commit message to tell the syspref has been renamed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
e0e64bde51 Bug 27706: (bug 24488 follow-up) Fix libraries column filter
From commit 2285c2d657
     Bug 24488: Show correct first patron details on Holds to pull

               $('select', this).change( function () {
-                  var filter_value = $(this).val();
-                  holdst.fnFilter( filter_value, 5, true );
+                  holdst.fnFilter( $(this).child().val(), 5 );
               });

This does not make sense, we need to filter on $(this).val(), it's a
select element.

Test plan:
Place some holds
Hit the pending holds page
Use the "libraries" column filter and confirm that it works correctly

Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-16 10:22:13 +01:00
701055f889 Bug 27598: (QA follow-up) Add category description and installer data
This follow-up makes two additions:

- The UPLOAD category is added to auth_val_cat.sql for new
  installations.
- A description of the category is added to the authorized values
  template.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 11:59:31 +01:00
289fe72614 Bug 27598: Add UPLOAD as a built-in system authorized value category
This patch updates the database so that it includes an "UPLOAD"
authorized value category with the "is_system" flag set to 1.

The upload tool template is updated to add a link to the authorized
value category from the hint which appears if no authorized values exist
in the UPLOAD category.

To test, apply the patch and run the database update.

- If you have manually added an UPLOAD category it should now be
  classified as a system category.
- If you did not have an UPLOAD category it should have been created for
  you.
- With no authorized values in the UPLOAD category, go to Tools ->
  Upload.
  - Logged in as a user with permission to manage authorized values you
    should see a note, "No upload categories are defined..." It should
    contain a link directly to the UPLOAD category of authorized values.
  - Logged in as a user without authorized value permission you should
    see a similar note without the link.
- Add an authorized value in the UPLOAD category and confirm that the
  note disappears.

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-02-15 11:59:31 +01:00
d9a97d4802 Bug 12966: Add edition field to Card view
To test:
1 - Search Z3950 to add a record
2 - Find a record with an edition statement
3 - It shows in the table of results
4 - Check the card view
5 - No edition
6 - Apply patch
7 - Repeat
8 - Edition shows in card view

Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 11:57:27 +01:00
dce123700b Bug 8326: Add tooltips
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 11:48:55 +01:00
c038b0f166 Bug 8326: Add aria-disabled to li's
To have the same display of "Editable in OPAC"

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 11:48:55 +01:00
a066f03b5e Bug 8326: Make repeatable and unique_id modifiable when editing patron attribute type
This patch add the ability to modify the attribute "repeatable" and
"unique_id" for a patron's attribute type.
Prior to this patch it was not possible, to keep data integrity.

When editing an attr type, the controller will check is the value can be
modified, depending on the existing patron's attributes.

Test plan:
0/ Setup
Create 1 patron attribute PA1 that can be repeatable
Create 1 patron attribute PA2 that does not have the unique restriction
Create 1 patron attribute PA3 that cannot be repeatable and does not
have the unique restriction

1/
Edit them and confirm that you can modify the repeatable and unique
restrictions

2/ Restore values from 0.
Create a patron P1 with several PA1, PA2=42 and whatever in PA3

3/ Edit PA1 => you cannot remove the repeatable flag but can still
remove the unique

4/ Create a patron P2 with PA2=42

5/ Edit PA2 => you cannot add the unique flag

Play a bit more with the different combinaisons and confirm that it
works as advertised.

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-02-15 11:48:55 +01:00
35994c1da5 Bug 8287: Improve "show checked out items" filter on the overdues report
The "Show any items currently checked out" was confusing, especially if
the "From" and "To" due date filters were passed.

This patch moves the checkbox close to the 2 other filters and show/hide
the due date filters when needed.

Test plan:
0. Have some overdue
1. Search for overdues
2. Confirm that the filters are shown/hidden depending on the status of
the checkbox
3. Fill "To" with a date, tick the checkbox, submit the form
=> Confirm that the date was not taken into account

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 11:48:55 +01:00
a63748e241 Bug 27653: Use div instead of caption for controls
The funds and acquisitions home page tables use captions for additional
table controls. These are more appropriate as "toolbar" divs.

This patch converts the <caption> to <div class="toolbar btn-toolbar">
and moves it just above <table> in the markup to keep it valid.

To test:
1 - View the tables on acquisitions home and budgets views
2 - Note the 'Expand all...' control row
3 - Apply patch
4 - The row remains, but is below the table controls
5 - The row is not included when printing or copying the table

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 11:48:55 +01:00
1acbe07f0b Bug 27646: Allow export of Acquisition home and Funds tables
This patch swtiches these tables ot use KohaTables with exporting enabled

To test:
1 - Apply patch
2 - Confirm acquisitions home and funds tables display correctly
3 - Confirm you can export the tables

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 11:48:44 +01:00
7878aa0012 Bug 26274: Update register.tt to use the API
This patch updates the existing register details page to utilise the new
api routes to gather the summary details on demand.

Test plan
1/ Enable cash registers
2/ Add some transactions
3/ Perform a cashup
4/ Click 'Summary' next to the last cashup date
5/ Note the modal appears as it did prior to the patch being applied.
6/ Check the print option still works
7/ Signoff

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-12 12:33:41 +01:00
3cfa9b1e99 Bug 26958: Move Elasticsearch mapping template JS to the footer
This patch moves inclusion of JavaScript to the footer of the
Elasticsearch mapping template. It also moves the JS into a separate
file.

To test you should have SearchEngine system preference set to
"Elasticsearch."

 - Apply the patch and go to Administration -> Search engine
   configuration (Elasticsearch).
 - Confirm that JavaScript dependent interactions work correctly:
   - Tabs
   - Under the bibliographic records and authorities tabs, table row
     drag-and-drop
   - Under the bibliographic records and authorities tabs, test the
     "Add" line at the bottom of the table.
   - Under the bibliographic records and authorities tabs, test the
     "Delete" button.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-12 12:30:58 +01:00
3acbc9f4dc Bug 27380: Add 'list' option to Koha report parameters
TODO: Need to address the svc endpoints

To test:
1 - Create a 'New SQL report' like:
    SELECT * FROM items WHERE itemnumber IN <<Itemnumbers|list>>
2 - Run the report
3 - You should have a text area where you can enter various itemnumbers
4 - Enter some valid and invalid itemnumbers
5 - You get the info for the valid itemnumbers, no error for the others
6 - Test adding other params to the report and ensure things still work as expected

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-12 12:22:08 +01:00
Petro Vashchuk
f58c271b42 Bug 27654: Sort module.keys hash when render columns_settings.tt
On the "Administration -> Table settings" page, the order of
"tables related to pages" sections is different with each page refresh.
Cause of that is that Perl gives random order for hash keys where
those elements are stored on template render. To avoid that we
add a "sort" method where getting keys similarly how it was done
previously to display tables always in the same order.

To reproduce:
    1) Head over to /cgi-bin/koha/admin/columns_settings.pl
    2) Open any collapsed module settings, for example
"Acquisition tables". Check the order of pages.
    3) Reload the page. Check the order of the same elements again.
They always come in random order, it's easily distinguishable.
    4) Apply the patch.
    5) Repeat steps 1-3 again and ensure that the order of pages
stays the same no matter how many times you reload the page.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-12 12:14:50 +01:00
4bb20fdb30 Bug 27645: Prevent "is on hold" warning to be displayed twice
During a batch checkout we display the "item is on hold" message
depending on different conditions.
However it can happen the message is displayed twice.

If the checkout is not impossible then we see:
This item is on hold for another patron.
This item is on hold for another patron. The hold will be overridden, but not cancelled.

We should only display the second one.

Test plan:
With a default ktd setup you can simply place an item on hold and use the
batch checkout tool to check it out

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-12 12:14:50 +01:00
1f3152d453 Bug 23767: Total children only if parents not visible
This patch changes the way to calculate the footer. It adds the budget and parent ids to the cell
as custom data elements. When totaling we grab a list of all the rows we are showing - if a
row has a parent and the parent is showing then we skip adding its value to the total.

As the function is used on both acqui-home and aqbudgets I adjusted both templates

To test:
1 - Follow the test plan on previous patch
2 - Try filtering the table so you see only the child funds
3 - Confirm the totals show the child alone when it is visible
4 - Confirm the child total is excluded when the parent is visible

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-02-12 12:14:50 +01:00
07150a0a85 Bug 23767: Include child funds in total spent and ordered on acqui-home
To test:
 1 - Have three funds, two parents and one child
 2 - Open a basket and add an order to each fund
 3 - View acqui-home.pl
 4 - Note that ordered values are only added from the two parent funds
 5 - Complete these orders (close basket, receive)
 6 - Note the spent only includes parent funds
 7 - Place three more orders, one from each fund
 8 - Now you can see both spent and ordered are incorrect
 9 - Apply patch
10 - Reload, all should add correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
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-02-12 12:14:50 +01:00
00b012c82d Bug 27671: Use Koha.Preference for UniqueItemFields
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-12 12:14:50 +01:00
7166fabeeb Bug 27671: Restore missing include in orderreceive.tt
Caused by
  commit 15e35f77fb
  Bug 23376: Move AcqCreateItem logic to template

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

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-12 12:14:50 +01:00
a5e8a2d0ad Bug 18506: (QA follow-up) Indentation and more conditionals
Indentation fixes for readability

Cleaned up a few places where the ability to login otherwise was leakign through

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

JD amended patch: Remove trailing spaces

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-09 09:48:35 +01:00
b5ab335d1b Bug 18506: (QA follow-up) opacShibOnly -> OPACShibOnly
As requested

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-09 09:46:08 +01:00
1a81264ac1 Bug 18506: Add xShibOnly preference for Shibboleth authentication
This patch adds two system preferences to Koha, opacShibOnly and
staffShibOnly, allowing users to restrict authentication to just
one method, Shibboleth.

We do however, allow for local fallback for the SCO/SCI logins.

A system preference was chosen over a configuration file update to
allow for local override at the virtualhost level. In this way a
hosting provider can setup a 'backdoor opac' for example to allow
fallback to local logins for support operations.

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-09 09:46:08 +01:00
768c113bc0 Bug 27605: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-09 09:46:08 +01:00
3c02351ff9 Bug 27605: (follow-up) Make the feature work with Bug 27403
This patch adds the "fh-fixedHeader" class to the floating toolbar so
that the floating DataTable header knows what element to append itself
to.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-09 09:23:55 +01:00
a6117ca995 Bug 27605: Add floating toolbar to patron search page
This patch modifies the patron search results page so that the toolbar
with results-related controls "floats" when the user scrolls down. This
gives access to the controls for adding patrons to a list and for
merging patrons.

Other templates are modified to incorporate a change to the CSS which
changes "#searchheader" to ".searchheader," enabling multiple instances
of a <div> styled with the .searchheader class.

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

 - Go to Patrons in the staff interface.
 - Perform a patron search which will return many results.
 - Scroll down the page far enough to trigger the floating toolbar.
 - Confirm that the toolbar is positioned correctly when paging through
   results.
 - Confirm that the patron list and merge controls still work correctly.
 - Confirm that other pages which used the "#searchheader" id are still
   styled correctly:
   - Catalog search results
   - List contents
   - Patron list contents
   - Add orders from MARC file

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-09 09:23:55 +01:00
59941d0b90 Bug 27403: (follow-up) Make basket toolbar and table header work together
The fixed header option for DataTables does the same thing that the
hcSticky jQuery plugin does for us on toolbars, so I've gone through the
templates looking for places they might conflict.

On the acquisitions basket page we can add a special class,
"fh-fixedHeader," to the sticky toolbar to tell DataTables that the
table header should float *below* the toolbar.

To test, apply the patch and go to Acquisitions.

- Locate a vendor and a basket for that vendor with multiple orders.
- Adjust the browse window height if necessary to trigger vertical
  scrolling.
- Confirm that as you scroll down the toolbar (with buttons "Add to
  basket," "Edit basket," etc) sticks to the top of the browser window.
- Confirm that as you continue to scroll, the table header sticks below
  the floating toolbar.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-09 09:23:53 +01:00
8f16e88d59 Bug 27403: Disable fixedHeader on itemsearch
It does not work.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-09 09:23:53 +01:00