koha-equinox.git
4 years agoBug 24455: Add Moment.js to About page
Kyle M Hall [Wed, 4 Mar 2020 13:51:42 +0000]
Bug 24455: Add Moment.js to About page

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

4 years agoBug 24455: Add JS functions to format date and datetime strings
Agustin Moyano [Fri, 17 Jan 2020 19:19:30 +0000]
Bug 24455: Add JS functions to format date and datetime strings

This patch adds the a js-date-format.inc file on each opac and staff interface (date-format.inc whas not available as name)

When you include that file in your TT, you'll get the following functions available:

1. $date(raw_date_string, options)

   This function parses a date string, as produced by an api call, and returns the corresponding date formatted according to 'dateformat' and 'TimeFormat' parameters.

   For example:

   // dateformat: us
   // timeformat: 12hr
   // Timezone: UTC

   $date('2020-03-23T15:00:00+01:00') // You will get '03/23/2020'

   $date('2020-03-23T15:00:00+01:00', {withtime: true}) // You will get '03/23/2020 14:00'

   $date('2020-03-23T15:00:00+01:00', {withtime: true, tz: 'Europe/Paris'}) // You will get '03/23/2020 15:00+01:00'

   Options:

   * dateformat: override date format as configured in staff interface (accepts also 'rfc3339')

   * timeformat: override time format as configured in staff client (available options are '12hr' and '24hr')

   * withtime: also print the time part (default false)

   * tz: set the timezone

2. $datetime(raw_date_string, option)

   The same as $date but sets withtime to true

3. $time(raw_date_string, option)

   The same as $datetime but shows only the time part

To test you must implement and test bug 20936, where it will be used

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24455: Add moment-timezone library in staff
Agustin Moyano [Fri, 17 Jan 2020 21:04:55 +0000]
Bug 24455: Add moment-timezone library in staff

This patch adds koha-tmpl/intranet-tmpl/lib/moment/moment-timezone-with-data-10-year-range.min.js in order to use the moment library with timezones (https://momentjs.com/timezone/)

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24455: Add moment-timezone library in opac
Agustin Moyano [Fri, 17 Jan 2020 19:19:30 +0000]
Bug 24455: Add moment-timezone library in opac

This patch adds koha-tmpl/opac-tmpl/bootstrap/lib/moment-timezone-with-data-10-year-range.min.js in order to use the moment library with timezones (https://momentjs.com/timezone/)

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24455: Add moment library in staff
Agustin Moyano [Fri, 17 Jan 2020 21:03:48 +0000]
Bug 24455: Add moment library in staff

This patch adds koha-tmpl/intranet-tmpl/lib/moment/moment.min.js in order to use the moment library (https://momentjs.com/)

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24455: Add moment library in opac
Agustin Moyano [Fri, 17 Jan 2020 19:19:30 +0000]
Bug 24455: Add moment library in opac

This patch adds koha-tmpl/opac-tmpl/bootstrap/lib/moment.min.js in order to use the moment library (https://momentjs.com/)

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24886: (follow-up) Add markup comments
Owen Leonard [Mon, 23 Mar 2020 19:48:25 +0000]
Bug 24886: (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 interface or functionality.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24886: Reindent reports template
Owen Leonard [Tue, 17 Mar 2020 00:55:05 +0000]
Bug 24886: Reindent reports template

This patch reindents the template for saved reports, replacing tabs with
spaces and making indentation consistent. Some lines have been split up.

To test, apply the patch and go to Reports -> Use saved.

 - Test adding, editing, viewing, and running reports
 - Test filtering by group and subgroup
 - Test the process of adding a guided report

 Everything should work as expected.

 Use your preferred method for checking the differences between files
 while ignoring whitespace. I use diff with the  "-w" flag, but I'm not
 your dad. The only changes you see should be split lines.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24158: Add missing html filters
Jonathan Druart [Mon, 23 Mar 2020 08:33:27 +0000]
Bug 24158: Add missing html filters

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

4 years agoBug 24158: Convert actual cost in an other currency when receiving
Jonathan Druart [Wed, 4 Dec 2019 16:40:17 +0000]
Bug 24158: Convert actual cost in an other currency when receiving

This patch adds a currency dropdown list to the Actual cost field when
receiving items in the acquisition module.
The idea is to let the librarian entered a price in a foreign currency
that will automatically be converted in the local currency ('active').
This converted value will be use as the actual cost once the form is
submitted.

Test plan:
- Create several currencies with different rates
- Create an order, close the basket and receive
- On the receipt page you will notice a new "change currency" checkbox
right close to the 'Actual cost' input.
- Check it
=> The 'Actual cost' input is readonly and a new line appears at the
bottom.
- Enter a number and select a currency
=> The 'Actual cost' input is automatically filled with the converted
value
- Save
=> The converted Actual cost has been inserted in the database.

Sponsored-by: Athlone Institute of Technology
Signed-off-by: Devinim <nazli@devinim.com.tr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24828: Add ability to specify cash register in SIP config
Martin Renvoize [Mon, 9 Mar 2020 14:53:05 +0000]
Bug 24828: Add ability to specify cash register in SIP config

This patch adds the ablity to specify a cash register id to link to
payments taken via SIP2 clients.

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

4 years agoBug 23590: Add notice template for translated installer files
Jonathan Druart [Wed, 25 Mar 2020 11:45:13 +0000]
Bug 23590: Add notice template for translated installer files

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

4 years agoBug 23355: (RM follow-up) Make DB update idempotent
Martin Renvoize [Wed, 25 Mar 2020 11:19:17 +0000]
Bug 23355: (RM follow-up) Make DB update idempotent

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

4 years agoBug 24745: (follow-up) Correct return statement in news plugin
Owen Leonard [Tue, 24 Mar 2020 12:42:11 +0000]
Bug 24745: (follow-up) Correct return statement in news plugin

Subroutine should "return;" instead of "return 0;"
We also prevent ProhibitExplicitReturnUndef by not returning "undef"
explicitly.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24745: OPAC news block plugin should evaluate as false if there are no items
Owen Leonard [Thu, 27 Feb 2020 01:31:37 +0000]
Bug 24745: OPAC news block plugin should evaluate as false if there are no items

This patch changes the way news is returned from GetNewsToDisplay in
KohaNews.pm so that the template variable will evaluate as false instead
of simply being an empty data structure.

To verify the bug, remove your opacheader news entry and view source on
any page in the OPAC. You should find some empty markup right after
'</div> <!-- /navbar -->'

<div class="container-fluid">
    <div class="row-fluid">
    </div>
</div>

To test the fix, apply the patch and reload the OPAC page. The empty
divs should be gone. Add content to the opacheader news item and confirm
that it displays correctly.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24185: Make holds page fast when 'on shelf holds' set to 'If all unavailable'
Andrew Nugged [Tue, 14 Jan 2020 22:50:49 +0000]
Bug 24185: Make holds page fast when 'on shelf holds' set to 'If all unavailable'

When "reserve/request.pl -> C4/Reserves.pm::IsAvailableForItemLevelRequest" called many times with hundred of items and "on shelf holds" parameter set to "If all unavailable" for these items + patron, it goes slow.

It happens because in subloop it is checking if all items available so it is O(n^2) and it re-checks each time the same info for each item with repeating DB/data requests.

Fix:
The inner loop 1:1 picked out into separate subroutine and called outside of the loop, saving data in 'items_any_available' variable once, this variable passed to IsAvailableForItemLevelRequest to be used inside as the precalculated result.

This made algorithm O(n) instead of O(n^2) so there is noticeable speed increase.

How to reproduce:

1) on freshly installed kohadevbox create/import one book,
remember that biblionumber for later use it in down below,

2) add 100 items for that book for some library,

3) find some patron, that patron's card number we will
use as a borrower down below to open holds page,

4) check for the rule or set up a single circulation rule
in admin "/cgi-bin/koha/admin/smart-rules.pl",
that rule should match above book items/library/patron,
check that rule to have a non-zero number of holds (total, daily, count) allowed,
and, IMPORTANT: set up "On shelf holds allowed" to "If all unavailable",
("item level holds" doesn't matter).

5) open "Home > Catalog > THAT_BOOK > Place a hold on THAT_BOOK" page
("holds" tab), and enter patron code in the search field,
or you can create a direct link by yourself, for example, in my case it was:
/cgi-bin/koha/reserve/request.pl?biblionumber=4&findborrower=23529000686353

6) it should be pretty long page generation time on old code, densely increasing for every hundred items added. In the case of this solution, it's fast, and time increases a little only, linear.

