Martin Renvoize [Tue, 25 Feb 2020 11:03:58 +0000 (11:03 +0000)]
Bug 24721: Update emailLibrarianWhenHoldIsPlaced to use inbound_email_address
This patch updates the emailLibrarianWhenHoldIsPlaced functionality to
use the inbound_email_address method to obtain the correct email address
for a branch.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Maryse Simard [Fri, 21 Feb 2020 19:09:17 +0000 (14:09 -0500)]
Bug 17674: Handling of special cases
This patch adds handling for those 2 particular cases:
1. Deleting the expected issue
2. Deleting a serial and it's item, but one item cannot be deleted
To test:
1.1 Create a subscription that creates items
1.2 Receive two issues
1.3 Use the new button to delete the 'Expected' issue
1.4 The issue is correctly deleted, but the new expected issue created
to replace the one which has been deleted don't have a published or
received date and is show in it's own tab.
1.5 Apply patch
1.6 Repeat steps 1.1 through 1.4
=> The new expected issue is created correctly
2.1 Use the same serial as in 1 or repeat step 1.1 and 1.2
2.2 Check out one of the items
2.3 Delete the corresponding serial and check box to delete items
2.4 The serial is deleted, but not the item.
=> No feedback is show to the user
2.5 Apply patch
2.6 Repeat step 2.1 through 2.4
=> As before, the serial is deleted, but not the item
=> This time, an error is shown to inform the user
Signed-off-by: sonia <sonia.bouis@univ-lyon3.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This new feature allows for batch deletion of serials through the UI. The current usage is a one-by-one long game.
Test plan :
- Apply patch.
- Create at least four serials with items.
- Notice that new items have a numbering pattern and a date in the enumchron field.
- Use the button Delete selected issues for the following steps.
- Delete a serial and its associated item.
- Confirm the serial and item are gone.
- Delete a serial and not its item.
- Confirm the serial is gone.
- Confirm the item is still there and the date part in the enumchron field is gone.
- Delete the two lasts serials.
- Confirm they are gone.
Sponsored-by: CCSR Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds the timestamp column to the biblioimages table.
To test:
1. Apply this patch
2. Run:
$ updatedatabase
$ koha-mysql kohadev
> SHOW CREATE TABLE biblioimages;
=> SUCCESS: Notice the new column is there with the right settings
3. Sign off :-D
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 26 Feb 2020 16:38:53 +0000 (17:38 +0100)]
Bug 24510: Code cleaning
Additional test plan:
Create 3 clubs: abc adf axy
place a hold for on of those club, search for a club 'a'
you will get the focus on the "Clubs" tab
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Wed, 26 Feb 2020 15:53:48 +0000 (15:53 +0000)]
Bug 24510: When Placing a Hold, cursor doesn't focus on Patron Name
This alternate patch tries to implement a fix in a more "correct" way by
tying the cursor focus to the initialization of the jQueryUI tabs. By
configuring both the "create" and "activate" events we can make sure the
correct input field is focused.
I think the only advantage of this patch over the other one is that
tying the focus to the tabs activation makes it a little more obvious
where in the DOM loading sequence the focus is being set.
To test, follow the original patch's test plan:
TEST PLAN:
1. Go to Biblio Record
2. Place Hold (request.pl) - either the Hold above the Bib or the Hold
on the left, it does the same thing.
3. Note that the cursor does not go to Patron Name (for whom to place
the hold for), it goes to the Top Search bar under Checkout.
4. Apply patch and reload the page.
5. The focus should now be correctly set.
6. Toggle between 'Patrons' and 'Club' tabs.
7. Focus should stay set.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lucas Gass [Fri, 24 Jan 2020 15:34:07 +0000 (15:34 +0000)]
Bug 24510: Add focus to Patron/club input
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lari Taskula [Mon, 2 Mar 2020 09:18:26 +0000 (09:18 +0000)]
Bug 24774: Set JSON indentation of 2 spaces in .editorconfig
To test:
1. Start an editor that supports .editorconfig
2. Open or create a JSON file
3. Observe identation is set to 2 spaces by default
Sponsored-by: Hypernova Oy 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 [Fri, 6 Mar 2020 11:20:51 +0000 (11:20 +0000)]
Bug 24818: Update database accountlines.date to timestamp
This update increases the resolution for the 'date' field, used for
'creation date' in accountlines from a 'date' to a 'timestamp'.
This matches other tables where both a created and updated field are
included.
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>
Bug 24384: Add Access-Control-Allow-Origin support to OPAC reports svc
This patch makes the opac/svc/report script use output_with_http_headers
so it sets the Access-Control-Allow-Origin header.
To test:
1. Create a new public report and remember the report id
2. Use your favourite too to fetch the report in JSON by issuing:
GET http://localhost:8080/cgi-bin/koha/svc/report?id=1
=> FAIL: There is no Access-Control-Allow-Origin header
3. Apply this patch
4. Restart Plack
$ sudo koha-plack --restart kohadev
5. Set the AccessControlAllowOrigin to anything (for example,
https://koha-community.org)
6. Repeat 2
=> SUCCESS: On the response headers you find
Access-Control-Allow-Origin: https://koha-community.org
7. Sign off :-D
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>
Aleisha Amohia [Wed, 11 Mar 2020 04:02:53 +0000 (04:02 +0000)]
Bug 3137: (follow-up) Rename using 'collapse', remove syspref lettering and fix guarantor section collapsing
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>
Aleisha Amohia [Fri, 7 Feb 2020 02:57:40 +0000 (02:57 +0000)]
Bug 3137: HideFieldsPatronAddForm syspref
This patches adds a syspref - HideFieldsAddPatronFrom - that controls
which fieldsets are hidden by default in the add patron form.
To test:
1) Apply patch and update database
2) Go to System preferences and confirm HideFieldsPatronAddForm has no
fields selected
3) Go to add a patron / edit an existing patron (any patron category).
confirm everything still works as expected.
4) Tick some of the fields in the syspref to hide them in the form
5) Go back to add patron form.
6) Confirm these fields are hidden and listed at the top of the page
7) Toggle the checkbox and confirm the hidden fields show or hide as
expected.
8) Go back to the HideFieldsPatronAddForm system preference and ensure
the Main address option is checked to be hidden
9) Go to the patron's details page
10) Click to edit the Contact Information section
11) Confirm the Main address option shows and the checkbox to show
hidden fields is not present.
12) Confirm you can click the legend of each section to show and hide
sections
Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Aleisha Amohia [Thu, 6 Feb 2020 22:25:06 +0000 (22:25 +0000)]
Bug 15775: Show message on OPAC summary if holds are blocked due to fines
To test:
1) Set maxoutstanding syspref to 5
2) Create a manual invoice for a borrower for $6
3) Log in to the OPAC as this borrower
4) Go to opac-user.pl, your summary page
5) Confirm there is a warning box explaining that the borrower is
blocked from holds due to fines
6) Back on the staff side, pay some or all of the borrower's fines so
they are no longer over the max outstanding amount
7) Refresh the summary page in the OPAC and confirm the warning is gone
Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lucas Gass [Fri, 21 Feb 2020 20:54:41 +0000 (20:54 +0000)]
Bug 24701: Add column config to course_items_table
This patch adds course_items_table to the column config tool
TEST PLAN:
1. Have some course reserves
2. Add some items to that course reserve and browse to opac-course-details
2. See all the unconfigurable columns
3. Apply patch
4. Browse to column config > OPAC > opac-course-details
5. Try hiding each column and make sure the correct column is hidden on opac-course-details.pl
Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Aleisha Amohia [Wed, 11 Mar 2020 03:38:44 +0000 (03:38 +0000)]
Bug 24844: Focus syspref searchbar
To test:
1) Go to Administration
2) Notice neither of the syspref search bars are focussed so you have to
click inside one to begin searching
3) Apply patch and refresh page
4) Notice the header syspref search bar is now focussed so you can begin
typing straight away
Sponsored-by: Catalyst IT 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>
Fridolin Somers [Wed, 11 Mar 2020 11:00:21 +0000 (14:00 +0300)]
Bug 24847: Select AND by default in items search
In items search form, when clicking on "New field" a new conjunction and search field are added.
It would save time to select AND conjunction by default, like it is in advanced search.
Test plan:
1) Go to items search
2) Click on "New field"
3) Check that AND is selected
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, 16 Mar 2020 10:45:44 +0000 (11:45 +0100)]
Bug 24846: Add new tool to batch extend due dates
With events sometimes leading to unforeseen branch closures (think Coronavirus as
an example), it would be helpful to have a tool that would allow librarians to
update due dates in bulk based on branch and current due date of the material.
It allows to select checkouts given the following parameters:
* libraries
* patron's categories
* range of the due date
You can set a hard due date, or define a number of days to extend the
due date.
Test plan:
Check some items out
Use the new tool to extend the due dates
Test the different filters to make sure they all work
Note: What about holidays?
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Fri, 28 Feb 2020 15:47:12 +0000 (15:47 +0000)]
Bug 24298: (follow-up) Add missing filter!
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Mon, 3 Feb 2020 13:21:18 +0000 (13:21 +0000)]
Bug 24298: Add tests for ModItemTransfer
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 16 Jan 2020 13:56:41 +0000 (13:56 +0000)]
Bug 24298: Record transfer triggers for returns
This patch adds handling to catch transfers that may have been triggered
on item return.
Test Plan:
1) Enable AutomaticItemReturn and accompanying system preference
2) Return an item to the wrong branch and note the transfer
3) Check the database for the new trigger value
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 16 Jan 2020 15:25:34 +0000 (15:25 +0000)]
Bug 24298: Add return enums to branchstransfer triggers
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Andrew Isherwood [Mon, 27 Jan 2020 12:00:47 +0000 (12:00 +0000)]
Bug 24518: Fix IE11 partner filtering
This patch adopts the approach detailed in comment #1.
It also fixes a couple of additional minor bugs relating to the ILL
partner list:
- Exclude partners with no email address, we cannot use them
- Quote the "value" attribute to avoid warnings displayed by IE, they
should be quoted anyway!
Test plan: USE IE11
- Apply the patch
- Define 3 ILL partner patrons (patrons in the category that has a code
that matches the <partner_code> value in the ILL config). One patron
should have no email address, the other two should have an email address
- Navigate to "Place request with partners" for an ILL request
- TEST: Observe that the patron with no email address is not displayed
- Try filtering the list
- TEST: Observe that the list filters correctly
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When catalog has fields 773 (461 in UNIMARC), those linked items are fetched for display in search results.
Looks like the code could be more performant by replacing item search by $9 with direct call with GetMarcItem().
Test plan :
1) Enable system preference EasyAnalyticalRecords
2) Get a record A with a lot of items, it will be the 'Host record'
3) Click on 'Analytics' on this record
4) On one of its items (say item A1) click on 'Create analytics' to
create record B
5) Enter the same title as record A and all mandatory fields
6) Edit field 773 (461 in UNIMARC)
6) Check that $0 contains the biblionumber of record A
7) Check that $9 contains the itemnumber of item A1
8) Perform a search on record A title, be sure you see record B with
other results
=> Compare execution times with and without patch
Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Tue, 25 Feb 2020 07:48:31 +0000 (07:48 +0000)]
Bug 22821: Correct to_address for issue notes
This patch updates the controller and service code to use the newly
introduced 'get_effective_email' routine from bug 22823 to obtain the
branches most appropriate email address.
Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Tue, 25 Feb 2020 09:05:18 +0000 (09:05 +0000)]
Bug 22821: Use 'reply-to' address in issue notes
This patch updates the issue notices to not pass from_address and so
default to the branch email of the user for from_address. We now pass
the patrons email (cascading through email, emailpro, B_email) into the
reply_address field so mail servers are less likely to report emails as
spam and mail clients still have access to the patron address via the
reply-to header when staff want to hit 'reply' and have the email go to
the user.
Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Mon, 24 Feb 2020 20:42:30 +0000 (20:42 +0000)]
Bug 22823: Add get_effective_email method to Koha::Library
Add a `get_effective_email` method to the Koha::Library object which
returns the email address for the library which they are most likely to
have access to.
This method falls back through preferences `branchreplyto`, `branchemail`,
`ReplytoDefault`, `KohaAdminEmailAddress`.
This bug simply introduces a new utility function to return the most effective email address for a branch to be emailed on.
Test plan
1/ Read the new test and verify it makes sense
2/ Run the tests and verify they all pass.
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>
Martin Renvoize [Tue, 25 Feb 2020 09:05:18 +0000 (09:05 +0000)]
Bug 10269: Use 'reply-to' address if passed to EnqueueLetter
This patch updates the EnqueueLetter method to allow passing a reply_to
address. This allows for passing in arbitrary addresses for the reply
address which will not override the from address. This improves the
chances of your email getting past spam filters.
Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
David Roberts [Tue, 28 Jan 2020 00:21:19 +0000 (00:21 +0000)]
Bug 24495: Reword change collection feature
This patch changes the text of the "Collect from patron" field to read "Amount tendered"
To Test:
1) In the Point of Sale screen, check that the text inside the "Collect payment" box reads "Collect from patron"
2) Go into a patron record, and create a manual invoice.
3) Go to Make a payment, and select to "Pay an amount". Check the text reads "Collect from patron".
4) Repeat the process with the "Pay Selected", and "Pay" button (listed next to the individual invoice)
5) Install the patch
6) Repeat steps 1-4, but the text should now read "Amount tendered", instead of "Collect from patron" in all payment options in the patron record, and in the Point of Sale screen.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
TEST PLAN:
1. Apply patch
2. Have some checkout from today and some from multiple previous days.
3. Set todaysIssuesDefaultSortOrder & previousIssuesDefaultSortOrder to 'earliest to latest' and confirm it sorts correctly.
4. Reverse the 2 system preferences and see that it is now sorting the opposite way.
5. Also look at the wording of each system prefence and make sure it makes sense
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>
Arthur Suzuki [Sun, 22 Dec 2019 07:07:51 +0000 (08:07 +0100)]
Bug 23531: Add some tests for HoldItem and HoldTitle with date params provided
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Arthur Suzuki [Tue, 3 Sep 2019 09:08:49 +0000 (11:08 +0200)]
Bug 23531: fix ILSDI non-implemented but documented parameters
test plan :
1/ Submit a hold through ILSDI with start_date and expiry_date parameters
2/ Verify in Koha those parameters are not applied to the newly created
reserve. Delete reserve.
3/ Apply patch and repeat 1.
4/ Verify the reserve created by same request as 1 now has both dates
applied and visible in Koha.
Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com> Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 23236: Remove 'its items may still be processed' in action if no match is found
When importing records and looking for duplicate records using record matching rules,
there is an option if NO match is found to "ignore incoming record (its items may
still be processed)". This doesn't make any sense. Where would the items go if there
is no match?
To test:
1) Go to Tools > Stage MARC for import
2) Browse and choose a file with at least one record that is not already in your
catalog and click on Upload file
3) Fill out the first section with the appropriate information
4) In the Look for existing records in catalog? section, choose a record matching
rule
5) In the Action if no match is found drop-down menu, choose Ignore incoming record
(its items may still be processed)
6) Click on Stage for import
7) Click on Manage staged records
8) Click Import this batch in the catalog
9) In the table, the record status should say Ignore
10) Apply patch
11) Redo steps 1-9, notice the option Ignore incoming records does not mention items
12) Make sure the tool still works and still ignores the record
Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 25 Feb 2020 11:26:31 +0000 (12:26 +0100)]
Bug 24722: DBIC changes
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 [Tue, 25 Feb 2020 11:15:21 +0000 (12:15 +0100)]
Bug 24722: Add test
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 [Tue, 25 Feb 2020 11:07:18 +0000 (12:07 +0100)]
Bug 24722: Enforce NOT NULL constraint on reserves.priority
This field is never NULL and must always be equal to an integer.
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, 4 Mar 2020 18:06:03 +0000 (19:06 +0100)]
Bug 24851: Insert libraries sample data for "UNIMARC"
I am trying to make koha-testing-docker UNIMARC compabible.
In order to have koha-misc4dev insert all the data correctly (users, etc.) we need at least 1 library.
I am suggesting to reuse the usual library list for UNIMARC.
misc4dev will use fr-FR sample data for "UNIMARC"
This is related to https://gitlab.com/koha-community/koha-misc4dev/issues/29
Test plan:
outside your box, in koha-testing-docker (up-to-date), edit .env and set
KOHA_MARC_FLAVOUR=unimarc
DEBUG_GIT_REPO_MISC4DEV_URL=https://gitlab.com/joubu/koha-misc4dev.git
DEBUG_GIT_REPO_MISC4DEV_BRANCH=unimarc
Then start the koha container
When the misc4dev will start its job, the scripts will have the expected
data to continue.
Without this patch you will get
koha_1 | Not enough data in the database, library and/or patron category does not exist at /kohadevbox/misc4dev/create_superlibrarian.pl line 31.
And plenty of errors will follow.
Also, the sample data used in misc4dev will use CPL
(/kohadevbox/misc4dev/data/sql/unimarc/1812/after_22155/items.sql)
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Fridolin Somers [Mon, 2 Mar 2020 14:27:10 +0000 (17:27 +0300)]
Bug 24776: Remove Borrowers.IsDebarred call
Borrowers Template Toolkit plugin contains method IsDebarred that can be directly called from Koha::Patron object.
Also in template circ/returns.tt, when patron is restricted and checkin was backdated, var "patron" is undefined, should be "issue.patron".
Test plan :
1) Enable system preference SpecifyReturnDate
2) For a patron without restriction create a checkout
3) Create a manual restriction to debarre patron
4) Go to return page and click on "Checkin settings"
5) Specify a date in the past, barcode and click "Check in"
6) You see message "Jon Doe is restricted. Please verify this patron should still be restricted."
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Fridolin Somers [Mon, 2 Mar 2020 14:18:34 +0000 (17:18 +0300)]
Bug 24776: Remove Borrowers.HasOverdues call
Borrowers Template Toolkit plugin contains method HasOverdues that can be directly called from Koha::Patron object.
Test plan :
1) Go to circulation page of a patron with overdues
2) Click on print button
3) You see "Print overdues"
4) Go to circulation page of a patron without overdues
5) Click on print button
6) You don't see "Print overdues"
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Andreas Roussos [Sun, 15 Mar 2020 07:43:25 +0000 (08:43 +0100)]
Bug 24827: Specify UTF-8 as encoding in new_from_xml()
The MARC preview of staged records fails when a staged record contains
items with UTF-8 characters (see attached screenshots). That's because
in EmbedItemsInImportBiblio() the call to MARC::Record->new_from_xml()
does not explicitly specify 'UTF-8' as the optional encoding to use.
This patch fixes that.
Test plan (in a MARC21 instance):
0) Stage for import the test record attached to this bug report (make
sure that 'Check for embedded item record data?' is set to 'Yes'),
then go to Home > Tools > Manage staged MARC records and click on
the filename you've just staged.
1) In the 'Citation' column, click on the hyperlink to launch the MARC
preview -- notice how it fails to produce any output apart from the
modal heading.
2) Apply the patch, and restart Plack if necessary.
3) Re-launch the MARC preview: this time the output should include the
whole record, including the embedded item data in field 952.
4) Run the unit tests to ensure nothing was broken inadvertently:
$ prove t
$ prove xt
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Andreas Roussos [Sun, 15 Mar 2020 07:34:52 +0000 (08:34 +0100)]
Bug 24827: Standardise on 'UTF-8' as the encoding name
This patch standardises the encoding name used in direct calls
to new_from_xml() to 'UTF-8' instead of 'utf8' or 'utf-8'.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch introduces code to detect (cookie) annonymous sessions and
act as expected.
Right now, as check_cookie_auth is not passed the required permissions
(because there aren't always required permissions, and the code to check
permissions is shared with other authentication mechanisms) it returns
'ok' and the session id. This use case was overlooked when this was
coded, and yeilds unexpected error codes (500) when the user logs out
and the annonymous session cookie is used to hit the API. The end result
doesn't pose any security issue (i.e. the resource access is rejected)
but the returned error code is not correct and should be fixed.
This patch verifies for an anonymous session (and avoids querying the
corresponding patron) and then verifies if there is an authorization
config on the route and if the patron object is defined.
To test:
1. Apply the tests patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail, 500 instead of the expected 401
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Repeat the original 'steps to reproduce' from the bug report using
the browser
=> SUCCESS: Problem solved!
6. Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
This patch introduces tests for the expected behaviour on API routes
that expect a logged in user, but the request is made with an anonymous
session cookie.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> FAIL: Tests fail because the situation is not handled correctly in
the code
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 3 Mar 2020 13:26:02 +0000 (13:26 +0000)]
Bug 24789: Remove ITS macro format
To test:
1 - Apply patches
2 - Confirm you can save, load, and run macros
3 - Confirm you have no choice of format
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>
Martin Renvoize [Sun, 8 Mar 2020 08:39:40 +0000 (08:39 +0000)]
Bug 24402: About template corrections
With the 20.05 team we introduced and expanded some roles. This patch
adds support for:
* removal of the release maintainer for development releases
* a list of documentation managers
* a list of packaging manager
Signed-off-by: Michal Denar <black23@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, 9 Mar 2020 09:17:50 +0000 (09:17 +0000)]
Bug 22943: (QA follow-up) Add new cases
A few additional cases were introduced since the original bug was
authored. This patch simply catches those cases and makes the same
change.
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>
Hayley Mapley [Mon, 27 May 2019 01:57:05 +0000 (13:57 +1200)]
Bug 22943: Renames the in_ipset function to in_iprange in C4::Auth
Bug 14407 introduced a new system preference to allow limiting the
online self checkout system to an IP or IP Range. The function that
handles this is called in_ipset, which is the name of a linux tool. To
stop confusion, this patch renames the function to 'in_iprange', and the
variable 'ipset' within it to 'iprange'.
To test, follow the test plans outlined in Bug 14407 and confirm that
everything works as expected.
Sponsored-by: Catalyst IT 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>
Owen Leonard [Tue, 11 Feb 2020 15:10:48 +0000 (15:10 +0000)]
Bug 24627: Correct style of clubs search results during hold process
This patch updates some markup and CSS so that the process of selecting
a club from search results during the hold process looks the same as
when selecting a patron: Club names should be links (like patron
names are) and the table row should have a hover color to help indicate
that it is clickable.
This patch also changes the markup of the Patrons/Clubs tabs a little
bit to make the information clearer: Superfluous Bootstrap-related tab
markup has been removed, and the patron and club search results have
been moved into their respective tab containers. This means that if you
search for a patron but then switch to the clubs tab the patron list
doesn't still display.
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)
- You should have more than one patron club defined.
- Begin the process of placing a hold on a title.
- Test the process of searching for both patrons and clubs.
- In each case the name (patron or club) should be an active link.
- Hovering your mouse over the table rows should change the row
background to yellow.
- Clicking the other tab at this stage should hide the search results
from your last search.
- Whether you click the linked name or elsewhere in the table row
you should be correctly redirected to the next step in the holds
process.
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>
Lucas Gass [Thu, 12 Mar 2020 22:38:47 +0000 (22:38 +0000)]
Bug 24858: Correct labels on wording in ExcludeHolidaysFromMaxPickUpDelay
TO TEST:
- Apply patch
- mark your library closed today and tomorrow
- set ReservesMaxPickUpDelay to 1 day
- set ExcludeHolidaysFromMaxPickUpDelay to "Ignore the calendar"
- place hold, capture hold
- hold expiration date is set to tomorrow (doesn't skip closed days)
- Set ExcludeHolidaysFromMaxPickUpDelay to "Use the calendar"
- Place hold, capture hold
- hold expiration date is set to the day after tomorrow (skips closed days)
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle M Hall [Thu, 12 Mar 2020 11:07:48 +0000 (07:07 -0400)]
Bug 24767: Hide the "Claim returned" tab if the feature is turned off
The ability to claim an item "claim returned" is not there if the syspref is empty, however, the Claim Returned tab is stil present on the patrons detail page.
Test Plan:
1) Ensure ClaimReturnedLostValue is not set
2) Note the claims tabs on the circulation and patron details pages
3) Apply this patch
4) Refresh those pages
5) The claims tabs should be gone!
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Aleisha Amohia [Wed, 11 Mar 2020 03:08:12 +0000 (03:08 +0000)]
Bug 5103: (follow-up) Using mapped item fields instead of hardcoding subfields
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Aleisha Amohia [Wed, 26 Feb 2020 02:52:24 +0000 (02:52 +0000)]
Bug 5103: Format dates in MARC detail using dateformat syspref
This patch fixes the formatting of dates on the following pages:
- catalogue/MARCdetail.pl (staff)
- cataloguing/additem.pl (staff)
- opac-MARCdetail.pl (opac)
To test:
1) Ensure that the following fields are visible in the opac, intranet
and editor. You may need to edit the subfields in your default
bibliographic framework
952$d date accessioned
952$q date due/on loan
952$r date last seen
952$s date last borrowed
952$w replacement price date
Also ensure you have dateformat system preference set
2) Go to cataloguing/additem.pl for a biblio. Fill in the fields above
if required. Save
3) Remain on cataloguing/additem.pl. Notice the items table at the top
of the page, the dates are in the generic yyyy-mm-dd format
4) Go to catalogue/MARCdetail.pl for that biblio. Notice dates in wrong
format
5) View this biblio in the opac opac-MARCdetail.pl. Scroll to bottom to
items table. Notice dates in wrong format.
6) Apply patch, restart memcached and plack and refresh pages
7) Dates should now be formatted according to dateformat preference
8) Confirm that changing the preference changes the format of the dates
Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Mon, 9 Mar 2020 09:41:26 +0000 (09:41 +0000)]
Bug 19288: Don't show patron info for item level holds on details.pl unless hold is waiting
This persists after bug 20948 - we can still display patron information even if this patron is not the one
who will receive the item upon checkin. The holds tab can give an overview of holds and information - I think
on the details page the only info we need is whether there might be a item level hold, not who it is for
To test:
1 - Place an item level hold for delivery at a branch not matching home branch of item
2 - Place a record level hold for delivery at homebranch of item placed on hold above
3 - Enable LocalHoldsPriority with 'pickup library' matches the item's 'home library'
4 - View the details for the page, it says the item has a hold for the patron with an item level hold
5 - Check in the item, the hold triggered is for the next available patron, ignore the hold
6 - Apply patch
7 - Check details page, 'There is an item-level hold (priority=1)' with no patron info
8 - Check in, next available hold is still the one triggered
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>
IdRef link is displayed via XSLT.
There is a test of syspref with just if value is defined.
But in installer/data/mysql/sysprefs.sql you see this pref will be 0 by default, which is true in XPATH.
We should test that pref is 1.
Test plan :
1) Create a fresh UNIMARC database
2) You have pref IdRef disabled
3) Simulate a SUDOC record:
Fill a 7..$3 field with a ppn (032581270 for example).
Fill the 009 field with an integer
4) Go to the opac detail page of the record => You don't see IdRef link
5) Enable IdRef syspref
6) Go to the opac detail page of the record => You see IdRef link
7) Disable IdRef syspref
8) Go to the opac detail page of the record => You don't see IdRef link
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>
To test:
- go to admin/categories.pl
- click Help, confirm it takes you to manual main page
- apply patch
- restart all
- click Help, confirm it takes you to patron categories in manual
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 25 Oct 2019 13:49:05 +0000 (13:49 +0000)]
Bug 23521: (follow-up) Add quotes
Not only should terms from facets/limits be grouped, but order should probably matter
We build a different facet for "Dillinger Girl" or "Girl Dillinger"
The parens are possibly overkill now, but I think it makes it very clear and does not hurt
To test:
1 - Follow original plan
2 - Create a new record with 'Girl Dillinger' as author
3 - Search for 'Dill*'
4 - You get all three records (and maybe others that match)
5 - Limit by 'Girl Dillinger' - you get two records
6 - Same for 'Dillinger Girl'
7 - Apply patch
8 - Limits/facets for 'Dillinger Girl' and 'Girl Dillinger' now match a isngle record
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Alex Arnaud [Thu, 29 Aug 2019 15:06:14 +0000 (15:06 +0000)]
Bug 23521: Put parentheses arround limit terms
Test plan:
- Use Elasticsearch 6 (you'll need Bug 18969),
- create a biblio (#1) with "Dillinger Girl" in author and what you
want in title,
- create another biblio (#2) with the word "girl" in the title and
"Dillinger Escaplan" as author
- reindex
- search * and refine on "Dillinger Girl"
- Ko => Biblio #1 and #2 appear
- Apply this patch,
- search * and refine on "Dillinger Girl"
- Ok => anly biblio #1 appears
- use Elasticsearch 5 again
- check for no search regression
Julian Maurice [Fri, 14 Feb 2020 09:44:39 +0000 (10:44 +0100)]
Bug 24662: Remove global variables MSG_* from datatables.inc
Now that bug 21156 is pushed, we don't need to have global variables in
.inc or .tt files for translation in .js file. We can simply declare our
translatable strings where they are used.
This patch removes all global variables used in DataTables configuration
Test plan:
1. cd misc/translator && ./translate update fr-FR
2. Translate strings in misc/tranlator/po/fr-FR-messages-js.po
3. cd misc/translator && ./translate install fr-FR
4. Go to the staff interface, in english, and check that DataTables
tables are still working. You should check at least the following pages:
- catalogue/detail.pl
- circ/circulation.pl
- tools/quotes.pl
- tools/letter.pl
5. Switch to french and check again DataTables tables, and verify that
strings are translated
This patch depends on bug 24661
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 24081 added a discount permission to the accounts system but during
subsequent rebases, the description of that new permission got lot.
This patch restores the description.
Test plan
0/ Check that a checkbox without a description appears in the 'Manage
patrons patrons fines and fees' section of the 'Set permissions' page.
1/ Apply the patch
2/ Reload the page and note that the checkbox now preceeds a suitable
description.
3/ Signoff.
Bonus points: Check the permission works as described and hides the
'Discount' action button for staff who do not have the permission
enabled.
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
We need the API call to get ILL requests on the patron profile page,
this commit allows this.
Test plan:
- Do not apply the patch.
- Go to the "Ill requests history" page for a patron who has made ILL
requests
- TEST: Observe that no requests are displayed
- Apply the patch
- Refresh the page
- TEST: Observe that requests are displayed
- Go to the main "ILL requests" page
- TEST: Observe that requests are displayed
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Tue, 10 Mar 2020 13:37:56 +0000 (09:37 -0400)]
Bug 24839: Return hold info to transfer script and set borrowernumber
To test:
1 - Place a hold on an item
2 - Go to Circulation->Transfers
3 - Attempt to transfer item to a branch it is not expected at
4 - No warning
5 - Apply patches
6 - Repeate
7 - You get a notice that there is a hold and must deal with the hold (or ignore)
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>