Eden Bacani [Tue, 19 Jan 2021 20:14:32 +0000 (20:14 +0000)]
Bug 22152: Hide tools navigation when printing reports
1. Go to reports and print any report
2. Check that navigation does not show up when report is printed.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Catherine Ma [Thu, 21 Jan 2021 02:23:22 +0000 (02:23 +0000)]
Bug 27022: Publisher number 028 does not display according to framework settings
Test plan:
1. search the catalogue for an item
2. check if you can see the publisher number below the item title (you shouldn't)
3. click on the item and check if you can see the publisher number on
this page (you shouldn't)
4. in a new browser, repeat steps 1-3 on the OPAC
5. apply patch
6. repeat steps 1-4, however this time the publisher number SHOULD
display under the item titles
Sponsored by Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amy King [Wed, 20 Jan 2021 23:06:41 +0000 (23:06 +0000)]
Bug 27479: Improve link text to be more helpful (opac-password-recovery.tt)
Test plan:
1. Follow the steps above to reproduce, and notice how the link says
"Click here to login"
2. Apply patch
3. Follow the steps above to reproduce again, but now notice how the
link says "Log in to your account"
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amy King [Wed, 20 Jan 2021 03:00:11 +0000 (03:00 +0000)]
Bug 27477: Improve link text to be more helpful (opac-detail.tt)
Test plan:
1. Follow the above steps to reproduce, take note of the link saying
"click here"
2. Apply patch
3. Repeat step 1, but now notice how the link says :View all the
physical items"
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amy King [Wed, 20 Jan 2021 22:21:21 +0000 (22:21 +0000)]
Bug 27474: Improve link text when no avaliable printer profiles
Test plan:
1. Go to tools, click on label creator.
2. Make sure you have some(1-2) printer profiles free to attach to a
label template. You can do this by clicking on manage, printer profiles,
if there is a blank space under the "Template name" header, then it is
free to attach to a label template.
3. Click on add new label template.
4. Note how there is a drop down menu beside "Profile:", to select a
printer profile.
5. Assign all of the avaliable printer profiles by making new label templates.
6. Now woth no avaliable printer profiles, click on add a new label
template.
7. Note how there is a drop down menu beside "Profile:" only "No
Profile/Na" is avaliable to select.
8. Apply patch.
9. Repeat steps 2-6.
10. Now note how there is a link to make a new printer profile, under
the drop down menu next to "Profile:"
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amy King [Wed, 20 Jan 2021 20:12:44 +0000 (20:12 +0000)]
Bug 27472: Improve link text (merge.tt)
Test plan:
1. Complete the steps above to reproduce, specially noting the last
step.
2. Apply patch
3. Complete step 1 again, but now notice how the link says "View the
merged record"
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amy King [Thu, 21 Jan 2021 01:51:24 +0000 (01:51 +0000)]
Bug 22150: ensuring superlibrarian flag not checked when select all
Test plan:
1. Go to a patron account page
2. Click more, set permissions
3. If you select Superlibrarian, you can't unselect on box.
4. Apply first patch by Jasmine Amohia
5. Follow steps for that patch
6. Apply patch
7. Go through steps 1-4 from Jasmine Amohia, but now notice how when you
click "Select all" the Superlibrarian checkbox is not checked
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jasmine Amohia [Thu, 21 Jan 2021 12:00:38 +0000 (12:00 +0000)]
Bug 22150: Ability to select or unselect all member flags
To test:
1) Find a patron
2) Click More -> Set permissions
3) Click 'Clear all', confirm all checkboxes get cleared and disabled
4) Click 'Select all', confirm all checkboxes get selected
5) Unselect one checkbox (not superlibrarian), and confirm that the
superlibrarian checkbox also gets unselected
6) Confirm that saving still works as expected
Edit: Rebased by Owen Leonard
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Mazen Khallaf [Tue, 19 Jan 2021 02:01:43 +0000 (02:01 +0000)]
Bug 27179: Misspelling of Method in REST API files
Test Plan:
1. Run "git grep -i mehtod" (which should return 2 files)
2. Apply patch
3. Rerun grep command (should return no files)
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Mazen Khallaf [Tue, 19 Jan 2021 09:50:09 +0000 (09:50 +0000)]
Bug 27407: Update reserve/request.tt for ACC2
Test Plan:
1. Open intranet-tmpl/prog/en/modules/reserve/request.tt for ACC2
2. Check for instances of 'input type="number"'
3. If none are found then patch was successful
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Mazen Khallaf [Tue, 19 Jan 2021 01:49:43 +0000 (01:49 +0000)]
Bug 27210: Typo in patron-attr-types.tt
Test Plan:
1. Make sure the ExtendedPatronAttributes syspref is active
2. Go to Administration > Patron attribute types
3. Click New patron attribute type
4. Check the sentence next to the Editable in OPAC checkbox (Should say
"Requires above, does not work during self-registration if
PatronSelfRegistrationVerifyByEmail if set." - Notice the use of
'if set')
5. Apply Patch
6. Repeat steps 2-4 (Should now say "Requires above, does not work
during self-registration if PatronSelfRegistrationVerifyByEmail
is set." - Notice the use of 'is set')
7. If it says 'is set', the patch works as expected.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Mazen Khallaf [Thu, 21 Jan 2021 06:26:54 +0000 (06:26 +0000)]
Bug 27491: Rename system preference opaclanguages to OPACLanguages
Test Plan:
1. Go to Administration
2. Go to System Preferences
3. Find 'opaclanguages' (note the lack of capitalisation)
4. Apply patch
5. Repeat step 1 and 2
6. Find 'OPACLanguages' (note the use of capitalisation)
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>
Mazen Khallaf [Wed, 20 Jan 2021 21:23:28 +0000 (21:23 +0000)]
Bug 27485: Rename system preference gist to TaxRates
Test Plan:
1. Create a vendor
2. Create a basket
3. Add an order to the basket (note the existence of the option 'gist'
4 Apply patch
5. Create another order (note the existence of the option 'TaxRates'
instead)
6. Run 'prove t/Prices.t' to confirm the tests were successful
7. If everything above is correct then patch was successful
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
ava li [Tue, 19 Jan 2021 21:01:15 +0000 (21:01 +0000)]
Bug 24811: French SQL files "news" link fixed
This fixes a broken link in the sample news items for fr-FR and fr-CA.
Test plan:
1) Apply the patch.
2) Install the French language files - see
https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client
3) When Koha is in French, from the home page of the staff interface go to Tools/Outils > News/Annonces, and make sure the two news items are there.
-If not, try importing the two files into your database or reset and install Koha in French (fr-FR or fr-CA).
4) There should be a news item with the heading Et maintenant ?, click the 5th link "proposez des correctifs et des améliorations".
5) If should take you to
https://wiki.koha-community.org/wiki/Version_Control_Using_Git
and there is no 404 error, the patch has worked!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
ava li [Tue, 19 Jan 2021 03:44:44 +0000 (03:44 +0000)]
Bug 24810: French SQL files for "news" removed "3"
TEST PLAN
Follow https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client in order to install french.
When koha is in french, from home go to tools/outils, then
news/Annonces, make sure the two files are there.
Preview them there or view them from the homepage and check that the 3
is gone.
If the files are not there, try importing the two files into your
database.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Ella Wipatene [Thu, 21 Jan 2021 02:45:07 +0000 (02:45 +0000)]
Bug 24055: (follow-up) Description of PayPalReturnURL system preference
Have rephrased it as 'configured return URL' as this is what they call
it on the PayPal website.
To test:
- Go to Administration/ System preferences
- Search for PayPalReturnURL
- Verify description has changed to 'configured return URL' as one of
the options.
Sponsored.by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sat, 11 Apr 2020 20:05:14 +0000 (20:05 +0000)]
Bug 24055: Rephrase description of PayPalReturnURL slightly
changes 'OPAC's alias' to 'specified URL' as suggested by
Tomas on comment#2.
To test:
- Go to Administration / System preferences
- Search for PayPalReturnURL
- Verify description has changed to "specified URL" as
one of the options
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Eden Bacani [Thu, 21 Jan 2021 02:54:30 +0000 (02:54 +0000)]
Bug 20527: Corrected paid to amountwrittenoff
Test Plan
1. Go to My account and go into accounting
2.Create manual invoice (If you already have invoices skip this step)
3.On the Make a payment tab click on Write off under actions of an
invoice
4. Click on Writeoff amount label and make sure that the amount written
is highlighted in green.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amy King [Tue, 19 Jan 2021 01:55:00 +0000 (01:55 +0000)]
Bug 27027: Fixed typo - extra dot removed
Test Plan
Before applying patch
1. Open koha-tmpl/intranet-tmpl/prog/en/modules/admin/background_jobs.tt
2. Note how in line 125 "has successfully been modified.." has two full
stops
3. Apply patch
4. Repeat step 1
5. Note how there is only now one full stop in line 125 "has been
successfully ben modified."
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Ella Wipatene [Thu, 21 Jan 2021 01:46:21 +0000 (01:46 +0000)]
Bug 11996: (follow-up) Updating the uk-UA currency
I have changed GRN to UAH in both
installer/data/mysql/ru-RU/optional/sample_currency.sql and in
installer/data/mysql/uk-UA/optional/sample_currency.sql
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Ethan Amohia [Thu, 17 Jan 2019 02:42:32 +0000 (02:42 +0000)]
Bug 11996: Made RUB default currency for ru-RU
Didn't know how to change the uk-UA default currency.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Eden Bacani [Thu, 21 Jan 2021 01:20:49 +0000 (01:20 +0000)]
Bug 24447: Changing 'DUE' to example in database that exists.
Test Plan:
1.Using perldoc C4/Members/Messaging.pm check that message_name
attribute name example is Item_Due and not DUE.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 23290 explicitly disabled entity expansion during XML parsing for security reasons.
However, many XSLTs define the following entity:
<!ENTITY nbsp " " >
They don't use the entity  , but its presence could lead to confusion.
Signed-off-by: Eden Bacani <eden.bacani@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 21 Jan 2021 16:21:15 +0000 (17:21 +0100)]
Bug 27509: Prevent cn_sort value to be lost when editing items
This is a bit dirty, cn_sort is not passed from the UI but built in
Koha::Item->store depending on the values of itemcallnumber and
cn_source.
It must be updated only if one of those 2 attributes are modified.
The problem is that, as it's not passed, $item->{cn_sort} does not exist,
and set_or_blank will set it to undef.
The trick here is to backup the value before set_or_blank and set it
back to the item object.
Another solution would be to force the processing of cn_sort each time
we call Koha::Item->store. I don't think that's a good idea.
Test plan:
- Create a new item with a cn_source value and an itemcallnumber value
- write a quick report to see the cn_sort value: SELECT cn_sort FROM items WHERE itemnumber=your itemnumber, see your item has a cn_sort value
- edit your item and save it without changing either the cn_source of the itemcallnumber
- run your report again, cn_sort is not modified
- edit your item, changing either the cn_source or itemcallnumber
- run report again, cn_sort is modified as expected
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 21 Jan 2021 15:12:26 +0000 (15:12 +0000)]
Bug 22752: (follow-up) Add style; Only show message about item-level holds
I think it's generally assumed that a hold has, by default, been made at
the bibliographic level. I think it's sufficent to add a note for only
item-level holds.
To test, apply the patch and log into the OPAC as a user who has
multiple holds, some at the bibliographic level and some at the item
level.
- Go to Your summary --> Holds
- Confirm that any item-level hold has a note under the title: "Item on
hold <barcode>".
- The note should be on a new line and styled differently than the other
text.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Victoria Faafia [Tue, 19 Jan 2021 03:45:28 +0000 (03:45 +0000)]
Bug 22752: Show if a placed hold is a record or item level in the patron account in the OPAC
Test Plan
1. Have a record with an item
2. You will need to set a hold through staff account (to import books
Cataloging>New from Z39.50/SRU>
3. Keyword(enter any keyword e.g pokemon)
4. tick library of congress
5. choose a title and click actions then import
6. 003 should be OSt
7. tab 9 koha item type can be books or whatever and press save
8. select the hold and place hold
9. on Koha OPAC click on your account and go to the holds and
underneath the title it should say Only item and the barcode
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>
Lucas Gass [Wed, 18 Nov 2020 23:44:43 +0000 (23:44 +0000)]
Bug 26630: Add OpacSuggestionInstructions options to News
Test plan:
1. Apply patch
2. Go to /cgi-bin/koha/tools/koha-news.pl and create 'New entry' with a dsiplay location of OpacSuggestionInstructions
3. Login to the OPAC and go to the purchase suggestion page (/cgi-bin/koha/opac-suggestions.pl)
4. Your new content should be there.
5. Delete the OpacSuggestionInstructions news entry.
6. Re-load the OPAC purchase suggestion page and the original text will be restored.
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Mazen Khallaf [Tue, 19 Jan 2021 01:33:19 +0000 (01:33 +0000)]
Bug 26982: Typo in system preference UsageStats: statisics
Test Plan:
1. Go to Administration
2. Go to System Preferences
3. Go to Administration (on the right)
4. At the bottom, under 'Share anonymous usage statistics', find
UsageStats
5. In the value box, the bottom line should say 'statisics' instead of
'statistics'
6. Apply the patch
7. Repeat steps 1-4
8. In the value box, the bottom line should now say 'statistics'
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
James O'Keeffe [Wed, 20 Jan 2021 02:12:08 +0000 (02:12 +0000)]
Bug 27475: Improve link text to define a patron card printer profile if none are defined
This patch changes the text on the text link for defining a printer
profile to make it more clear. It does this by removing the "Click
here".
Test plan:
1. Navigate from home -> tools -> patron card creator
2. Ensure you have no printer profiles
3. Select "new", and create a new card template
4. Note the text link "Click here to define a new printer profile"
5. Apply the patch, and repeat steps 1-3
6. Note that the "Click here" has been removed.
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>
James O'Keeffe [Wed, 20 Jan 2021 01:04:25 +0000 (01:04 +0000)]
Bug 27412: Update tools/overduerules.tt to adhere to ACC2
This patch changes the 1 occurance of an input of type="number" to input type="text" inputmode="numeric" pattern="[0-9]*"
The "min" attribute has also been removed (Thanks Owen)
Test plan:
Open the file and ensure that no other inputs of type="number
were missed.
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>
James O'Keeffe [Wed, 20 Jan 2021 01:26:54 +0000 (01:26 +0000)]
Bug 27411: Update tools/automatic_item_modification_by_age.tt to reflect ACC2
This patch changes instances of type="number" in inputs to adhere to
ACC2 guidelines
Test plan:
Open the file and ensure all instances of type="number" in inputs are
changed to 'type="text" inputmode="numeric" pattern="[0-9]*"'
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>
James O'Keeffe [Wed, 20 Jan 2021 01:52:03 +0000 (01:52 +0000)]
Bug 27409: Update members/boraccount.tt for ACC2
This patch changes all instances of type="number" in inputs to adhere
with the ACC2 guidelines
In addition, all "min" and "step" attributes have been removed from
these inputs (Thanks Owen).
Test plan:
Go through the boraccount.tt file and insure that no instances of
type="number" were missed.
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>
Catherine Ma [Wed, 20 Jan 2021 02:53:36 +0000 (02:53 +0000)]
Bug 27406: Update elasticsearch mapping to adhere to ACC2
This patch changes the 1 occurance of an input of type="number" to input
type="text" inputmode="numeric" pattern="[0-9]*"
Test plan:
open the file and ensure that no other inputs of type="number"
were missed
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>
Catherine Ma [Tue, 19 Jan 2021 01:08:28 +0000 (01:08 +0000)]
Bug 27457: Set focus for cursor to Debit type code field
Test Plan:
1.Click administration
2.Click debit types
3.Click new debit type
4.Check if the cursor is in the first form field (it shouldn't)
5.Add patch
6.Repeat steps 1-3
7.Check if the cursor is in the first form field (it should)
Sponsored by Catalyst IT Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amy King [Wed, 20 Jan 2021 00:57:35 +0000 (00:57 +0000)]
Bug 27458: Set focus for cursor to Credit type code field
Test Plan:
Before applying patch
1. Click on Administration
2. Scroll down to Accounting and click on Credit types
3. Click New credit type
4. Note how the cursor does not focus on Credit type code field
5. Apply patch
6. Repeat steps 1-3
7. Note how the cursor now focuses on Credity type code field
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD amended patch: Edit commit title
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
- <td>[% name %]</td>
+ <td>[% INCLUDE 'patron-title.inc' patron=patron %]</td>
We can simply remove the $name variable from the controller script.
Test Plan:
1. Check out a book
2. Check in a book
3. Note what happens
4. Apply patch
5. Repeat step 1-2
6. Note that it doesn't break and everything still works
JD Amended patch: fix commit message
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>
Kyle M Hall [Thu, 18 Jun 2020 17:23:04 +0000 (13:23 -0400)]
Bug 25808: Renewal via the SIP 'checkout' message gives incorrect message
If a renewal via SIP cannot be made because the patron has reached the maximum number of renewals,
the AF screen message should read "Item has reached maximum renewals!",
instead we get "Item checked out to another patron".
Test Plan:
1) Check out an item to a patron
2) Using the SIP CLI tool, run checkout messages until the checkout has
reached the maximum number of renewals
3) Note the incorrect message in the AF field
4) Apply this patch
5) Restart the SIP server
6) Run another SIP checkout message
7) Note the message is now correct!
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>
Andreas Roussos [Fri, 8 Jan 2021 14:45:32 +0000 (15:45 +0100)]
Bug 27192: Automatically set focus to the item type input box
When adding a new item type, you have to click inside the
"Ιtem type:" input box before you can start entering text.
This patch fixes that by adding the "focus" class to the relevant
<input> element so that cursor focus is set when the page loads.
Test plan:
1) Try to add a new item type: notice how you have to manually
click inside the "Item type:" input box before you start typing.
2) Apply this patch.
3) Repeat step 1) -- this time the "Item type:" input box should
gain focus automatically.
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 22 Apr 2020 11:10:56 +0000 (12:10 +0100)]
Bug 25245: Add plugins_nightly.pl to the default cron
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Mon, 27 Apr 2020 12:30:24 +0000 (13:30 +0100)]
Bug 25245: (follow-up) Use Koha::Logger
Update script to use Koha::Logger to capture method failures.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 22 Apr 2020 11:04:37 +0000 (12:04 +0100)]
Bug 25245: Add plugins_nightly.pl cronjob script
This script simply iterates through installed plugins that impliment a
cronjob_nightly method and runs said method.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 14 Jan 2021 17:53:49 +0000 (17:53 +0000)]
Bug 27439: Improve hint labels on patron attribute type entry form
This patch makes some minor changes to the patron attribute type
template in order make corrections and improve consistency:
- Change some generic <span>s to <div class="hint">
- Correct terminology: Branch -> Library
- Improve hint text:
Before: "Select All if this attribute type must to be displayed all
the time."
After: "Select "All libraries" if this attribute type should always
be displayed"
- Link reference to authorized values "PA_CLASS" directly to that page
for users with permission.
To test, apply the patch and go to Administration -> Patron attribute
types -> New patron attribute type.
- Confirm that the hints on these fields are properly styled:
Authorized value category, Library limitation, Category, and Class.
- Confirm that the text uses the term "library" instead of "branch."
- Confirm that the hint on the "Class" field links directly to
authorized values if you are logged in with a user with permission.
Signed-off-by: Victoria Faafia <vfaafia29@gmail.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 Jan 2021 16:56:00 +0000 (16:56 +0000)]
Bug 27437: Improve hint labels on library creation form
This patch makes a few minor template changes to the form for creating
and editing libraries:
- <br /><span class="hint"> changed to <div class="hint">
- References to system preferences are linked directly to that
preference if the user has permission.
- The MARC organization code label has been corrected so that it works
now.
To test, apply the patch and go to Administration -> Libraries -> New
library.
- Confirm that the hints for Ill staff email, Reply-to, Return-path, and
MARC organization code look correct, including aligning with the input
field above them.
- Confirm that clicking the "MARC organization code" label moves focus
to the correct field.
- View the page as a user who both does and does not have permission to
access system preferences, confirming that system preferences are
linked correctly if the user has the correct permission.
Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD Amended patch: Add missing space to correctly align input with label
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 13 Jan 2021 12:44:08 +0000 (12:44 +0000)]
Bug 26985: Remove code for "Upcoming events" from codebase as not implemented
This patch removes references to an unimplemented feature for "Upcoming
events" notices. As far as I can tell the templates are the only files
affected.
To test, apply the patch and verify that no instances of "Upcoming
events" or "Upcoming_events" are found in the codebase.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick [Thu, 19 Dec 2019 03:20:36 +0000 (03:20 +0000)]
Bug 24272: add check_sysprefs_cache.pl
This script ensure that no sysprefs have been changed directly in the database and/or
that the cache has not become corrupted. We have occasionally seen this happen on production sites
To test:
1 - In the staff interface go to Administration
2 - Search for system preference 'IntranetUserJS'
3 - Add content to the syspref:
console.log('Hi!');
4 - On the command line launch mysql
sudo koha-mysql kohadev
5 - Alter the syspref directly
UPDATE systempreferences SET value = "console.log('Bye!');" WHERE variable = 'IntranetUserJS';
6 - run the script
perl misc/maintenance/check_syspref_cache.pl
7 - You are warned about the altered system preference
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>
Lucas Gass [Fri, 13 Nov 2020 23:01:29 +0000 (23:01 +0000)]
Bug 27023: Add class names in acq suggestion table (suggestions column)
Test plan:
1. Apply patch
2. Add some suggestions via the OPAC, fill out all the input fields
3. Go to the suggestion managemnet page and look specficially at the Suggestions column.
4. There should be no display change in the table but you should now <span> with classes like 'suggestion_coprightdate', suggestion_isbn, suggestion_publishercode, suggestion_collectiontitle, and suggestion_itype
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 [Tue, 19 Jan 2021 15:43:36 +0000 (15:43 +0000)]
Bug 27324: (follow-up) Remove references to intranetbookbag from Auth.pm
This patch removes references to intranetbookbag from Auth.pm. Now that
the templates use Koha.Preference("intranetbookbag") everywhere it is
unnecessary.
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>
Mazen Khallaf [Tue, 19 Jan 2021 02:25:08 +0000 (02:25 +0000)]
Bug 27324: Use Koha.Preference() for intranetbookbag everywhere
Test Plan:
1. Check the shelves and results page in the intranet
2. Apply the page
3. Check theres no change
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>
Fridolin Somers [Wed, 20 Jan 2021 08:37:45 +0000 (09:37 +0100)]
Bug 17229: Fix unit test warning
Remove warning :
t/db_dependent/ILSDI_Services.t .. 3/10 Null value for biblionumber in Item not allowed at /home/koha/src/t/lib/TestBuilder.pm line 387
$biblio_with_no_item is a Koha::Biblio object.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pasi Kallinen [Thu, 21 Jun 2018 08:15:23 +0000 (11:15 +0300)]
Bug 20971: Prevent Storable::thaw to fail on LastCreatedItem
Sometimes additem.pl will complain about "Storable::thaw failed to
thaw LastCreatedItem-cookie.", see bug 14844. Now, actually fix the bug.
The bug is caused by trying to URI (un)escape MARC::Record, binary data.
We'll use a base64 url-safe version instead.
Test plan:
1: Set PrefillItem to 'The new item is prefilled...'
2: Set a SubfieldsToUseWhenPrefill, 'c' for example
3: Add a new item for biblio A with 'c' set.
4: Double check 'c' value is set for next new item A.
5: search and add a new item for biblio B
6: 'c' is not set
Apply patch
7: logout, login
8: repeat steps 3, 4, and 5 .
9: now 'c' is set.
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: James O'Keeffe <jamespfk@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch: fix commit title and add test plan Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Tue, 22 Dec 2020 19:28:28 +0000 (19:28 +0000)]
Bug 27297: Add required and blank options to av-build-dropbox.inc
This patch adds two options to av-build-drobx
required - which will add the required attribute to the select
blank - which will add a blank option to avoid preselecting others
To test:
1 - In OpacSuggestionMandatoryFeilds select itemtype
2 - Go to OPAC
3 - Add a suggestion
4 - Don't fill out any fields
5 - Submit
6 - Suggestion is added
7 - Delete it
8 - Apply patch
9 - Add a suggestion
10 - Note itemtyp edefaults to 'None'
11 - You cannot submit until you select a value
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, 9 Dec 2020 15:39:09 +0000 (15:39 +0000)]
Bug 27180: Update fines on holidays
This patch removes code that prevents fines from being update on holidays.
The fines are already being calculated, and that takes the calendar into account if
needed, so fines won't be assessed on holidays if they shouldn't.
To test:
1 - set finesCalendar to 'ignore'
2 - Checkout an item due yesterday
3 - Ensure circ rules have a fine amount set
4 - Make today a holiday
5 - run fines.pl
6 - No fine assessed
7 - Apply patch
8 - run fines.pl
9 - Fine assessed!
10 - set finesCalendar to 'use'
11 - checkout an item, due yesterday
12 - run fines.pl
13 - no fine assessed
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Julian Maurice [Wed, 31 Aug 2016 13:27:44 +0000 (15:27 +0200)]
Bug 17229: Check if patron is expired in CanItemBeReserved
This way, calls to ILS-DI HoldTitle and HoldItem do this check too
Added test plan to commit message :
-Set Syspref BlockExpiredPatronOpacActions to "ON",
-Set a patron's category variable "Block expired patrons" to "Follow SysPref" or -"Block" (ideally test both).
-Get the id of a patron from this category (ie : 1234).
-Set this patron's expiration date to a date earlier than today.
-Get a biblionumber which can be reserved (ie : 5678).
Put the following string in your webbrowser (replacing OpacBaseUrl, 1234 and 5678 by your own values) :
http://[OpacBaseUrl]/cgi-bin/koha/ilsdi.pl?service=HoldTitle&patron_id=1234&bib_id=5678&request_location='127.0.0.1'
Should not create a new hold for the patron and report an error.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> 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>
Jonathan Druart [Fri, 15 Jan 2021 10:16:26 +0000 (11:16 +0100)]
Bug 27047: Fix suggestions filtering at the OPAC
There is a "Search" input box that appears to be broken for... ever?
This patch replaces it with the DataTables filtering.
Test plan:
Create some suggestions, go to your suggestion list at the OPAC
Confirm that the filtering now works correctly
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Martin Renvoize [Wed, 13 Jan 2021 11:22:53 +0000 (11:22 +0000)]
Bug 27420: Use object accessor for $attr_type->class()
We introduced a bug in the patron attribute forms with bug 5161.
Test plan
1/ Create two PA_CLASS authorized values
2/ Create two corresponding patron attribute types referencing the above
classes.
3/ Edit a patron, both attributes should appear within their own
fieldsets at the bottom of the member entry form.
4/ Set a value for the first of the two patron attributes and save
5/ Edit the patron again, note that the first attribute no longer
resides within it's own fieldset
6/ Apply the patch
7/ Edit the patron again, note that the first attribute now resides
inside it's own fieldset again
8/ Signoff
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Thu, 12 Nov 2020 09:11:33 +0000 (10:11 +0100)]
Bug 25054: Display search field aliases in Search Engine Configuration
It'd be great if the Search Engine Configuration page would display
the various aliases (shortcuts) available : ti for title, sn for local-number, etc.
Patch changes Koha/SearchEngine/Elasticsearch/QueryBuilder.pm to move
hard-coded vars at the beging and adds a method to provide to %index_field_convert via a method.
Test plan :
1) Use Elasticsearch
2) Go to Administration > Search engine configuration (Elasticsearch)
3) Check you see new column 'Aliases' with for example ti for title.
4) Perform a search 'ti:<title>' and check you get results
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Tue, 22 Sep 2020 13:11:40 +0000 (13:11 +0000)]
Bug 11299: (follow-up) correct link
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Tue, 25 Aug 2020 11:26:31 +0000 (11:26 +0000)]
Bug 11299: (follow-up) Skip fields with no 9 subfields
To test:
1 - Disable the 'thesaurus' for a controlled field like 600a or 650a
2 - Edit a record and put random data in this field
3 - Try to link, get a JS error
4 - Apply patch
5 - Repeat
6 - No more error, field is not linked (as it has no $9 subfield)
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Tue, 25 Aug 2020 10:56:51 +0000 (10:56 +0000)]
Bug 11299: (follow-up) Correct rebase errors and add message class to dialog
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Fri, 21 Aug 2020 15:47:08 +0000 (15:47 +0000)]
Bug 11299: (QA follow-up) Fix tests, spaces, and CSS update
Removed my from variables in test
Undid stray line deletions
Undid adding 1; to test file
Fix CSS replace command
Update license
Fix spelling
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bouzid Fergani [Wed, 6 Nov 2013 15:49:09 +0000 (10:49 -0500)]
Bug 11299: Add a button to the biblio edition page to automatically add authority links in the current biblio record via AJAX. Also adds a button to easily create missing authority records.
add authority type in the form to create the missing authority.
when authority was found, the 600$9 field have the authid.
Testing scenario (Creating an authority record for a failed automatic link) :
1 - In your system preferences set:
AutoCreateAuthorities: Don't generate
BiblioAddsAuthorities: Allow
2 - Go to the Cataloging -> New record (koha/cataloguing/addbiblio.pl)
Ensure you are using the basic editor
3 - Click the "Link authorities automatically" button.
A message should appear, telling the user "No authority link was changed."
4 - Add random informations in field 600$a of the biblio record.
5 - Click the "Link authorities automatically" button.
the message box should now show "600 - No matching authority found.".
the 9 subfield is red
Above the 9 subfield is a red X with a blue plus next to it
Hover on the plus, see it is titled 'Create authority'
6 - Click the 'Create authority' link
7 - A new authroity form pops up, the info from the cataloging editor is prefilled
Click the 100 field heading to expand and confirm info is transferred
8 - Fill in necessary fields and save the new authority
9 - The cataloging screen now has the 9 subfield populated and is green
10 - Click "Link authorities automatically" again
Dialog says "No authority link was changed"
11 - In another tab go to System preferences and set AutoCreateAuthorities to 'Generate'
12 - Add random information to the 650 field
13 - Click 'Link authorities' button
14 - Dialog says:650 - No matching authority found. A new authority was created automatically.
15 - The subfield 9 is green and has the id of the new authority record
16 - In another tab search authorities and find an existing subject heading
17 - Add a new 650 with the info from the existing record
18 - Click 'Link authorities'
19 - The new field is correctly linked to existing authority
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=12299 Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 14 Jan 2021 09:42:53 +0000 (10:42 +0100)]
Bug 15448: Fix ISE
The method Koha::Items->itemnumber is not covered by tests!
Trace begun at /kohadevbox/koha/Koha/Objects.pm line 592
Koha::Objects::AUTOLOAD('Koha::Items=HASH(0x55981fd94790)') called at /kohadevbox/koha/opac/opac-reserve.pl line 465
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 15448: (follow-up) Fetch the patron category once
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 15448: Filter out items hidden in OPAC on placing hold
This patch leverages on bug 24254's
Koha::Items->filter_by_visible_in_opac to filter out items that
shouldn't be presented to the end user in the OPAC interface.
To test:
1. Circulation and Fine rules for item-level holds are set to allow.
2. Setting the OpacHiddenItems preference to "ccode: [SUPPRESS]"
3. An item with collection Code Suppress is set.
4. Search for the title in the OPAC.
=> SUCCESS: The Suppress ccode item isn't shown.
5. View the detail page for the title.
=> SUCCESS: The suppress ccode item isn't shown.
6. Place a hold on the item:
-- Click "Show more options"
-- Select "A specific item"
=> FAIL: the ccode with the opachiddenitems rule has an item that appear in the list to place a hold
7. Apply this patch and repeat 6
=> SUCCESS: The item doesn't show!
8. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 24254: Implement separate filters and add patron param
This patch introduces two new methods for stacking filters on
Koha::Items:
- filter_out_lost
_ filter_out_opachiddenitems
This two filters are what actually happened inside the
filter_by_visible_in_opac. Everything is covered by tests.
In the process I added a Koha::Patron param to the method that is
internally used to decide if the OPACHiddenItems syspref needs to be
honoured or not. This *could* be better done with a fallback to
C4::Context->userenv if no param is passed.
I decided to leave that part for later, if we really find it would help
(e.g. if bug 10589 gets some action and we really need something here to
handle that).
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D
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>
Bug 24254: Read the OpacHiddenItems preference internally
After discussing the 'rules' parameter usefulness we decided it was not
the best idea, and the gains in terms of 'performance' would me
meaningless (in-memory caching of sysprefs). This patch makes a really
minor tweak to the tests so they mock the C4::Context->yaml_preference
method, but keeping the same original rules to highlight no behaviour
change takes place.
Then the rules parameter is removed from the calls, and the tests should
keep passing.
A minor change to make $rules = undef is made to highlight the // {}
behaviour when reading the syspref..
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
On C4::Search and C4::Circulation the uses of the items.itemlost field
highlight the fact that the comparisson itemlost <= 0 was wrong, as it
is evaluated as a Perl boolean.
The column can only be an int and NOT NULL, so we need to check if it is
0 to ponder if not hidden.
This patch changes the tests to reflect this, and adjust the
Koha::Items->filter_by_visible_in_opac implementation to adapt to this.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
This patch adds a method based on the original idea from Nick, but on
Koha::Items.
The idea is to build a proper filter, based on the current rules for
hiding things, directly on the DBIC query. The caller takes care of
knowing if the filtering should apply (i.e. checking the patron category
exceptions) and then it would do something like:
my @items;
if ( <patron_category_does_not_have_exception> ) {
@items = $biblio->items->filter_by_visible_in_opac(
{
rules => $rules
}
);
}
else {
# still want to enforce 'hidelostitems'
@items = $biblio->items->filter_by_visible_in_opac;
}
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Look at the use cases on the tests, read the code
=> SUCCESS: It all makes sense
4. Compare with Koha::Item->hidden_in_opac
=> SUCCESS: It all makes sense
5. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 9 Sep 2020 18:23:38 +0000 (18:23 +0000)]
Bug 25775: Add DataTables controls to user's checkouts table in OPAC
This patch updates the "your summary" page in the OPAC so that tables on
the logged-in user's page have DataTables controls. The patch also
tweaks the DataTable configuration of some other pages to make them all
more consistent.
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).
- Log in to the OPAC as a user who has checkouts, overdues, and holds.
- On the "your summary" page, confirm that the checkouts table has
controls at the top: A search form and link-style buttons: Clear
filter, Copy, CSV, Print, iCal, Renew selected, and Renew all.
- Confirm that each work correctly.
- At the bottom of the page, the style of the "Renew selected" and
"Renew all" buttons should now be side by side.
- Confirm that both buttons work correctly.
- If necessary, enable the UseCourseReserves system preference.
- Go to the OPAC course reserves page.
- Confirm that there is a working "Search courses" field at the top of
the table.
- View the contents of a course reserve.
- There should be a "Search course reserves" field at the top of the
table.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>