I tested on my computer in VirtualBox for page generation times,
did 3-5 runs for same case to check if results are stable, and got such values:

(old code):
  100 items:    50 seconds
  200 items:   3.2 minutes
  300 items:   7.3 minutes

(version with fix):
  100 items:   4.4 seconds
  200 items:   7.5 seconds
  300 items:  10.4 seconds

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24185: Make holds page faster: Preparatory refactoring
Andrew Nugged [Tue, 14 Jan 2020 20:51:57 +0000]
Bug 24185: Make holds page faster: Preparatory refactoring

This is just refactoring. extracting logically independent code
to separate sub + tests update. No logic change yet.

Searching for "any_available" item among all biblionumber items was done
inside of "elsif on_shelf_holds == 2", and it is logically very independent
piece of code (this "@items" loop), it needs just biblionumber and patron
as parameters so it can be extracted into separate subroutine, and
later also called/reused from somewhere else.

This ability to call from another place also made for future patch
to remove O(n^2) problem with nested loops.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24185: Make holds page faster - Call to subroutine moved below "if"
Andrew Nugged [Thu, 19 Dec 2019 16:20:24 +0000]
Bug 24185: Make holds page faster - Call to subroutine moved below "if"

`$on_shelf_holds` was assigned before "return .. if" but not used in that code piece,
so sometimes it was useless. Moved assignment after "return .. if".

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24185: Make holds page faster - Improved "if"
Andrew Nugged [Thu, 19 Dec 2019 16:16:33 +0000]
Bug 24185: Make holds page faster - Improved "if"

`$can_item_be_reserved eq 'OK'` moved in `&&` before `IsAvailableForItemLevelRequest`
to cut away with static known values before calling to more resource consuming subroutine.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23590: DBRev 19.12.00.055
Martin Renvoize [Wed, 25 Mar 2020 09:38:32 +0000]
Bug 23590: DBRev 19.12.00.055

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

4 years agoBug 23590: (QA follow-up) Fix links to patron records (TT variable confusion)
Katrin Fischer [Tue, 24 Mar 2020 14:53:26 +0000]
Bug 23590: (QA follow-up) Fix links to patron records (TT variable confusion)

Fixes links to the patron accounts from the edit and list view of
suggestions.

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

