Commit graph

17076 commits

Author SHA1 Message Date
b9bc3a11f1 Bug 24488: Simplify structure passed to the template
Signed-off-by: Michal Denar <black23@gmail.com>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 14:56:00 +01:00
ed4ad48c56 Bug 24488: (QA follow-up): Fix small bugs, add checkk for waiting holds
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 14:55:59 +01:00
e313bcf130 Bug 24488: [DISCUSSION] For comparaison
I'd like someone to run a benchmark with and without this patch on a
quite big database and see which approach is the best

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 14:55:59 +01:00
Aleisha Amohia
2285c2d657 Bug 24488: Show correct first patron details on Holds to pull
This patch rewrites the complex search query to reduce the risk of
reordering the results multiple times.

This patch includes a change to schema files so may need to upgrade
schema and/or restart memcached

To test:
1) Reproduce problem following test plan in Description
2) Apply patch and refresh page
3) Notice the correct patron is now shown
4) Play with date selection, confirm correct results are still shown
5) Test cancelling holds
6) Test filtering table results
7) Test with biblios with multiple items
8) Test with making items unavailable (i.e. not for loan, checked out)

Sponsored by: IHC New Zealand

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Michal Denar <black23@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 14:55:59 +01:00
e53d559f42 Bug 25552: Add missing Claims Returned option to MarkLostItemsAsReturned
Marking an item as a return claim checks MarkLostItemsAsReturned to see if claim_returned is a value in MarkLostItemsAsReturned.
However, this option was never added to MarkLostItemsAsReturned so an a return claim can never be automatically removed from the patron record, even if they wanted such behavior.

Test Plan:
1) Apply this patch
2) Restart all the things
3) Note the new return claims option on MarkLostItemsAsReturned in the system preferences

Signed-off-by: Marti Fyerst <mfuerst@hmcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-01 17:20:37 +01:00
Petro Vashchuk
65d09dc520 Bug 27538: fix correlation of fields in Holds to Pull table
Bottom filtering row of "Holds to pull" table do not correlate to other
ones, columns diverged from "Call numbers" cell: it should be under
"Available call numbers" while it's under "Available barcodes", and so
on to the last cell (while number of cells still adjusted).

To reproduce:
   1) Head to the Holds to Pull page, check that bottom filtering row
      shifted to the left by one, starting from the "Call number"
      column and don't correlate to the upper table (for example, "Call
      numbers" cell should be under "Available call numbers" while it's
      under "Available barcodes"), and so on for all cells till the end
      of the filtering row.
   2) Apply patch.
   3) Refresh Holds to Pull page and ensure that all filtering row
      columns correlate to other rows columns correctly.

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-01 17:20:37 +01:00
dc072ee4ba Bug 27576: Don't show import recordds table after cleaning a batch
Currently if you clean a batch from the manage marc records page, the import records table appears with no items  at the bottom of the screen

This is because we test for import_batch_id, we should also make sure we didn't just clean a batch

