Agustin Moyano [Fri, 17 Jan 2020 19:19:30 +0000 (16:19 -0300)]
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>
Agustin Moyano [Fri, 17 Jan 2020 21:03:48 +0000 (18:03 -0300)]
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>
Agustin Moyano [Fri, 17 Jan 2020 19:19:30 +0000 (16:19 -0300)]
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>
Owen Leonard [Tue, 17 Mar 2020 00:55:05 +0000 (00:55 +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>
Jonathan Druart [Wed, 4 Dec 2019 16:40:17 +0000 (17:40 +0100)]
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>
Martin Renvoize [Mon, 9 Mar 2020 14:53:05 +0000 (14:53 +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>
Owen Leonard [Thu, 27 Feb 2020 01:31:37 +0000 (01:31 +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 -->'
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>
Andrew Nugged [Tue, 14 Jan 2020 22:50:49 +0000 (00:50 +0200)]
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:
Andrew Nugged [Tue, 14 Jan 2020 20:51:57 +0000 (22:51 +0200)]
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>
Andrew Nugged [Thu, 19 Dec 2019 16:20:24 +0000 (18:20 +0200)]
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>
Andrew Nugged [Thu, 19 Dec 2019 16:16:33 +0000 (18:16 +0200)]
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>
Jonathan Druart [Mon, 16 Mar 2020 17:46:22 +0000 (18:46 +0100)]
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>
Katrin Fischer [Fri, 31 Jan 2020 21:18:29 +0000 (21:18 +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>
Martin Renvoize [Fri, 31 Jan 2020 14:35:39 +0000 (14:35 +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>
Jonathan Druart [Wed, 6 Nov 2019 18:05:05 +0000 (19:05 +0100)]
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>
Nick Clemens [Fri, 28 Feb 2020 14:46:37 +0000 (14:46 +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>
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>
David Gustafsson [Wed, 26 Feb 2020 15:14:36 +0000 (16:14 +0100)]
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>
Katrin Fischer [Tue, 24 Mar 2020 11:24:52 +0000 (11:24 +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>
Katrin Fischer [Tue, 24 Mar 2020 11:24:33 +0000 (11:24 +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>
Nicolas Legrand [Wed, 2 Oct 2019 12:09:21 +0000 (14:09 +0200)]
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>
Martin Renvoize [Wed, 25 Mar 2020 08:04:26 +0000 (08:04 +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>
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>
Jonathan Druart [Tue, 24 Mar 2020 08:41:06 +0000 (09:41 +0100)]
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>
Jonathan Druart [Mon, 15 Oct 2018 13:45:55 +0000 (10:45 -0300)]
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>
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>
Katrin Fischer [Fri, 13 Mar 2020 20:52:24 +0000 (20:52 +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>
Nick Clemens [Fri, 28 Feb 2020 19:16:52 +0000 (19:16 +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>
Katrin Fischer [Sun, 22 Mar 2020 17:07:57 +0000 (17:07 +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>
Nick Clemens [Fri, 28 Feb 2020 20:06:32 +0000 (20:06 +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>
Nick Clemens [Fri, 28 Feb 2020 17:30:07 +0000 (17:30 +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>
Nick Clemens [Thu, 23 Jan 2020 02:38:50 +0000 (02:38 +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>
Nick Clemens [Thu, 23 Jan 2020 02:37:19 +0000 (02:37 +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>
Nick Clemens [Thu, 23 Jan 2020 02:36:29 +0000 (02:36 +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>
Nick Clemens [Thu, 23 Jan 2020 02:35:38 +0000 (02:35 +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>
Marcel de Rooy [Thu, 19 Dec 2019 14:17:39 +0000 (14:17 +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>
Martin Renvoize [Mon, 23 Mar 2020 12:47:27 +0000 (12:47 +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>
Kyle M Hall [Mon, 23 Mar 2020 12:06:08 +0000 (08:06 -0400)]
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>
Kyle M Hall [Mon, 23 Mar 2020 10:50:05 +0000 (06:50 -0400)]
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>
Kyle M Hall [Mon, 9 Mar 2020 17:36:22 +0000 (13:36 -0400)]
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>
Kyle M Hall [Mon, 9 Mar 2020 17:28:16 +0000 (13:28 -0400)]
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>
Kyle M Hall [Mon, 9 Mar 2020 17:13:46 +0000 (13:13 -0400)]
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>
Kyle M Hall [Mon, 9 Mar 2020 17:11:55 +0000 (13:11 -0400)]
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>
Katrin Fischer [Fri, 13 Mar 2020 18:03:12 +0000 (18:03 +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>
Owen Leonard [Mon, 23 Mar 2020 12:24:34 +0000 (12:24 +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>
Martin Renvoize [Mon, 23 Mar 2020 12:32:34 +0000 (12:32 +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>
Nick Clemens [Thu, 19 Mar 2020 13:29:50 +0000 (13:29 +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>
Katrin Fischer [Thu, 15 Aug 2019 10:59:46 +0000 (10:59 +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>
Alex Arnaud [Thu, 1 Aug 2019 12:48:31 +0000 (14:48 +0200)]
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>
Josef Moravec [Wed, 27 Mar 2019 09:44:34 +0000 (09:44 +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>
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>
Katrin Fischer [Sun, 22 Mar 2020 14:06:35 +0000 (15:06 +0100)]
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>
- 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>
Josef Moravec [Fri, 11 Jan 2019 09:25:00 +0000 (09:25 +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>
Marcel de Rooy [Thu, 20 Feb 2020 08:56:03 +0000 (08:56 +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>
Marcel de Rooy [Thu, 13 Feb 2020 14:35:42 +0000 (14:35 +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>
Marcel de Rooy [Thu, 13 Feb 2020 11:33:15 +0000 (11:33 +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>
Marcel de Rooy [Thu, 13 Feb 2020 11:55:32 +0000 (11:55 +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>
Bug 15214: bulkmarcimport should log if an authority has been updated
When importing with bulkmarcimport, authorities may or may not be updated based
on which authority is newer (005 are compared). This patch allows to keep track
in the result yaml file if an authority has been updated or not:
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 20 Mar 2020 15:07:27 +0000 (15:07 +0000)]
Bug 24759: (follow-up) Fix tests
Earlier tests delete borrowers before issues, can cause a constraint failure
Wrong test count
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>