4 years agoBug 23590: DBIC Changes
Jonathan Druart [Tue, 24 Mar 2020 12:05:19 +0000]
Bug 23590: DBIC Changes

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

4 years agoBug 23590: Fix 'select manager' when creation a suggestion
Jonathan Druart [Tue, 24 Mar 2020 11:12:06 +0000]
Bug 23590: Fix 'select manager' when creation a suggestion

On creating the TT var managedby_patron does not exist yet

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

4 years agoBug 23590: Create a separate template notice NOTIFY_MANAGER
Jonathan Druart [Mon, 16 Mar 2020 17:46:22 +0000]
Bug 23590: Create a separate template notice NOTIFY_MANAGER

To separate the two feature we want to create a distinct template
notice.
A new NOTIFY_MANAGER notice is added.
A follow-up patch will be added for other languages, when this one will
be approved by QA.

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

4 years agoBug 23590: Fix ergonomic issue if last modification by is empty
Jonathan Druart [Mon, 16 Mar 2020 17:31:05 +0000]
Bug 23590: Fix ergonomic issue if last modification by is empty

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

4 years agoBug 23590: Update new fields with relevant values
Jonathan Druart [Mon, 16 Mar 2020 17:21:56 +0000]
Bug 23590: Update new fields with relevant values

We are filling lastmodificationdate and lastmodificationby depending on
the max dates between manageddate, accepteddate and rejecteddate

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

4 years agoBug 23590: Remove unused variable
Jonathan Druart [Mon, 3 Feb 2020 10:19:46 +0000]
Bug 23590: Remove unused variable

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

4 years agoBug 23590: (QA follow-up) Fix some problems created by recent changes and updatedatab...
Katrin Fischer [Fri, 31 Jan 2020 21:18:29 +0000]
Bug 23590: (QA follow-up) Fix some problems created by recent changes and updatedatabase statement

- Ensure that the sequence of columns will be the same for new
  and updated installations (add AFTER ...)
- Fix permissions (see bug 22868)
- Fix column configuration (see 16784)
- Remove '- ' displying before the date

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

4 years agoBug 23590: (QA follow-up) Add missing filters and drop script type
Martin Renvoize [Fri, 31 Jan 2020 14:35:39 +0000]
Bug 23590: (QA follow-up) Add missing filters and drop script type

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

4 years agoBug 23590: Fix select manager on list for all tabs
Jonathan Druart [Wed, 13 Nov 2019 16:49:59 +0000]
Bug 23590: Fix select manager on list for all tabs

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23590: Remove JS error on the suggestion list
Jonathan Druart [Wed, 13 Nov 2019 15:39:18 +0000]
Bug 23590: Remove JS error on the suggestion list

The notify option is only available from the edit view

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23590: Add atomic update file
Jonathan Druart [Wed, 13 Nov 2019 14:55:19 +0000]
Bug 23590: Add atomic update file

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23590: Add lastmodification by and date columns
Jonathan Druart [Thu, 7 Nov 2019 14:32:50 +0000]
Bug 23590: Add lastmodification by and date columns

No tests are provided for the changes made to SearchSuggestion. It is
going to be remove very soon as it is super ugly...

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23590: Add the ability to notify a new manager
Jonathan Druart [Thu, 7 Nov 2019 13:42:12 +0000]
Bug 23590: Add the ability to notify a new manager

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23590: Only return patrons that have the suggestions_manage permission
Jonathan Druart [Wed, 6 Nov 2019 18:59:21 +0000]
Bug 23590: Only return patrons that have the suggestions_manage permission

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23590: Batch update manager for suggestions
Jonathan Druart [Wed, 6 Nov 2019 18:41:36 +0000]
Bug 23590: Batch update manager for suggestions

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23590: Cleaning - Remove op_* vars
Jonathan Druart [Wed, 6 Nov 2019 18:17:32 +0000]
Bug 23590: Cleaning - Remove op_* vars

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23590: Clean TT variables for patrons
Jonathan Druart [Wed, 6 Nov 2019 18:16:57 +0000]
Bug 23590: Clean TT variables for patrons

Just a bit of cleaning

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 23590: Add ability to edit the manager of a suggestion
Jonathan Druart [Wed, 6 Nov 2019 18:05:05 +0000]
Bug 23590: Add ability to edit the manager of a suggestion

Prior to this patch there was an hidden behavior that set the manager to
the logged in user when a suggestion was edited. This patch proposes to
let the librarian pick another manager.
Other small adjustements will be added to polish this new behavior:
 * Create 2 new DB columns: suggestions.lastmodificationby and
 suggestion.lastmodificationdate
 * Choose a manager when editing a suggestion
 * Batch modify suggestions and set a manager for them
 * Let notify the new manager using the TO_PROCESS letter
 * Display the manageddate, lastmodificationby and lastmodificationdate
 info where appropriate

This first patch adds a new "Select manager" link when editing a
suggestion.

Test plan for the whole patchset:
0/
  a. Execute the update DB entry, generate the new DBIC file and restart all
  b. Create at least 2 patrons with the suggestions_manage permission