To recreate:
1 - Stage a batch for import
2 - Go to 'Manage staged records'
3 - 'Clean' the batch you just imported
4 - Note the empty table that appears at the bottom of the page
5 - Apply patch
6 - Repeat 1-3
7 - Note the table no longer appears

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-01 17:20:37 +01:00
253c21afd4 Bug 27321: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-01 17:20:37 +01:00
814bb1cf41 Bug 27321: Make disabled DB columns clearly disabled visually
To test:
1. Apply patch and its dependency (bug 17364)
2. Rebuild the CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)
3. Go the system pref BorroweUnwantedFields
4. branchcode should cleary stand out as disabled (#cccccc)

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-01 16:36:38 +01:00
1cc252c145 Bug 27571: "Add to lists" on MARC and ISBD view of OPAC detail page doesn't open in new window
This page corrects the global click handler in the OPAC so that all
"addtoshelf" links will work correctly to trigger the popup window for
adding titles to a list.

To test, apply the patch and test the process of adding a title to a
list in the OPAC from various places:

- Search results
- Bibliographic detail page (normal)
- Bibliographic detail page (MARC view)
- Bibliographic detail page (ISBD view)

Test both adding to an existing list and adding to a new list.
Everything should work correctly.

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-01 16:36:38 +01:00
5c68609110 Bug 27561: Remove type attribute from script tags: Various templates
This patch replaces remaining instances of <script type="javascript"> in
templates with "<script>."

To test, apply the patch and check the changes to the template. Verify
that the changes look correct.

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-01 16:36:38 +01:00
Emmi Takkinen
ef5ec1731a Bug 27430: Change password minimum value hint when patron category is changed
If patrons category is changed during add or edit password
minimum value doesn't change. This patch adds ajax call to
fix this.

To test:
1. Add password minimum length for patron
categories A and B.
2. Create a new patron with category A.
3. Change patrons category to B.
4. Note that password minimum value doesn't change
on hint text.
5. Apply patch.
6. Repeat patron creation, password minimum value
should now change correctly.

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-02-01 16:36:38 +01:00
Emmi Takkinen
545c384205 Bug 27430: Use password minimum length for patron category on password hint
Hint for password minimum length should use minimum length
set for patron category  not "minPasswordLength" value.

To test:
1. Set "minPasswordLength" e.g. 6
2. Set "Patron" category minimum password length e.g. 4
3. Create new a patron.
4. Note that hint after password input field reads "Minimum
   password length: 6"
5. Apply patch.
6. Hint should now read "Minimum password length: 4".

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

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

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-02-01 16:36:38 +01:00
4a8b1b904e Bug 26578: Clean overdrive searches before passing to OD
This patch copies regex used in buildQuery to detect ccl code in queries, but here we adapt
it to remove any ccl signifiers to ensure correct results from OD

To test:
1 - Have OverDrive enabled and configured
2 - set UseAuthoritiesForTracings to "Don't use"
3 - Search in the catalog for a record
4 - From the details page for a record click on an author link
5 - Note the query in catalog is like 'au:&quot;Whitford, Bradley.&quot;'
6 - Some overdrive catalogs will return records matching 'au:'
7 - Apply patch
8 - Reload the page, if there were spurious results before, they should now be gone
9 - Perform a search that returns overdrive results
10 - For a title in overdrive search koha with:
    au:{Author} AND ti:{Title}
11 - Confirm overdrive results are returned
12 - Check the link to overdrive results and note query section is:
    q=Author AND Title

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-01 16:36:38 +01:00
05724721d6 Bug 27261: exlude branchcode from PatronSelfRegistrationBorrowerUnwantedField
To test:
1 - Alter PatronSelfRegistrationBorrowerUnwantedFieldand select branchcode
2 - Attempt to self register via the OPAC
3 - Kabloom, internal server error
4 - Apply patche
5 - Alter the preference again
6 - Note that branchcode is unchecked and disabled
7 - Save the pref
8 - Attempt to self register again
9 - It succeeds

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-01 16:36:38 +01:00
92f1c60a0e Bug 17364: (follow-up) Do not check excluded fields
When clicking on "Select all" excluded fields are selected.
Even if they are not saved into preference, this is disturbing.

Test plan :
1) Edit BorroweUnwantedFields system preference
2) Click "Select all"
3) See that branchcode is not selected

Signed-off-by: Nick Clemens <nick@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-01 16:36:38 +01:00
b986a8419b Bug 17364: Add ability to exclude some columns from selection for system preferences
Bug 22844 Added the option to provide a modal for selecting database columns for system preferences

Some system preferences are limited to a subset of the columns allowed. For instance, setting branchcode
in BorrowerUnwantedFields prevents adding new patrons

This patch allows for defining exclusions in the .pref file

To test:
1 - Alter BorroweUnwantedFields and select branchcode
2 - Attempt to add a new patron
3 - Get a message like "Something went wrong. Check the logs"
4 - Apply patches
5 - Alter the preference again
6 - Note that branchcode is unchecked and disabled
7 - Save the pref
8 - Add a patron
9 - It succeeds

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

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

Bug 17364: (follow-up) Add missing filter

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-01 16:36:36 +01:00
9e27df3b58 Bug 20212: Add missing html filter
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-01 10:24:47 +01:00
0a637084f4 Bug 27251: Add missing html filter
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-29 09:03:45 +01:00
c446026366 Bug 27251: Don't export the actions column
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-29 09:03:45 +01:00
0259ae949b Bug 27251: Fix sort by displayed_on
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-29 09:03:45 +01:00
0e16ad052b Bug 27251: Don't hide the table on delete if empty
If we filtered the result, delete the only row displayed then the table
was hidden. This is a nice behaviour, especially if there was no filter.
However we must show it again if the filters are removed.
I am suggesting to simply to not hide the table and avoid adding more JS
code to deal with this very specific use case.

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-01-29 09:03:45 +01:00
401987bdad Bug 27251: Rewrite QOTD with the Koha REST API
This patch replace the QOTD editor with our new way to CRUD the
adminitration page (like libraries and STMP servers)

Test plan:
Play with the QOTD by adding, removing, updating quotes
Try to find bugs :)

Bug 27251: Fix capitalization

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-01-29 09:03:45 +01:00
Mazen Khallaf
71c1aa44a9 Bug 27486: Rename system preference delimiter to CSVDelimiter
Test Plan:

1. Go to Administration
2. Go to System Preferences
3. Find 'delimiter' (note the name)
4. Apply patch
5. Repeat step 1 and 2
6. Find 'CSVDelimiter' (note the name)

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-01-29 09:03:45 +01:00
James O'Keeffe
dc1eeab6bd Bug 27487: Rename system preference reviewson to OPACComments
This patch renames the reviewson system pref to OPACComments

Test Plan:
1. In Koha Administration, search for the reviewson system preferance
2. Note the presence of the reviewson system preferance
3. Apply the patch and run updatedatabase.pl
4. Repeat steps 1 and 2. The reviewson preferenace should be gone
5. Seach for and note the OPACComments system preferance
6. Ensure that the OPACComments system preferance operates correctly, as
if it were reviewson

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-29 07:56:17 +01:00
ede297cfab Bug 27440: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-28 17:32:53 +01:00
ab4267f18c Bug 27440: Improve structure and style of result toolbars in the OPAC
This patch makes markup and CSS changes to areas of the OPAC classed
with "selections-toolbar," an area of controls found at the top of some
lists of titles: The cart, search results, search history, lists, and
suggestions.

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

- Perform a search in the OPAC. On the search results page, confirm that
  the various controls work correctly:
  - With OpacHighlightedWords enabled, hightlight and unhighlight links
  - Select all and clear all links
  - Selecting one or more checkboxes should enable the "Select titles
    to..." menu.
    - Test that adding items to the cart and lists works correctly.
    - Test that placing multiple holds work.
    - Test that tagging multiple items works.
- From the search results page, add multiple items to the cart.
  - Open the cart and confirm that the the controls described above
    continue to work correctly.
- Open the search history page, confirm that the toolbar controls work
  correctly for all four categories: Current session catalog searches;
  previous session catalog searches; current session authority searches;
  previous session authority searches.
- On the purchase suggestions page, confirm that "select all" and "clear
  all" work, and that deleting multiple suggestions from the toolbar
  link works.
- On the list contents page test the same controls: selection,
  multi-hold, tagging, and "Remove from list."

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-01-28 17:32:53 +01:00
5fbfecdb2f Bug 26755: Make the guarantor search popup taller
This patch changes the dimensions of the popup window in which
guarantors are chosen during the patron edit process.

The patch also removes an obsolete function delcaration for "Dopop"
which is unused.

To test, apply the patch and open a "child" type patron account for
editing.

Click the "Add guarantor" button. This should trigger a popup window.
Eyeball the size of the window, you'll be able to tell that it is
exactly 800 pixels wide.

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-01-28 17:32:53 +01:00
6f2a0bdea8 Bug 21851: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-28 17:32:53 +01:00
f53606b600 Bug 21851: Improve style of sidebar forms
This patch makes minor changes to staff client CSS in order to improve
the style of forms in sidebars. It adjusts the style of nested fieldsets
and gives more room to list items (and the form fields they contain).

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

 - View pages with forms in the left-hand sidebar, especially:
   - Circulation -> Overdues
   - Patrons -> Patrons search results
   - Acquisitions -> Invoices
   - Acquisitions -> Order search results
   - Tools -> Tags

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-01-28 17:32:53 +01:00
36975a1438 Bug 27493: Compiled CSS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-28 17:32:53 +01:00
bfabf09d70 Bug 27493: (follow-up) Remove redundant class
This patch modifies the templates so that instances of "class='select
selectcol' are replaced with "class='selectcol'". I could find no
instances of the "select" class being used in CSS or JS.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-28 17:32:52 +01:00
25106761ce Bug 27493: Add styling for hidden columns
I'm sure adding a 'hidden' class to a table column used to remove it
from display entirely.. seems that's no longer the case so we add the
CSS back in here.

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-01-28 17:32:52 +01:00
d7175906ea Bug 27493: Set column width for checkbox only columns
This patch updates the global OPAC css such that selectcol type columns
in tables are fixed width at 1ch to ensure these columns do not get
unneccessarily wide.

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

Test plan
PAGES: opac-basket, opac-messaging, opac-results, opac-search-history,
opac-suggestions and opac-tags.
1/ Notice that the column containing a checkbox on each of the above
pages is of a mised width, often much larger than required
2/ Apply the patch and rebuild the css file as described above
3/ Notices that the column containing a checkbox on each fo the above
pages is now of a standard, sensible, width.
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-01-28 17:32:52 +01:00
Eden Bacani
065c955cc6 Bug 27395: Add a warning to PatronSelfRegistrationDefaultCategory
This patch adds a warning to the PatronSelfRegistrationDefaultCategory system
preference to not use a regular patron category for self registration.

If a regular patron category code is used and the cleanup_database cronjob is setup
to delete unverified and unfinished OPAC self registrations, it permanently and
and unrecoverably deletes all patrons that have registered more than
PatronSelfRegistrationExpireTemporaryAccountsDelay days ago.

