Andrew Isherwood [Wed, 18 Aug 2021 14:07:54 +0000 (15:07 +0100)]
Bug 28879: Fix display of request metadata
This commit adjusts the CSS surrounding the display of request
metadata, it improves the display for metadata with long key names.
Test plan:
- Do not apply patch
- Create a FreeForm ILL request with a custom metadata field with a long
name
- View the created request
- Observe that the long metadata name breaks the display of the metadata
- Apply the patch
- View the created request
=> TEST: Observe that the display is no longer broken
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
3. Verify that the framework code was correctly assigned:
sudo koha-mysql kohadev -e 'SELECT frameworkcode FROM biblio ORDER BY timestamp DESC LIMIT 1;'
=> SUCCESS: It picked it
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Mon, 17 May 2021 14:20:41 +0000 (16:20 +0200)]
Bug 28365: (Bug 19873 follow-up) Make it possible to search on value 0
Bug 19873 fixed search with value 0.
It works in first page but not in other pages.
This patch fixes query_cgi var.
Test plan:
- create a st-numeric index in zebra conf related to
a numeric field
i.e:
yourindex 1=yourindex 4=109
- fill a field with 0 in several biblio records,
- reindex your biblios,
- search yourindex=0 and go to second page of results,
- should not work,
- apply this patch,
- test again,
- should work
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Mon, 17 May 2021 14:15:19 +0000 (16:15 +0200)]
Bug 28365: Add unit test
Run prove t/db_dependent/Search.t
Without fix you get error :
# Failed test 'buildQuery should keep 0 value in query_cgi'
# at t/db_dependent/Search.t line 670.
# got: 'idx=su%2Cphr'
# expected: 'idx=su%2Cphr&q=0'
This patch also adds a test for query_desc in case it is broken in the
future.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Joonas Kylmälä [Sat, 30 Oct 2021 19:02:39 +0000 (19:02 +0000)]
Bug 29380: Correct table name in joins to prevent errors
The commit "Bug 29290: Rename relationships borrower =>
patron" (d46492ac23) renamed the relation for the borrowers table from
'borrower' to 'patron' but the joins were not updated accordingly so a
few scripts got broken.
To test:
1) Notice that
$ perl misc/cronjobs/automatic_renewals.pl -c -s -v
returns 255 error code on exit
2) Apply patch
3) Notice the automatic_renewals.pl works now and exit code is 0
4) Make sure /cgi-bin/koha/tools/batch_extend_due_dates.pl works.
5) Try to grep for 'borrower' in Koha source code and see if there
are any other join done using the Koha::Checkout or
Koha::Old::Checkout objects.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 29380: (follow-up) Fix renewal feature in staff interface
The commit "Bug 29290: Rename relationships borrower =>
patron" (d46492ac23) renamed the relation for the borrowers table from
'borrower' to 'patron' but the usage in the renew.pl script was not
updated.
To test:
1) Try to renew a book in intranet through the renewal tab
2) Notice it gives error
3) Apply patch
4) Notice the error is now gone
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Johanna Raisa [Thu, 2 Sep 2021 09:22:51 +0000 (12:22 +0300)]
Bug 28236: Allow access to json files from apache config
This patch grants json files from koha-tmpl. Otherwise systempreferences won't be able to fetch them.
TEST PLAN:
1) Try to set systempreference BorrowerUnwantedField.
2) The modal is empty.
3) Modify Apache configurations like in this patch.
4) Try again set the systempreference.
5) The modal should show list of parameters.
Sponsored-by: Koha-Suomi Oy Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD Amended patch: replace tab characters and reword commit title
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 3 Nov 2021 09:06:35 +0000 (10:06 +0100)]
Bug 24850: Date only are not RFC3339
We removed the fallback on 'Bug 24850: Don't fallback when date_format
is passed', and the dates passed for date only (YYYY-MM-DD) are not
RFC3339 formatted but ISO8601.
We must assume that all dates will be YYYY-MM-DD, without fallback.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 2 Nov 2021 08:42:05 +0000 (09:42 +0100)]
Bug 29261: (bug 15812 follow-up 3) Fix translation issue in include file
This is getting messy. No idea how I tested the previous patches but it
was not working, the problem still persisted.
This patch is using the I18N TT plugin to make things easier and fix the
original problem.
Test plan:
Apply the patch
perl translate update fi-FI
Edit misc/translator/po/fi-FI-messages.po
Locate and translate "Check out"
61 #: koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt:20
62 msgid "Check out"
63 msgstr "Laina"
Locate and transate "View"
182 #: koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt:22
183 msgid "View"
184 msgstr "Nayta"
Apply the change to the fi-FI templates
perl translate install fi-FI
Now enable the fi-FI in the lang syspref, search for patron and confirm
that the result view is displayed correctly.
Note that the "Check out" and "View" strings are correctly translated
(when you hover the cardnumbers or patron's names)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 19 Oct 2021 15:57:10 +0000 (16:57 +0100)]
Bug 28729: Unit tests
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 19 Oct 2021 15:57:25 +0000 (16:57 +0100)]
Bug 28729: Make Koha::Email->send_or_die handle returnpath
Koha used to rely on Mail::Sendmail for sending emails. As an SMTP
client, the library would extract the from address from the Sender
header to pass along in the MAIL FROM: field of the SMTP protocol [1].
This was overlooked when we moved to Email::Stuffer/Email::Simple and
there's a different behavior as it expects the envelope to be passed and
falls back to extracting the 'From' header when said envelope is not
found [2].
This patchset re-introduces the behavior from Mail::Sendmail by
overriding the send_or_die method locally (in Koha::Email) and doing the
right thing.
Unless an explicit {from} parameter is passed, it extracts the MAIL FROM
envelope from the Sender header, as Mail::Sendmail did, and calls
$self->SUPER::send_or_die with the right parameters.
To test:
1. Apply the unit tests
2. Run:
$ kshell
k$ prove t/Koha/Email.t
=> FAIL: Sender is not handled correctly!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
The from parameter is correct!
No Sender header sent!
5. Sign off :-D
Martin Renvoize [Wed, 27 Oct 2021 14:37:07 +0000 (15:37 +0100)]
Bug 28904: Update team list to include newsletter editors
It seems we stopped recording the newsletter editor as part of the team
for a while :(.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 27 Oct 2021 14:27:45 +0000 (15:27 +0100)]
Bug 28904: Add newsletter editor to about page display
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lucas Gass [Tue, 26 Oct 2021 19:52:24 +0000 (19:52 +0000)]
Bug 29329: Remove stray character in opac-detail.tt
1. Have OpacBrowseResults on.
2. Make search with many results.
3. Go to the record detail page
4. Click 'Browse results'
5. At the bottom of the container notice the stray "s".
6. apply patch
7. Try again, the "s" is gone!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
David Gustafsson [Wed, 15 Sep 2021 13:32:35 +0000 (15:32 +0200)]
Bug 27884: Add tests
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test:
1) Create a new notice, for example with Koha module "Patrons",
name/code TEST and message body "<strong>testing<strong>".
2) Create a new sql report, the query could be someting like:
SELECT "<number>" as `borrowernumber`, "to@example.com", as `email`, "from@example.com" as `from`;
where "<number>" is a valid borrowernumber.
3) Run patron_emailer.pl --report=<id> --notice=TEST --module=members -commit
where <id> is the report id.
4) Check the message_queue table that the content_type column has been
set to text/html; charset="UTF-8".
5) Ideally process the message queue and veriy that the sent email is displayed
as rendered html.
6) Run tests in t/db_dependent/Reports/Guided.t
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Maryse Simard [Mon, 11 May 2020 18:20:42 +0000 (14:20 -0400)]
Bug 25459: Makes barcode position respect units in patron cards layout
When using any unit besides postscript points, barcode positionning
doesn't work correctly. There is an error in the calculation: the unit
factor must be applied to the individual card part only and not to the
full page position.
This patch moves the unit part of the calculation to the right place.
To test :
1. Create a working patron card setup, using postscript points:
card template, layout and card batch. Use barcode and at least
one other element (text or images) in the layout.
=> Some tips for testing:
- activate guides for the layout
- use a template and a batch containing more than one card; the
displacement will be different for each card and depend on the
barcode position relative to the bottom left of the entire page.
2. Change units from postscript points to any other unit.
=> At least for the layout, but changing it in the template will
scale the page as well.
4. Export the card batch.
3. Note the guides are scaled to fit the new unit and the lower left
corner of text and images are still correctly placed relative to the
guides, but the barcode is not.
=> In some cases, the barcode even seem to not print at all since
it's new coordinates are out of screen.
4. Apply patch.
5. Generate the batch again.
6. Note the barcode now appears exactly where it should.
Signed-off-by: George Veranis <gveranis@dataly.gr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lucas Gass [Thu, 29 Apr 2021 14:36:03 +0000 (14:36 +0000)]
Bug 28263: Fix too_many auto renewal message
To test:
1. Make an item eligible for auto_renewal.
2. Set circ rule so only 1 auto_renewal is allowd.
3. Run auto_renew once, get a successful message.
4. Run it again and get the too_many error "You have reached the maximum number of checkouts possible."
5. This has nothing to do with the number of checkouts
6. Apply patch and updatedatabase.
7. Do 1-4 again.
8. Message is now "You have reached the maximum number of renewals possible."
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29356: Pickup location dropdowns should perform 'contains' searches
When placing a hold, the dropdowns for selecting a pickup library automatically right-truncate, so one can type "cen" and find Centerville.
On the Libraries page in Admin, however, the search box both left- and
right-truncates, so one can type "en" and find Centerville.
This patch makes the search perform 'contains' searches.
To test:
1. Try placing a hold. Make sure your rules allow Centerville to be a
valid pickup location.
2. Search 'cen'
=> SUCCESS: Centerville shows
3. Search 'en
=> FAIL: Centerville doesn't show
4. Apply this patch and reload
5. Repeat 2
=> SUCCESS: Works!
6. Repeat 3
=> SUCCSS: Centerville shows!
7. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29355: Make pickup location dropdowns RESTdefaultPageSize agnostic
This patch makes the select2 dropdowns for pickup locations not be
limited to the RESTdefaultPageSize syspref limit.
To test:
1. Have less than 20 libraries in your system as valid pickup locations
2. Place a hold via the staff client
=> SUCCESS: See that all your libraries appear in the pickup location dropdowns at the bib and item level
3. Update RESTdefaultPageSize, set the value to something lower than your count of pickup libraries
4. place another hold
=> FAIL: Your pickup location list gets cut off and only shows as many locations as RESTdefaultPageSize allows
5. Apply this patch
6. Repeat 4
=> SUCCESS: All your pickup locations show
7. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen [Thu, 28 Oct 2021 14:15:12 +0000 (14:15 +0000)]
Bug 29351: Add missing cn_source parameter to reports parameter menu
This patch adds an option to insert "Source of classification or
shelving scheme" as a runtime parameter in SQL reports. The ability to
use cn_source as a parameter seems to have always been part of this
feature but wasn't documented.
To test, apply the patch and go to Reports -> Create from SQL.
- Click the "Insert runtime parameter" button and select
"Classification source."
- Customize the parameter label if you wish and click "Insert
parameter."
- The parameter should be inserted like this:
<<Source of classification or shelving scheme|cn_source>>
- Use it to create a valid SQL report, for example:
SELECT * FROM items WHERE cn_source = <<Source of classification or
shelving scheme|cn_source>> LIMIT 10
- Confirm that upon running the report you are prompted to select a
classification source.
- Confirm that the report runs correctly.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen [Thu, 28 Oct 2021 14:46:00 +0000 (14:46 +0000)]
Bug 29352: Runtime parameter labels should not be said to be optional
This patch alters the form shown when using the "Insert runtime
parameter" button in SQL reports. It makes the label field required and
removes "optional" from the field hint.
To test, apply the patch and go to Reports -> Create from SQL.
- Click the "Insert runtime parameter" button and select "Authorized
value."
- Clear the "parameter label" field and click "Insert parameter."
- The form should display an error asking you to fill in the label
field.
- Test that the category field is also required.
- Close the modal and select a different runtime parameter.
- Test again that the label field is required.
- Test that the form submits correctly when the label field is
populated.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen [Thu, 28 Oct 2021 15:45:21 +0000 (15:45 +0000)]
Bug 29328: Add missing list parameter to reports parameter menu
This patch adds an option to insert "list" as a runtime parameter in SQL
reports (As added by Bug 27380).
To test, apply the patch and go to Reports -> Create from SQL.
- Click the "Insert runtime parameter" button and select
"List."
- Customize the parameter label if you wish and click "Insert
parameter."
- The parameter should be inserted like this:
<<List of values|list>>
- Use it to create a valid SQL report, for example:
SELECT * FROM borrowers WHERE categorycode IN <<List of values|list>>
LIMIT 10
- Confirm that upon running the report you are shown a textarea. Enter
two or more values in the textarea, each on a separate line.
- Confirm that the report runs correctly. The SQL above would show you
this when you click "Show SQL code":
SELECT * FROM borrowers WHERE categorycode IN ('A','S') LIMIT 10
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 14 Oct 2021 17:56:23 +0000 (17:56 +0000)]
Bug 29242: Flatpickr - Should autocomplete be turned off?
This patch adds a step to Flatpickr initialization to add an
autocomplete attribute set to "off" so that browsers' built-in
autocomplete menus do not obscure the calendar.
To test you must be using a browser which has form history enabled.
Locate a form that includes a Flatpickr input field, e.g. Reports
-> Catalog statistics.
Fill the date fields and submit the form. Go back to the form and click
one of the form fields you previously filled out (once in Chrome, twice
in Firefox). The browser should not show its native form history
dropdown.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Mon, 20 Sep 2021 14:57:23 +0000 (14:57 +0000)]
Bug 28901: showCart incorrectly calculates position if content above navbar
This patch makes changes to the OPAC Cart's CSS and JS so that the cart
pop-up message display more consistently. The CSS is changed to use
position "fixed" instead of "absolute." This allows the message to
display without recalculating the position every time, and keeps the
appearance we expect.
The z-index of the message is also increase to prevent it from being
hidden behind a floating toolbar.
To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Perform a catalog search in the OPAC which will return multiple
results.
- In the list of search results, click the "Add to cart" link next to
several search results. Each time you should see a message appear in
the upper left corner of the screen, "The item has been added to the
cart."
- The position of the messages should be consistent no matter how far
down the page you scroll.
- Test again after adding content to the OpacHeader region. One way to
do this is to add the following to the OpacUserJS preference:
- Test at various browser widths, from a phone-sized screen width up to
wide desktop-sized.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Fri, 17 Sep 2021 13:25:10 +0000 (13:25 +0000)]
Bug 28910: Correct eslint errors in OPAC basket.js
This patch corrects eslint errors in the OPAC copy of basket.js:
Indentation inconsistencies, undeclared variables, unused functions,
etc.
To test, apply the patch and test the "Cart" functionality in the
OPAC:
- In the OPAC, add an item to the cart.
- A popup message should appear telling you the item has been added.
- The "Add to cart" link should update to read "In your cart."
- The count if cart items in the header should be updated.
- The "In your cart (remove)" link should work correctly.
- Test this process from both the search results and
detail pages.
- Open the cart.
- The cart should open correctly.
- In the cart, test all the controls:
- More details
- Send
- Download
- Empty and close
- Hide window
- Print
- Select all / clear all
- With checked items:
- Remove
- Add to list
- Place hold
- Tag
The following unused functions were removed: readCookieValue,
AllAreChecked, SelectAll, and quit. A search of the Koha codebase should
return no results from the opac-tmpl directory.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Lucas Gass [Mon, 25 Oct 2021 22:52:22 +0000 (22:52 +0000)]
Bug 29319: Use Business::ISBN to check ISBNs on addbooks.pl/cataloging search
To test:
1. Go to cataloging search and enter something like "7th Heaven".
2. Get an error when searching, Koha thinks you entered an ISBN
3. Apply patch
4. Try the same search, it should be a proper title search now
5. Find some stuff in the catalog with ISBN numbers in them.
6. The search should properly return ISBN13/ISBN10 searches, without with out the '-'.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
In Administration › Libraries, we see content of OPAC info as escaped HTML.
This content may be long and seeing HTML tags is strange.
We should not show it in this table.
Or maybe create a modal preview of it (not escaped HTML).
To test :
1) Home > Administration > Libraries
2) In 'Address' column notice the 'OPAC info' field (if this one is
filled) with visible HTML tags
3) Apply patch
4) Repeat 1) and 'OPAC info' field should be gone
Signed-off-by: Owen <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28913: Note cronjob on automatic return settings in itemtypes
To test:
1 - go to itemtype config in Admin
2 - confirm it doesn't mention the automatic_return cron
3 - apply patch and restart
4 - confirm note now says "This feature requires the misc/cronjobs/automatic_checkin.pl cronjob. Ask your system administrator to schedule it."
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 13 Oct 2021 15:20:05 +0000 (15:20 +0000)]
Bug 29223: Use patron's branchcode for digest if not sending digest per branch
To test:
1 - Set system preference AutoRenewalNotices to 'according to patron messaging preferences'
2 - Set circ rule for auto renewal - 100 renewals allowed - no renewal before 100
This shoud make a checkout eligible for many auto renewals for testing
3 - Checkout an item to a patron, ensure item is from a different branch than patron
4 - Ensure the patron has an email, and set an email for patron's branch and items branch
5 - Set the patron messaging preferences for auto-renewal to 'email' and 'wants digest'
6 - perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm
7 - Job dies:
Can't call method "from_email_address" on an undefined value at /usr/share/koha/bin/cronjobs/automatic_renewals.pl line 286.
8 - Apply patch
9 - Repeat
10 - NO errors
11 - Check patron notices tab, should be a notice enqueued, check DB to see from address is patron's branch
12 - perl misc/cronjobs/automatic_renewals.pl --send-notices --confirm --digest-per-branch
13 - No errors
14 - Check patron notices tab, should be a notice enqueued, check DB to see from address is item's branch
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 27 Jan 2021 09:18:45 +0000 (09:18 +0000)]
Bug 24850: (QA follow-up) Add more comments
To try and clarify the logic here I've added an addition comment to the
code.
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Thu, 26 Mar 2020 11:12:26 +0000 (11:12 +0000)]
Bug 24850: Continue to handle default time and daylight saving
This patch prevents the call to set_time_zone if we are handling a
dateonly datetime string or a DST time
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Tue, 17 Mar 2020 10:22:16 +0000 (10:22 +0000)]
Bug 24850: Always return 'instance' local time
This patch adds handling to ensure we always convert a passed in time to
the instance configured timezone..
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 11 Mar 2020 17:55:34 +0000 (17:55 +0000)]
Bug 24850: Don't fallback when date_format is passed
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 11 Mar 2020 16:20:36 +0000 (16:20 +0000)]
Bug 24850: Add tests for invalid RFC3339 dates
We should die on invalidly formatted dates being passed. This patch
adds such a test case.
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 11 Mar 2020 15:59:19 +0000 (15:59 +0000)]
Bug 24850: Correct offset handling in dt_from_string
This patch adds correct handling for when an offset is passed within an
RFC3339 formatted datetime.
Test plan
1/ Run the DateUtils test and varify it now passes.
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 11 Mar 2020 15:57:07 +0000 (15:57 +0000)]
Bug 24850: Correct tests for offset handling in RFC3339 dates
The tests were incorrectly passing for RFC3339 dates passed with an
offset. This patch corrects the test.
Test plan:
1/ Read the change
2/ Agree the change adheres to the RFC
3/ Run the test and varify it now fails
3/ Signoff
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 20 Oct 2021 13:06:06 +0000 (13:06 +0000)]
Bug 29283: Don't attempt to cancel cancelled orders
When deleting a basket we cancel all the contained orders - when a
basket contains an order that was previously cancelled this can cause
an error if the biblio was deleted
When picking the orders to cancel, we should limit our search
to those not already cancelled.
To test:
- have a basket with at least one order
- click "Cancel order and delete catalog record", confirm cancellation of order and deletion of bib
- click "Delete basket", confirm deletion
- get error "Cannot insert order: Mandatory parameter biblionumber is missing at /kohadevbox/koha/acqui/basket.pl line 136.
at /usr/share/perl/5.28/Carp.pm line 289"
- apply patch
- restart
- delete the basket
- success!
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Joonas Kylmälä [Sun, 10 Oct 2021 11:01:29 +0000 (11:01 +0000)]
Bug 26871: Flush SIP2 cache on every SIP request
SIP connections tend to be long lived, weeks if not months, in the
libraries I see. Basically the connection per SIP machine is initiated
once when the SIP machine boots and then never closed until
maintanance needs to be done. Therefore we need to reset the Koha's L1
caches on every SIP request to get the latest sysprefs and configs
from the memcached cache that is shared between all the Koha
programs (intranet, opac, sip, cronjobs) and is guaranteed to be up to
date.
To test:
0. Have kohadevbox
1. Enable IssueLog
2. In one terminal run the command "perl C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml"
3. Checkin and return a book using telnet:
4. Keep the telnet connection open and go to
http://localhost:8081/cgi-bin/koha/tools/viewlog.pl and check that
the *checkout* entry is in the circulation rules 5.
6. Disable IssueLog
7. Move back to the telnet prompt and check out and return a book again
8. Go check out the circulation logs and notice a new entry was added
when it shouldn't have according to the IssueLog syspref!
9. Apply patch and repeat steps to notice that the syspref is now
followed correctly.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Joonas Kylmälä [Sat, 2 Oct 2021 12:28:52 +0000 (12:28 +0000)]
Bug 14999: Make sure order prices are not mixed-up
We were shifting the price and replacement price for imported orders
only after the line:
> $duplinbatch = $import_batch_id and next if $duplifound;
This lead to the "replacementprice" and "price" query parameters not
being shifted/removed from the list if a duplicate record came across
and caused the prices be applied to the next record being imported.
To reproduce:
1) Download two records from koha to marcxml file, then cat those:
cat bib1.marcxml bib2.marcxml > bibs.marcxml
2) Delete bib2 from koha
3) Stage bibs.marcxml for import
4) Create a new order basket, then "Add to basket" using "From a
staged file" option
5) Select both bib1 and bib2 and set price & replacement price for
bib1 to be 99.00 and for bib2 to be 88.00
6) Click save and notice bib2 was imported with the wrong prices, 99.00!
7) Apply patch and notice the prices are now correctly set to 88.00.
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Tue, 20 Oct 2020 18:19:46 +0000 (18:19 +0000)]
Bug 24370: (QA follow-up) Make new suggestions default to the library you re viewing
It looks like this problem was caused by code from bug 25033, we were attempting to have the
dropdown either be the current branch filter, or the suggestion's branch code, but the variables here are confusing and it didn't work
This explicitly sets the branchcode when creating a new suggestion to allow fixing current behaviour and
show the correct value when creating new
To test:
1 - Be signed in as branch A
2 - Browse to suggestions and limit to branch "Any"
3 - Click 'New suggestion"
4 - Defaults to Any
5 - Cancel and limit to branch B
6 - New suggestion defaults to branch B
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Mon, 5 Oct 2020 17:23:31 +0000 (17:23 +0000)]
Bug 24370: Don't reset library when editing a suggestion
When editing a suggestion, the library will be reset to the currently
logged in librarian's homebranch, no matter what the libray was before.
This fixes this, the library selection will remain at the db value when
edited.
To test:
- Create a suggestion with Any library.
- Edit the suggestion - it will show your homebranch as library
- Change to any library but your homebranch
- The summary should show the correct value after saving
- Edit the suggestoin again - it's set back to your homebranch again
- Apply patch
- Repeat the steps, the pull down should now show the correct library
at all times.
Caveat: I think there is a somewhat separate issue/bug in that once a library
was saved, you cannot switch back to "Any". I haven't been able to fix this and
suggest to maybe file a separate bug.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
George Veranis [Tue, 12 Oct 2021 21:01:57 +0000 (23:01 +0200)]
Bug 28573: Replace authority record with Z39.50/SRU creates new authority record
When trying to replace an authority record with Z39.50/SRU then a new authority
record is created without deleting the old one and not link the new one with
any record.
This patch fixes that.
Test plan:
1) Try to catalogue a new authority record from cataloguing form.
2) Try to replace that authority record with Z39.50/SRU, then a new authority
record is created and also you have that one that you tried to replace.
3) Apply the patch.
4) Try to replace the authority from step1 with Z39.50/SRU, then is working as
expected.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Eric Phetteplace <phette23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 2 Nov 2021 10:39:30 +0000 (11:39 +0100)]
Bug 28959: Fix occurrence in tools/batch_record_modification.pl
No method count found for Koha::Virtualshelves DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'category' in 'where clause' at /kohadevbox/koha/Koha/Objects.pm line 601 at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt line 80.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 29 Oct 2021 09:15:48 +0000 (11:15 +0200)]
Bug 29368: Correctly mock Zebra index from tests
This is just reusing what is done in Search.t (and that is correct).
But search_utf8.t and remove_from_cart.t are wrong as we want to use the
UI (and we cannot mock the zebra index, ie. koha-conf, from tests for
plack).
This still needs some work but improve a bit the existing code and make
tests pass (hopefully!)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 29 Oct 2021 08:33:57 +0000 (10:33 +0200)]
Bug 29364: Revert changes to framework visibility made by Search.t
To recreate run:
drop database koha_kohadev;
create database koha_kohadev;
restart_all
KOHA_TESTING=1 prove t/db_dependent/selenium/01-installation.t t/db_dependent/Search.t t/db_dependent/Koha/UI/Form/Builder/Item.t
# Failed test 'Item types should be sorted by description and an empty entries should be shown'
# at t/db_dependent/Koha/UI/Form/Builder/Item.t line 127.
# Structures begin differing at:
# $got = undef
# $expected = ARRAY(0x557716b68e98)
# Itemtypes details: $VAR1 = undef;
# $VAR2 = [
# 'BK',
# 'CF',
# 'CR',
# 'ihxGmo7',
# 'MP',
# 'MU',
# 'MX',
# 'REF',
# 'VM'
# ];
# Failed test 'Labels should be correctly displayed'
# at t/db_dependent/Koha/UI/Form/Builder/Item.t line 130.
# Structures begin differing at:
# $got = undef
# $expected = HASH(0x557716e2e150)
# Looks like you failed 2 tests of 2.
# Failed test 'itemtypes'
# at t/db_dependent/Koha/UI/Form/Builder/Item.t line 133.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28959: (follow-up) Adjust more places in which 'category' was used
Some links still had category.
I propose we use explicit public=1 and public=0 when links to public/private are side by side.
Otherwise whe just use /cgi-bin/koha/opac-shelves.pl?op=list using default value 0.
Signed-off-by: David Nind <david@davidnind.com>
JK: Adjust commit title Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28959: (follow-up) Adjust all places in which 'category' was used
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patchset moves the 'category' attribute for virtual shelves, that
takes values of 1 and 2 (private and public respectively) into a boolean
for public.
The DBRev is trivial, and the changes to the code are as well.
To test:
1. have some known public and private lists
2. Apply this patches
3. Run:
$ updatedatabase
=> SUCCESS: Public lists have public=1, private have public=0
4. Run:
$ kshell
k$ prove t/db_dependent/Utils/Datatables_Virtualshelves.t \
t/db_dependent/Virtualshelves.t
=> SUCCESS: Tests pass!
5. Try the feature in staff and OPAC
=> SUCCESS: All good
6. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds unit tests for the new route. All behaviors are tested:
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass!
3. Sign 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: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This is a trivial change that is required to be able to embed patron
objects in the (old) checkout object.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the new route. It also tweaks the checkout object
definition to allow embedding the required related objects (for bug 29275).
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 29288: Add current_checkouts and old_checkouts methods to Koha::Biblio
This patch adds helper methods for accessing current and past checkouts
for a given Koha::Biblio object.
To test:
1. Apply the unit tests
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Biblio.t
=> FAIL: Methods are not implemented
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
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>
This simple change renames the attribute in the item object API
representation.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/api/v1/items.t
=> SUCCESS: Tests pass
2. Run:
$ git grep 'api/v1/items'
=> SUCCESS: The items routes are not (yet) used in Koha
3. Run:
$ cd koha-tmpl
$ git grep --name-only '"embed"'
=> SUCCESS: Only two templates are using embed.
4. Check:
- register.tt uses it to embed the manager, good
- parcel.tt uses it to embed items. Alert.
=> SUCCESS: parcel.tt only uses a count on items. No item_type involved.
5. Sign off
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 27358: Add GET /public/biblios/:biblio_id/items
This patch introduces a route to fetch items belonging to a biblio. It
is expected to return the 'public' representation of the Koha::Item
objects.
It is also enforcing the visibility rules, by using
Koha::Items->filter_by_visible_in_opac.
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Test pass and they cover all the cases!
3. Try your favourite REST tool against the new route.
4. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Thu, 7 Oct 2021 18:46:53 +0000 (18:46 +0000)]
Bug 28948: Don't require catalogue permission for public route, don't allow smtp server embed
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch reproduces what we did for `to_api_mapping`: make it always
present on Koha::Object classes. This has the side-effect of... making
things more secure!
Before this patch, if undefined, all attributes were returned.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Fri, 3 Sep 2021 11:18:03 +0000 (12:18 +0100)]
Bug 28948: (QA follow-up) Convert to allow-list
This patch converts the code to use an allow-list as aposed to a
deny-list. This is more 'fail safe' than requireing maintanence of a
deny-list.
We also switch to using db fields names for the list as aposed to api
mapped names. This way, the list can be re-used for non-api related
sanitising if required.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch introduces a route to fetch a list of libraries or a single
library as expected on the /public namespace. It is expected to return
the 'public' representation of the Koha::Library objects.
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/libraries.t
=> SUCCESS: Test pass and they cover all the cases!
3. Try your favourite REST tool against the new route.
4. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28948: Teach objects.search about public requests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28948: Make is_public stashed on public routes
This patch makes the API authentication code stash the 'is_public' value
when public routes are hit.
This will be particularly useful to have $c->objects->search generically
pass this info down to the ->to_api method.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> SUCCESS: Tests pass! When a public route is reached, the controller
has the 'is_public' value stashed
3. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 28948: Add a generic way to handle API privileged access attributes deny-list
This patch introduces a way for Koha::Object(s)->to_api to filter out
attributes that require privileged access. It is done in a way that the
'public' parameter is recursively passed to nested objects in recursive
to_api() calls.
This way, Koha::Object-based classes can determine how they will render
depending on this parameter. For example, for implementing a
route for fetching an library looks like:
GET /libraries
The controller will look like:
my $library = Koha::Libraries->find( $c->validation->param('library_id') );
return $c->render(
status => 200,
openapi => $library->to_api
);
Implementing an unprivileged (public) route would look like:
GET /public/libraries/:library_id
The controller will look like:
my $library = Koha::Libraries->find( $c->validation->param('library_id') );
return $c->render(
status => 200,
openapi => $library->to_api({ public => 1 })
);
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Object*.t
=> SUCCESS: Tests pass (i.e. current behaviour is kept, new behaviour
passes the tests)
3. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch introduces routes to handle purchase suggestions, from the
staff POV.
Tests are added as well.
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/suggestions.t
=> SUCCESS: Tests pass! And they are meaningful!
3. Play with your favourite REST tool (Postman?)
4. Sign off :-D
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 17314: Make TestBuilder set good defaults for Suggestions
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>
Jonathan Druart [Wed, 13 Oct 2021 08:25:37 +0000 (10:25 +0200)]
Bug 28859: Correctly handle 'Checked out by' visibility
We must have the column in the table and let DT deal with the
visibility.
This patch hides the "Checked out by" column by default if
RecordStaffUserOnCheckout is off, but the DT column settings is aware of
its existence and the end user can still display the column.
IMO that's the most optimal situation considering both maintenance and ergonomic.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Andrew Isherwood [Fri, 17 Sep 2021 13:14:36 +0000 (14:14 +0100)]
Bug 28859: Fix missing column setting
This commit adds the missing checked_out_by column to
columns_settings.yaml
Test plan:
- Follow the test plans in the bug description and note that the
symptoms are no longer seen
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>