1/ Submit a new suggestion (OPAC or staff, not important)
2/ Accept it
3/ Edit it
=> "Last modification by" is empty
=> You see that you are the manager of this suggestion
4/ Click "Select manager" and search for a new manager
=> The patron search will only display patrons with the
suggestions_manage permission
5/ Save
6/ Edit again
=> The manager is set to you, but there is a note saying that previously
it was the patron you picked
=> The "Last modification by" is set to you
7/ Click "Keep existing manager"
=> The manager is now set to the previous manager
8/ Select another manager (which has a valid email address defined)
9/ Click the "notify" checkbox
10/ Save
11/ Confirm that a TO_PROCESS notice has been generated into the
message_queue table
12/ Create at least one other suggestion
13/ List the suggestions
=> There is a 4th action column to assign a manager to several
suggestions in one go.
14/ Use this new button and confirm that it works as expected
15/ Go to your purchase suggestion list (OPAC and staff)
=> You see the "managed date" displayed in a new column

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24754: (QA follow-up) Add timestamp, remove 11th parameter
Marcel de Rooy [Fri, 20 Mar 2020 12:38:29 +0000]
Bug 24754: (QA follow-up) Add timestamp, remove 11th parameter

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24754: Set userenv for ilsdi requests
Nick Clemens [Fri, 28 Feb 2020 14:46:37 +0000]
Bug 24754: Set userenv for ilsdi requests

Currently ILSDI scripts do not have a userenv set. This affects both
action_logs and statistics.

For action_logs we either get no user or, if there is an active session, we use that one. This can have unintended consequences and we should explicitly set the env so that system user (0) is recorded

For statistics we need to specify a branch to record for actions like renewals. With bug 24759 we add an items method for this. We should take advantage of this method and use the 'opac' interface as the ilsdi scripts live there.

To test:
1 - Enable ILSDI in systempreferences
2 - Checkout an item to a patron
3 - Enable Renewal logs
4 - Ensure you will be able to renew the item several times
5 - Open an incognito/private browser
6 - Renew item via ilsdi:
    http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=RenewLoan&patron_id=5&item_id=1128
7 - Check action logs, interface may be random, user should be 0, if not make sure the user in step 9 is a different one
8 - In private browser open a new tab
9 - Sign in to staff client
10 - Return to other tab
11 - Refresh page to repeat renewal
12 - Check action_logs
13 - The second renewal indicates it was renewed via intranet by logged in staff member
14 - Apply patch
15 - restart_all
16 - Ensure staff client still signed in
17 - Repeate renewal again
18 - Check logs, renewal now indicates opac again (as it should), user is 0 even if logged in on other tab

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 22771: (QA follow-up) Fix POD
Nick Clemens [Tue, 24 Mar 2020 12:15:26 +0000]
Bug 22771: (QA follow-up) Fix POD

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

4 years agoBug 22771: Fix mistakes in list of nonfiling character fields
David Gustafsson [Fri, 6 Mar 2020 13:07:53 +0000]
Bug 22771: Fix mistakes in list of nonfiling character fields

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

4 years agoBug 22771: Respect nonfiling indicators for search fields
David Gustafsson [Wed, 26 Feb 2020 15:14:36 +0000]
Bug 22771: Respect nonfiling indicators for search fields

Strip initial characters from search fields in accordance with
nonfiling character indicators.

To test:

1) Apply patch
2) Run tests in t/Koha/SearchEngine/Elasticsearch.t
3) All tests should pass

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

4 years agoBug 13881: DBRev 19.12.00.054
Martin Renvoize [Wed, 25 Mar 2020 09:28:16 +0000]
Bug 13881: DBRev 19.12.00.054

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

4 years agoBug 13881: Update Schema
Nicolas Legrand [Wed, 2 Oct 2019 12:28:43 +0000]
Bug 13881: Update Schema

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 13881: (QA follow-up) Some documentation and terminology fixes
Katrin Fischer [Tue, 24 Mar 2020 11:24:52 +0000]
Bug 13881: (QA follow-up) Some documentation and terminology fixes

- Branchcode = Library
- Desk id = Desk ID
- Show library name on desk list and when deleting desk instead of code
- Some small changes to the database documentation.

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

4 years agoBug 13881: (QA follow-up) Check for manage_libraries permission
Katrin Fischer [Tue, 24 Mar 2020 11:24:33 +0000]
Bug 13881: (QA follow-up) Check for manage_libraries permission

The .pl was checking for a new permission desks_management not
(yet) added. As the templates already checked for manage_libraries
the .pl was changed accordingly to also use it.

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

4 years agoBug 13881: Add desk management
Nicolas Legrand [Wed, 2 Oct 2019 12:09:21 +0000]
Bug 13881: Add desk management

Add a desk and linked it to a library (branch). That's it. In the
future it'll have super features like being able to link waiting
reserve to a specific desk.

Test plan:

1. go to the administration page and notice there isn't any mention of
desk whatsoever
2. apply patches
3. ./installer/data/mysql/updatedatabase.pl
4. prove t/db_dependent/Koha/Desks.t
5. you now have desks links in admin-home and admin-menu
6. click the link
7. add a desk
8. add another one
9. delete one
10. you should have a fair list of all current desks defined
11. Done

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 13881: Datebase changes, kohastructure and atomicupdate
Nicolas Legrand [Wed, 2 Oct 2019 12:25:50 +0000]
Bug 13881: Datebase changes, kohastructure and atomicupdate

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21800: (RM follow-up) Fix unit tests
Martin Renvoize [Wed, 25 Mar 2020 08:04:26 +0000]
Bug 21800: (RM follow-up) Fix unit tests

We were not setting the repeatable flag for the default framework in the
Item2Marc tests and we also needed to flush the cash to get our
framework changes to be recognised.

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