It also removes unnecessary apostrophes at the end of two self registration
and modification system preference descriptions.

Test plan:
1. Apply the patch.
2. Check that the warning message for the PatronSelfRegistrationDefaultCategory
   system preference is clear and makes sense.
3. Sign off!

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-01-28 17:32:52 +01:00
Amy King
d1e12c95e1 Bug 20238: Display description of ITEMTYPECAT in search category
When adding or editing item types (Koha administration > Basic
parameters > Item types) the drop down list currently displays
the ITEMTYPECAT authorized value description. However, on the
item types page the authorized value is displayed in the search
category column.

This enhancement changes the item types page so that the search
category column displays the authorized value's description
instead of the authorized value code.

Test plan:
1. Go to Staff interface home page > Koha administration > Basic
   parameters > Authorized values.
2. Find ITEMTYPECAT and add a new authorized value - make sure it
   has a description.
3. Go to the Basic parameters > Item types page.
4. Edit an item type.
5. For the search category, select the new authorized value you
   created. The desciption should be shown in the dropdown list.
6. Save the changes.
7. In the search category column for the item type you edited, it
   should now display the description instead of the code.
8. Sign off!

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-01-28 17:32:52 +01:00
03fa53c447 Bug 20212: Restore price formatting for ecost and replacement_price
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-28 16:44:48 +01:00
f0669a0c1a Bug 20212: Filter on publisher and notes
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-28 16:44:48 +01:00
43e0b298bf Bug 20212: Fix query for the global filter
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-28 16:44:47 +01:00
41c20e07cd Bug 20212: Re-add EAN for UNIMARC
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-28 16:44:47 +01:00
6180725e61 Bug 20212: Use the DT column filtering provided by the wrapper
Bug 27402 is adding it, we do not longer need the query_from_filters JS
function.

This patch also remove the filters on the left. As we have DT
remembering the filter on the table we don't need them anymore.

Technical note:
Prior to this patch, the search on biblio.author, biblio.title and
biblio.isbn was done by adding hidden columns. Now we are using:
  "data": "biblio.author:biblio.title:biblio.isbn"
to tell the wrapper we are going to build a search on these 3
attributes.

Another trick is to pass a default_filters parameters to the wrapper, to
tell it we want to filter on the orders of a given vendor (this is a
bugfix, the original implementation was returning all the orders).
However We should not use /acq/orders?vendor_id=42 but /acq/vendor/42/orders instead (which does not exist yet),
otherwise (with bug 27353 ) we are going to display the wrong number of non-filtering rows.

The change in Orders.pm is only formatting to match what's done in
  Bug 27353: Set X-Base-Total-Count header for REST API

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-28 16:44:40 +01:00
379b949d24 Bug 20212: Remove fixedHeader
It's an extension that needs to be added.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-28 16:44:12 +01:00
7f853584d5 Bug 20212: Search on fund's name instead of id
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-28 16:44:12 +01:00
9493814a23 Bug 20212: Use functions to escape variables
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-01-28 16:44:12 +01:00
2b04c1bcf5 Bug 20212: (QA follow-up) Fix escaping
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-28 16:44:12 +01:00
8f10553a93 Bug 20212: (QA follow-up) Spelling typo fix
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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-01-28 16:44:12 +01:00
4c932f0434 Bug 20212: (QA follow-up) Resurrect column filtering
This patch adds per-column filtering to the order receiving table.

The order cost column proved difficult to filter, because of the syntax
DBIC requires for comparing replacement_cost * quantity, and passing
that all the way down from the API request to DBIC itself.

I'm still looking for options.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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-01-28 16:44:12 +01:00
b209f3958b Bug 20212: (QA follow-up) Restore table filter sticky
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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-01-28 16:44:12 +01:00
31bd1296ec Bug 20212: (QA follow-up) Remember current filter
This patch restores the original behaviour: if you jump into receiving
an order, and then go back to receiving, you want the page to remember
your filters.

This feature was overlooked. On fixing it, I wrapped some JS code in a
function for reusing it and simplified it a bit as well.

To test:
1. Enter a search term in either of the search fields
2. Add a note, receive or do another action
=> SUCCESS: The search term is kept
3. Apply this patch set
4. Repeat 2
=> SUCCESS: The search term is kept

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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-01-28 16:44:12 +01:00
3496ab75ee Bug 20212: Use API to render orders datatable
This patch makes the pending orders datatable render using the API
instead of hte old controller script. It implements native server-side
pagination thanks to the API and the datatables wrapper.

On polishing it, we found that data can contain many null values, and it
got dirtier in the process.

This code with all the checks that are done on the data is the result of
testing this dev with real-life production databases, huge ones with
thousands of orderlines.

To test:
1. You should compare the behaviour between this table, and the original
   one in master.

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: 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-01-28 16:44:12 +01:00