4 years agoBug 21443: (RM follow-up) Fix failing tests
Martin Renvoize [Tue, 24 Mar 2020 16:25:07 +0000]
Bug 21443: (RM follow-up) Fix failing tests

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

4 years agoBug 24461: Add to_api_mapping to Koha::Acquisition::BasketGroup
Tomas Cohen Arazi [Mon, 20 Jan 2020 14:08:23 +0000]
Bug 24461: Add to_api_mapping to Koha::Acquisition::BasketGroup

This patch adds to_api_mapping to the Koha::Acquistion::BasketGroup
class.

To test:
1. Compare the mapping with the one on the RFC
=> SUCCESS: They match
2. Sigh off :-D

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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24962: Do not display the toolbar when editing a patron and dup is found
Jonathan Druart [Tue, 24 Mar 2020 08:41:06 +0000]
Bug 24962: Do not display the toolbar when editing a patron and dup is found

Whe a duplicate patron is found, the toolbar to save is display without
the button.
We must hide it completely, user has to use the 2 buttons from the dup
message "Editing existing" or "Save as new".

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21503: Restore existing ternary operator logic
Jonathan Druart [Tue, 24 Mar 2020 10:04:28 +0000]
Bug 21503: Restore existing ternary operator logic

This syntax is much more readable IMO. Precendent patch also missed the
case where the parameter was undef.
I think we are good now.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21503: Changed logic for checking values
Christopher Brannon [Wed, 17 Oct 2018 21:19:43 +0000]
Bug 21503: Changed logic for checking values

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21503: Tests clarification for debugging
Christopher Brannon [Wed, 17 Oct 2018 21:15:36 +0000]
Bug 21503: Tests clarification for debugging

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21503: Tests cleanup and highlight a missing case
Jonathan Druart [Mon, 15 Oct 2018 13:45:55 +0000]
Bug 21503: Tests cleanup and highlight a missing case

This patch does the following changes:
- Use build_object to create the MSS
- Store the generate AVs. That was not the case before and so we were
not testing the right things
- Split the tests into 2 parts: staff and OPAC, for readability
- Update the tests' descriptions
- Highlight a problem: If descriptions are missing for both OPAC and
staff, undef is returned. Is that what we expect? It seems that it is
not what were expecting the tests.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21503: Fix AV to fail to other values
Christopher Brannon [Fri, 12 Oct 2018 18:45:29 +0000]
Bug 21503: Fix AV to fail to other values

To Test (Test both detail.pl and opac-detail.pl for functionality):
    1) Apply patch (restart_all)
    2) Look up an item that has a shelving location with a description
        defined (opac description too).
    3) Remove opac description from shelving location.  Refresh
        opac-detail.pl and note that description fails back to the
        regular description.  Refresh detail.pl and note no change.
    4) Remove regular description from shelving location.  Refresh
        opac-detail.pl and detail.pl.  Note that both default to the
        shelving location code.
    5) Remove the shelving location from the LOC table all together.
        Refresh opac-detail.pl and detail.pl.  Note that both default to
        the requested shelving location code.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21503: Tests for the existing behavior
Tomas Cohen Arazi [Mon, 8 Oct 2018 19:21:25 +0000]
Bug 21503: Tests for the existing behavior

This patch introduces 7 tests for the current behaviour for the
AuthorisedValues template plugin.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Template/Plugin/AuthorisedValues.t
=> SUCCESS: Tests pass, all green!

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24877: Add link from vendor to linked subscriptions
Katrin Fischer [Fri, 13 Mar 2020 20:52:24 +0000]
Bug 24877: Add link from vendor to linked subscriptions

Koha shows the number of subscriptions linked to a vendor,
but there is no way to look them up. This adds a link to the
subscription search with the vendor name, so there is an easy way
to find the subscriptions.

To test:
- Be superlibrarian or have serials permission
- Make sure you have one or more subscriptions linked to vendors
- Go to the vendor's detail page in acquisitions
- Verify the number of subscriptions is now a link
- Verify the search results are correct when clicking on it
- Remove permissions (no serials, not superlibrarian)
- Verify now the number shows, but is not linked

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24875: Remove extra punctuation from tools start page
Katrin Fischer [Fri, 13 Mar 2020 20:30:06 +0000]
Bug 24875: Remove extra punctuation from tools start page

The patron clubs note was ending with .., but patch also removed
some single . to be consistent with the majority of entries on the
tools page.

To test:
- Check the tools start page for ending . in the notes
- Apply patch
- Verify the punctuation is now consistent

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24476: DBRev 19.12.00.053
Martin Renvoize [Tue, 24 Mar 2020 11:26:17 +0000]
Bug 24476: DBRev 19.12.00.053

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

4 years agoBug 24476: (QA follow-up) Move new option below warnings and messages in OPAC account
Katrin Fischer [Tue, 24 Mar 2020 09:14:55 +0000]
Bug 24476: (QA follow-up) Move new option below warnings and messages in OPAC account

This makes it so the new option appears right above the table of checkouts etc.
but below any warnings, messages or dialogs.

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

4 years agoBug 24476: Add boolean for TINYINT
Nick Clemens [Fri, 28 Feb 2020 19:16:52 +0000]
Bug 24476: Add boolean for TINYINT

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

4 years agoBug 24476: Schema changes
Nick Clemens [Mon, 23 Mar 2020 11:48:47 +0000]
Bug 24476: Schema changes

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

4 years agoBug 24476: (QA follow-up) Standardize on 'auto renew(al)' and improve db update
Katrin Fischer [Sun, 22 Mar 2020 17:07:57 +0000]
Bug 24476: (QA follow-up) Standardize on 'auto renew(al)' and improve db update

There were several versions: auto renew, auto-renew, autorenew
I've decided to use auto renew (from automatic renewal) to keep
things a bit more consistent.

The DB update was missing AFTER and IGNORE for the sys pref.
Also fixed a tiny typo (tp > to)
Also changed

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

4 years agoBug 24476: Allow direct editing of autorenew_checkouts by patron
Nick Clemens [Fri, 28 Feb 2020 20:06:32 +0000]
Bug 24476: Allow direct editing of autorenew_checkouts by patron

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

4 years agoBug 24476: Rename autorenewal to autorenew_checkouts
Nick Clemens [Fri, 28 Feb 2020 17:30:07 +0000]
Bug 24476: Rename autorenewal to autorenew_checkouts

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

4 years agoBug 24476: Allow patrons to opt out of auto-renewal
Nick Clemens [Thu, 23 Jan 2020 02:38:50 +0000]
Bug 24476: Allow patrons to opt out of auto-renewal

To test:
1 - Verify on staff side that patron can be edited to opt in our out of auto renewal
2 - Check out some items to a patron opted in to auto renewal
3 - Ensure the items are checked out and set to autorenew
4 - Login on the opac at the patron
5 - Verify items cannot be renewed as scheduled for auto-renewal
6 - On staff side, opt patron out of auto renewal
7 - Verify on opac items are no longer marked for auto renewal
8 - Run the auto renewal cron job, items are not renewed
9 - Set 'no renewal before' to a setting that would prevent renewal
10 - Verify that opting patron in or out of auto renewal changes only the reason items cannot be renewed
11 - Set 'no renewal before' to a setting that would allow for renewal
12 - Verify that opting patron in/out changes their ability to renew
13 - Verify that when opted out cron does not renew
14 - Verify that when opted in the item is auto renewed
15 - Reset the due date, opt out, verify manual renewal succeeds

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

4 years agoBug 24476: Change CanBookBeRenewed and adjust tests
Nick Clemens [Thu, 23 Jan 2020 02:37:19 +0000]
Bug 24476: Change CanBookBeRenewed and adjust tests

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

4 years agoBug 24476: API Updates
Nick Clemens [Thu, 23 Jan 2020 02:36:29 +0000]
Bug 24476: API Updates

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

4 years agoBug 24476: Database updates
Nick Clemens [Thu, 23 Jan 2020 02:35:38 +0000]
Bug 24476: Database updates

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

4 years agoBug 24276: Add unit tests for mandatory parameter of FillWithDefaultValues
Marcel de Rooy [Fri, 20 Dec 2019 08:20:23 +0000]
Bug 24276: Add unit tests for mandatory parameter of FillWithDefaultValues

Test plan:
Run t/db_dependent/Acquisition/FillWithDefaultValues.t

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

4 years agoBug 24276: Add FillWithDefaultValues call in neworderempty
Marcel de Rooy [Thu, 19 Dec 2019 14:17:39 +0000]
Bug 24276: Add FillWithDefaultValues call in neworderempty

Apply mandatory defaults from the ACQ framework to records from external
source in Acquisition.

Test plan:
[1] Add 'BK' as mandatory default in ACQ framework for 942$c.
[2] Add order to basket via external source.
[3] Check 942$c on detail page of new record, MARC tab.

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

4 years agoBug 24276: First change indent
Marcel de Rooy [Thu, 19 Dec 2019 13:46:21 +0000]
Bug 24276: First change indent

No other changes than whitespace, guys.

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

4 years agoBug 24951: Add id to payout modal confirm button
Martin Renvoize [Mon, 23 Mar 2020 12:47:27 +0000]
Bug 24951: Add id to payout modal confirm button

This patch adds an ID to the payout confirmation modal on the
borrower account details page.

Test plan:
1/ Apply patch
2/ Attempt to issue a payout to a patron
3/ Inspect the page and note the presence of an ID for the confirm
   button
4/ Signoff

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

4 years agoBug 21443: DBRev 19.12.00.052
Martin Renvoize [Tue, 24 Mar 2020 11:12:51 +0000]
Bug 21443: DBRev 19.12.00.052

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

4 years agoBug 21443: Remove the dependency on finesCalendar
Kyle M Hall [Mon, 23 Mar 2020 12:06:08 +0000]
Bug 21443: Remove the dependency on finesCalendar

Considering that the the use of finesCalendar for this calculation is
already a binary choice, it makes sense to remove the use of
finesCalendar here. It is an uneccessary complication that could
introduce confusion. Allowing this new setting to directly control
the behavior makes it clear and obvious what is going on.

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

4 years agoBug 21443: Mark new columns as boolean in schema file
Kyle M Hall [Mon, 23 Mar 2020 10:50:05 +0000]
Bug 21443: Mark new columns as boolean in schema file

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

4 years agoBug 21443: Unit tests
Kyle M Hall [Mon, 9 Mar 2020 17:36:22 +0000]
Bug 21443: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marti Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21443: Add ability to exclude holidays when calculating rentals fees by time...
Kyle M Hall [Mon, 9 Mar 2020 17:28:16 +0000]
Bug 21443: Add ability to exclude holidays when calculating rentals fees by time period

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marti Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21443: Update Schema
Kyle M Hall [Mon, 9 Mar 2020 17:13:46 +0000]
Bug 21443: Update Schema

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marti Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21443: Update database
Kyle M Hall [Mon, 9 Mar 2020 17:11:55 +0000]
Bug 21443: Update database

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marti Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24837: Rename selectbranchprinter.pl to set-library.pl
Katrin Fischer [Fri, 13 Mar 2020 18:03:12 +0000]
Bug 24837: Rename selectbranchprinter.pl to set-library.pl

This renames the selectbranchprinter.pl file to the more
fitting set-library.pl.

To test:
- Change the library with "Set library" from
  - The menu in the top navigation bar
  - The circulation start page
- Verify the help link on page leads to the correct
  section in the manual
- Read the code... and verify all occurences have been caught

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 24953: Compiled CSS
Martin Renvoize [Tue, 24 Mar 2020 11:03:54 +0000]
Bug 24953: Compiled CSS

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

4 years agoBug 24953: Minor corrections to hold ratios report sidebar
Owen Leonard [Mon, 23 Mar 2020 12:24:34 +0000]
Bug 24953: Minor corrections to hold ratios report sidebar

This patch makes some minor corrections to the sidebar form on the hold
ratios report page:

 - Correct markup errors
 - Change the text of labels from "included" to "include"
 - Move checkboxes to the left of labels

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)

 - Go to Circulation -> Hold ratios
 - In the sidebar, confirm that the labels "Include ordered" and
   "Include suspended" appear to the right of their associated
   checkboxes.
 - Validate the source of the page. There should be no errors.

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

4 years agoBug 24952: Add id to refund modals confirm buttons
Martin Renvoize [Mon, 23 Mar 2020 12:32:34 +0000]
Bug 24952: Add id to refund modals confirm buttons

This patch adds an ID to the refund confirmation modals for both
borrower account and point of sale register details pages.

Test plan:
1/ Apply patch
2/ Attempt to issue a refund to a patron
3/ Inspect the page and note the presence of an ID for the confirm
   button,
4/ Attempt to issue a refund via point of sale register details page
5/ Inspect the page and note the presence of an ID for the confirm
   button.
6/ Signoff

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

4 years agoBug 24907: Add 'include suspended' to holds ratio report
Nick Clemens [Thu, 19 Mar 2020 13:29:50 +0000]
Bug 24907: Add 'include suspended' to holds ratio report

Some libraries would like the option to ignore suspended holds when using the holds
ratio report

Note: this report fails with strict mode enabled, please disable to test

To test:
1 - Add enough holds to a record (3) to make it show on the holds ration report
2 - Browse to Circulation->Holds ratio
3 - Run with default settings and confirm the title shows up
4 - Suspend one of the holds
5 - Run report again and confirm title still shows
6 - Apply patch
7 - Reload the report
8 - Note new option
9 - Run report - title does not show
10 - Lower ratio to 2 and confirm the hold shows

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

4 years agoBug 23409: (follow-up) Allow HTML in circulation note and add line breaks in OPAC...
Katrin Fischer [Thu, 15 Aug 2019 10:59:46 +0000]
Bug 23409: (follow-up) Allow HTML in circulation note and add line breaks in OPAC user account

This patch makes 2 changes:
- bug 22702 allowed adding HTML to the circulation note, so this patch
  restores that ability.
- display OPAC note and messages as multi-line in OPAC

To test:
- Add a circulation and an OPAC note with line breaks and HTML tags
  to the patron account
- Add a message with line breaks to the patron account
- Check line breaks don't show on
  - OPAC > patron account > my summary page
  - Staff > patron account > details
- Apply patches
- Repeat test

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

4 years agoBug 23409: show borrowernotes and opacnote's lines feeds
Alex Arnaud [Thu, 1 Aug 2019 12:48:31 +0000]
Bug 23409: show borrowernotes and opacnote's lines feeds

Test plan:
  - Fill borrowernotes and opacnote with lines separated by lines
    endings,
  - save and check the content is displayed on a single line,
  - apply this patch,
  - check lines endings are displayed

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

4 years agoBug 22589: Remove C4::Overdues::BorType
Josef Moravec [Wed, 27 Mar 2019 09:44:34 +0000]
Bug 22589: Remove C4::Overdues::BorType

Test plan:
0) Apply patch
1) try to run affected scripts and ensure the amounts are corectly
calculated for different patron categories:
    installer/data/mysql/fix_unclosed_nonaccruing_fines_bug17135.pl
    misc/cronjobs/fines.pl
    misc/cronjobs/staticfines.pl

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

4 years agoBug 24468: Remove unused C4::Reserves::_get_itype subroutine
Jonathan Druart [Tue, 21 Jan 2020 14:51:22 +0000]
Bug 24468: Remove unused C4::Reserves::_get_itype subroutine

Since bug 21206, C4::Reserves::_get_itype is not longer used and should
be removed.

  commit 31c29fd31f557306233e6a2936148a5bb10b89a1
  Bug 21206: Replace C4::Items::GetItem

UPDATE: In the meanwhile another occurrence was added to Reserves.t, but
easy to replace

Test plan:
  % git grep _get_itype
must not return any occurrences.

If one needs it, Koha::Item->effective_itemtype must be used instead.

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

4 years agoBug 22098: (QA follow-up) Improving documentation
Katrin Fischer [Sun, 22 Mar 2020 14:06:35 +0000]
Bug 22098: (QA follow-up) Improving documentation

Improves the documentation of the script a bit, but makes one
important change:

-If no prefix is submitted, or prefix does not contain only
-numbers, it returns the inserted code (= keep a field unchanged)
+If no prefix is submitted, or the prefix does contain only
+numbers, it returns the inserted code (= keep the field unchanged).

To test:
- Add an authorised INVENTORY value with 2020 as prefix
- After linking the stocknumberAV.pl to the 952$i in the frameworks
- Edit an item
- Add 2020 in the stocknumber field
- Trigger plugin
- Verify nothing happens

If the prefix contains only numbers... nothing happens.

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

4 years agoBug 22098: (follow-up) fix grammar/formating Perldoc
Mark Tompsett [Tue, 9 Jul 2019 00:52:31 +0000]
Bug 22098: (follow-up) fix grammar/formating Perldoc

- nubers => numbers
- some vertical spacing
- !}fmt -w65
- "contains of letters" => "containing letters"

TEST PLAN
---------
perldoc cataloguing/value_builder/stocknumberAV.pl
apply patch
perldoc cataloguing/value_builder/stocknumberAV.pl
-- after the patch is more readable.

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

4 years agoBug 22098: Update stocknumberAV cataloguing plugin to use objects
Josef Moravec [Fri, 11 Jan 2019 09:25:00 +0000]
Bug 22098: Update stocknumberAV cataloguing plugin to use objects

This patch:
- changes SQL to Koha::AuthorisedValues
- remove type param from script tag
- fixes the plugin description

0) Do not apply the patch
1) Set the plugin
1.1) Update a biblio framework and link plugin stocknumberAV.pl to some item
subfield
1.2) Add authorised values category called "INVENTORY"
1.3) Add some authorised values: authorised value is prefix and
description is a current stock/inventory number
2) Add an item and try to use this plugin to ensure you set it
correctly
2.1) Use a defined prefix to see if the number is correct
2.2) Ensure the number is correctly incremented in authorised values
2.3) Use not defined prefix to see the error message
2.4) Insert a not prefix string (eg number) to see it is not changed
3) Apply the patch
4) Repeat 2) and see it is working the same
5) Look into patch and confirm the description does make sense and is
rigth according to what you see in UI
6) Sign off :D

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

4 years agoBug 21800: Add tests for _check_split
Marcel de Rooy [Thu, 20 Feb 2020 08:56:03 +0000]
Bug 21800: Add tests for _check_split

This new subroutine supports checking the repeatable tag from another
framework. (It will be useful for the item editor.)

Test plan:
Run t/db_dependent/Biblio/TransformKohaToMarc.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21800: Check the correct framework for the repeatable tag
Marcel de Rooy [Thu, 13 Feb 2020 14:35:42 +0000]
Bug 21800: Check the correct framework for the repeatable tag

This depends on the framework parameter. Which should be added back to
the call in C4::Items.

Test plan:
[1] Mark in Default framework one subfield A repeatable and B not repeatable.
Go to item editor. (Work on a biblio in Default framework.)
Check saving and reopening these subfields with VAL1 | VAL2.
Subfield A should be cloned, B should be glued as entered.

[2] Mark in another Framework A not repeatable and B repeatable.
Change framework for this biblio.
Go to item editor again. Reopen item. Behavior subfields in reverse?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21800: Make TransformKohaToMarc aware of non-repeatable subfields
Marcel de Rooy [Thu, 13 Feb 2020 11:33:15 +0000]
Bug 21800: Make TransformKohaToMarc aware of non-repeatable subfields

If a kohafield (in Koha to MARC mappings) contains a pipe char (say A | B),
we split it up into two subfields A and B in MARC.
We will only do that for repeatable subfields now. If the field is not
repeatable, the value will just be 'A | B'.

Note 1: As bug 10306 and its friends (19096) made the Default framework
authoritative, we do no longer have the frameworkcode in this routine.
Formally, we should check the corresponding framework.

Note 2: Does this impact the reverse operation in TransformMarcToKoha?
No, the check on repeatable subfields is done in the interface and not
in TransformMarcToKoha. This routine simply translates two instances of the
same subfield, say A and B, into the value 'A | B' for a kohafield. Not
allowing two instances of a non-repeatable subfield is not in the scope of
this report.

Test plan:
[1] Mark an item field as repeatable in the Default framework.
    Edit an item. Insert A|B in this field and another not-repeatable
    field. Save and reopen. Verify that the repeatable field is duplicated
    and the other one contains the pipe character in the text box.
[2] Look for a repeatable subfield in MARC like e.g. 260$c.
    Go to the cataloguing editor and add A|B in this field.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

4 years agoBug 21800: Add tests for repeatable subfields
Marcel de Rooy [Thu, 13 Feb 2020 11:55:32 +0000]
Bug 21800: Add tests for repeatable subfields

Test plan:
Do not apply the second patch [note 1].
Run t/db_dependent/Biblio/TransformKohaToMarc.t
Run t/db_dependent/Biblio/TransformMarcToKoha.t
Apply the second patch and run them again. Both tests should pass now.

Note 1: The TransformKohaToMarc test should fail with something like:
    #   Failed test 'Check 260e'
    #   at t/db_dependent/Biblio/TransformKohaToMarc.t line 60.
    #          got: 'A'
    #     expected: 'A | B'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>