Owen Leonard [Wed, 21 Feb 2018 17:40:06 +0000 (17:40 +0000)]
Bug 20240: Remove space before : when searching for a vendor in serials (Vendor name :)
This patch removes the space before the colon in the "vendor" label in
the vendor search pop-up window.
To test, apply the patch and go to Serials -> New subscription.
- Click the "Search for a vendor" link next to the vendor form field.
- In the pop-up window, confirm that there is no space before the colon
in the "vendor" label.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 21 Feb 2018 17:59:49 +0000 (17:59 +0000)]
Bug 20239: Fix spelling on authority linker plugin
This patch corrects the capitalization of the "Choose" link in the
pop-up window for selecting an authority record to link to a MARC field.
This patch also converts the link, and the "Edit authority" link, to
Bootstrap buttons.
To test:
- Create a new record
- Go to the 100 field
- Click on plugin link behind $a
- Look for an existing authoriy in your system
- In the table of search results, confirm that the "Choose" and "Edit
authority" links look correct and work correctly.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Mirko Tietgen [Fri, 23 Feb 2018 12:36:02 +0000 (13:36 +0100)]
Bug 20061: koha-common is not pulling libsearch-elasticsearch-perl / d/control
update debian/control. this file is auto generated. no testing required.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Mirko Tietgen [Fri, 23 Feb 2018 12:10:51 +0000 (13:10 +0100)]
Bug 20061: koha-common is not pulling libsearch-elasticsearch-perl
Adds Search::Elasticsearch to Perldependencies.pm
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Charles Farmer [Mon, 19 Feb 2018 20:00:33 +0000 (15:00 -0500)]
Bug 20249: (bug 18789 follow-up) "Patron has no outstanding fines" now appears alongside fines
Test plan:
1) Choose two patrons from your database, one who has fines, and the other who does not
2) Visit their 'Fines' page, and click on the 'Pay fines' tab
2.1) If they don't have any fines, you'll only see a blank row
2.2) If they do have fines, the payment form will appear, but the text "... no outstanding fines" will also appear
3) Apply patch
4) Visit once again the 'Pay fines' tab of your patrons
4.1) Now, "... no outstanding fines" will appear for the right situation
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pongtawat C [Sun, 9 Jul 2017 16:34:17 +0000 (23:34 +0700)]
Bug 18913: Allow symbolic link in /etc/koha/sites
This patch makes the koha-* scripts follow symbolic links when querying for
Koha instances. Without it, it is not possible to define instances outside the
/etc/koha/sites directory,
To test:
- Create a symlink in /etc/koha/sites:
$ sudo ln -s /tmp /etc/koha/sites/test
- Test the original is_instance function:
$ . /usr/share/koha/bin/koha-functions.sh
$ is_instance test && echo success || echo failure
=> FAIL: symlinks are not considered instance names (i.e. failure is printed)
- Apply this patch
- Update the koha-functions.sh file:
$ perl misc4dev/cp_debian_files.pl
- Test is_instance again:
$ . /usr/share/koha/bin/koha-functions.sh
$ is_instance test && echo success || echo failure
=> SUCCESS: symlinks are considered instance names (i.e. success is printed)
- Sign off :-D
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 11 Oct 2017 22:06:17 +0000 (19:06 -0300)]
Bug 19290: Browse selected bibliographic records - Staff interface
This patch adds the same feature as bug 10858 for the OPAC interface:
after a search, librarians will be able to browse selected results.
The results can be selected from several pages.
By extension it is possible to add results from several pages to a list
or the cart.
When at least one result is selected, a new "Browse selected records" button
becomes usable and change the behaviour of the existing browser.
The whole feature can be turned off with the pref BrowseResultSelection.
Test plan:
- Launch a search (on the staff interface)
- Check some biblios
- Go on another page
- Check some biblios
- Come back to a page you already check results and confirm that they are
still checked
- Click on the "Browse selected records" button
- Check that you are able to browse results you had checked.
You can also:
- add them to the cart
- add them to a list
QA note: the browsers at the OPAC and the one at the staff interface are completely different
That's why the code is not mimicking what has been done on bug 10858.
The behaviour must stay the same anyway.
This patch fixes two errors that slipped in the patchset.
To test:
- Create a dummy branch for testing:
$ cd kohaclone
$ git fetch
$ git checkout v17.11.00 -b dummy
- Reset your working DB
$ reset_all (y)
- Set your branch to current master
$ git reset --hard origin/master
- Update the DB
$ updatedatabase
- Update the schema files
$ kshell
k$ misc/devel/update_dbix_class_files.pl \
--db_name koha_kohadev \
--db_user koha_kohadev \
--db_passwd password
k$ exit
$ git diff
=> FAIL: There are discrepancies on upgrades
- Reset to v17.11.00 revision and DB:
$ git reset --hard v17.11.00
$ reset_all (y)
- Set your branch to current master
$ git reset --hard origin/master
- Apply this patch
- Update the DB
$ updatedatabase
- Update the schema files
$ kshell
k$ misc/devel/update_dbix_class_files.pl \
--db_name koha_kohadev \
--db_user koha_kohadev \
--db_passwd password
k$ exit
$ git diff
=> SUCCESS: No discrepancies!
- Reset to HEAD to get rid of the schema changes
$ git reset --hard HEAD
- Regenerate the schema files on top of this patch
$ dbic ; cd /home/vagrant/kohaclone
$ git diff
=> SUCCESS: No discrepancies!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 18 Jan 2018 18:29:10 +0000 (18:29 +0000)]
Bug 20037: Switch single-column templates to Bootstrap grid: Serials
This patch updates several single-column Serials module templates to
use the Bootstrap grid. In addition to grid changes, some templates have
been modified to include the footer with the correct popup parameter.
- serials\acqui-search.tt - Go to Serials -> New subscription. Click
"Search for a vendor."
Owen Leonard [Tue, 16 Jan 2018 15:03:29 +0000 (15:03 +0000)]
Bug 19981: Switch single-column templates to Bootstrap grid: Course reserves
This patch updates three single-column course reserves templates to use
the Bootstrap grid:
- course-reserves.tt - The main Course Reserves page
- course-details.tt - The detail view of an individual course
- course.tt - Editing a course
- add_items-step1.tt - Adding items to a course, step 1 (scan barcode)
- add_items-step2.tt - Adding items to a course, step 2
- invalid-course.tt - The error page shown if you try to view
course_reserves/course-details.pl directly without passing a course id
in the URL
- Also changed in this template: Error message has been wrapped in the
standard "dialog alert" <div>.
Each of these pages should look correct, with a single centered column
with wide margins on either side. At lower browser widths the margins
should disappear.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 11 Jan 2018 18:16:39 +0000 (18:16 +0000)]
Bug 19954: Update popup window templates to use Bootstrap grid: Patrons
This patch updates two patron-related templates to use the
Bootstrap grid instead of the YUI grid.
This patch also corrects an unrelated error in update-child.tt where
some JS variable declarations required by members-menu.js were
missing.
To test you must have more than one adult-type patron category defined.
- Locate and view a child-type patron record.
- From the "More" menu in the toolbar, choose "Update child to adult
patron."
- The popup window which appears should look correct and work
correctly.
- The table of patron categories should be sortable.
- Add a new patron and enter the first and last names of an existing
patron.
- When Koha asks to confirm a possible duplicate record, click the
"View existing record" link. The popup which is triggered should
look correct.
Signed-off-by: Zoe Bennett <zoebennett1308@gmail.com> Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 9 Jan 2018 19:11:12 +0000 (19:11 +0000)]
Bug 19939: Move cataloging Z39.50 results actions into menu
This patch modifies the template which displays cataloging Z39.50
search results so that the "MARC," "Card," and "Import" links are moved
out of separate table cells and into one menu.
The old menu which would appear when any table cell is clicked has been
removed, and code added to display the same Bootstrap menu if a table
cell is clicked.
To test, apply the patch and go to Cataloging -> New from Z39.50/SRU.
- Perform a Z39.50 search which will return more than one result.
- Confirm that clicking the "Actions" button triggers a drop-down menu.
- Confirm that the links in the menu trigger actions for the correct
bibliographic record.
- Confirm that clicking any other table cell in the table of results
will trigger the display of the same menu.
- Confirm that this menu works correctly for the correct record.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 3 Jan 2018 01:40:13 +0000 (01:40 +0000)]
Bug 19837: Add error feedback for duplicated or unfound cardnumbers
To test:
1 - Enter some patrons on a list
2 - 'Enter multiple cardnumbers'
3 - Make sure to add some that are already in list, some that don't
exist, and some new patrons
4 - Verify results are as expected with warnings
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>
Owen Leonard [Fri, 15 Dec 2017 17:26:12 +0000 (17:26 +0000)]
Bug 19837: Add multiple patrons to a list by barcode
This patch adds the interface change and basic functionality for an
option to add multiple patrons to a patron list by scanning barcodes.
To test, apply the patch and go to Tools -> Patron lists.
- Create a patron list if necessary, and got to the "Add patrons"
screen.
- Test the process for adding patrons using the "Patron search" text
input.
- Test the process for adding patrons using the "Enter multiple card
numbers" option.
This should really have some error-handling added to it: Onscreen
messages when a non-existing patron card number is submitted or when a
patron already exists on the list.
Signed-off-by: Nick Clemens <nick@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 [Fri, 8 Dec 2017 19:09:05 +0000 (19:09 +0000)]
Bug 19785: Move template JavaScript to the footer: Authorities, part 1
This patch modifies even more staff client authorities templates so
that JavaScript is included in the footer instead of the header.
To test, apply the patch and test the JavaScript-driven features of the
modified templates: All button controls, DataTables functionality, tabs,
etc.
- Authorities
- New from Z39.50
-> Search
-> Results
- New from Z39.50
- Deletion confirmation
- Merge records -> Merge
- Tabs
- Tag selection
-> Authority detail
- Tabs
- Deletion confirmation
- New from Z39.50
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 19 Jul 2017 13:10:41 +0000 (13:10 +0000)]
Bug 17672: Add damaged_on to items and deleteditems tables
This patchset adds a 'damaged_on' column to store the date an item is
marked damaged, analogous to withdrawn_on and itemlost_on
To test:
1 - Apply patch
2 - Mark an item damaged via moredetail.pl (Items tab on left in
details)
3 - Note the damaged on date apears below
4 - Unmark the item, the date is removed
5 - Go to the edit items screen (from top bar 'Edit->edit items')
6 - Mark item damaged - check db or moredetails.pl to see damaged_on
date
7 - Unmark item damaged - confirm date is removed
8 - prove t/db_dependent/Items.t
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pasi Kallinen [Wed, 7 Feb 2018 07:45:20 +0000 (09:45 +0200)]
Bug 20148: Prevent adding same user multiple times to acq basket
When adding a user to manage acquisitions basket, it is possible
to add the same user multiple times. Prevent that.
Test plan:
1) Go to Home -> Acquisitions -> [bookseller] -> [basket]
2) On the "Add user" in the Managed by-part, and try adding
the same user multiple times.
3) Apply patch
4) Repeat 1 and 2. You should now get an error message saying
the user is already in the list.
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Roch D'Amour <roch.damour@inlibro.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, 16 Feb 2018 14:33:12 +0000 (14:33 +0000)]
Bug 20222: Make bread crumb for cleanborrowers.pl match the link text in tools-home.pl
This patch revises the breadcrumbs in the template for batch patron
deletion / anonymization so that they match the text used in the tools
menu and on Tools home.
To test, apply the patch and go through a batch patron anonymization
process. At each step the breadcrumbs should read "Batch patron
deletion/anonymization" instead of "clean patron records."
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Thu, 12 Oct 2017 11:13:41 +0000 (13:13 +0200)]
Bug 19452: Remove the truncate option
The truncate option is not really useful. Its result is probably not what
most users of this script expect or need.
It truncates both tables borrower_message_preferences and
borrower_message_transport_preferences. This (unfortunately) includes
deleting messaging preferences for patron categories. After that, adding
preferences again will not add categories again, but only borrower
preferences which are all disabled.
Furthermore, we do not need to disable the foreign key check. Neither
do we actually need to truncate, deleting records seems sufficient.
Also deleting transport preferences is not needed, since it will be
done by a cascade from messaging preferences. Note that the subsequent
call of SetMessagingPreferencesFromDefaults will already delete the
records.
This makes it possible to remove the truncate option altogether.
Test plan:
[1] Select a patron category (say ST) and change days_in_advance to x.
[2] Select a ST patron and set days_advance to y in his msg prefs.
[3] Run borrowers-force-messaging-defaults.pl -doit
[4] Verify that the patron has been reset to the default prefs (incl.
value x in days_in_advance).
[5] Verify that the patron category prefs are still intact.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 16 Jan 2018 13:25:00 +0000 (10:25 -0300)]
Bug 19978: Fix ITEMTYPECAT behaviour
ITEMTYPECAT permits to group and hide item types at the OPAC (see bug
10937 for a complete description).
Since commit 091d6c513bcbee224ff06477e79be48cea7fe825
Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes
the code assume that they are item types. Before it just assigned undef
to the description.
Test plan:
Create ITEMTYPECAT authorised values
Assign an item type to this authorised value group
Search for a item using this item type at the OPAC
Without this patch applied you get:
Can't call method "translated_description" on an undefined value at
/home/vagrant/kohaclone/opac/opac-search.pl line 231.
With this patch applied the search result is displayed.
Make sure the original feature still works.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.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, 5 Oct 2017 20:38:34 +0000 (17:38 -0300)]
Bug 9573: Lost items report - Add the CSV export ability
Finally we add the ability to export the list of lost items.
The items will be export in CSV format using a CSV profile defined.
Test plan:
0/ Apply all the patches from this patch set
1/ Define a CSV profile (type=SQL, Usage=Export lost items in report)
Try something like that to get the same columns as the default table:
Title=biblio.title
|Author=biblio.author
|Lost status=items.itemlost
|Lost on=items.itemlost_on
|Barcode=items.barcode
|Call number=items.itemcallnumber
|Date last seen=items.datelastseen
|Price=items.price
|Rep. price=items.replacementprice
|Library=items.homebranch
|item type=items.itype
|Current location=items.holdingbranch
|Location=items.location
|Not for loan status=items.notforloan
|Notes=items.itemnotes
2/ Use the filters and select items to export
3/ Export the list of items you want and make sure the CSV is correctly
formatted and contains the items you selected
QA Notes:
- I think we should add default CSV profiles for the different "usage",
but I would consider it as a separate enhancement since none of them is
defined yet
- Most of the code to export CSV is no reusable. We should make
Koha::Exporter::Record support CSV export for type=SQL (it only
supports MARC type so far).
Jonathan Druart [Thu, 5 Oct 2017 17:35:24 +0000 (14:35 -0300)]
Bug 9573: Lost items report - add KohaTable to itemlost
Before this patch set, we used KohaTable to display a table with the
column visibility plugin, and an usual dataTable initialisation for the
filters.
For the lost items report table we will need both.
To do so we need to reorganize the code a bit
We cannot pass a selector but the id of the node which represents the
table. Indeed it is how works currently the filters (we may want to
improve that later)
Jonathan Druart [Thu, 5 Oct 2017 16:15:43 +0000 (13:15 -0300)]
Bug 9573: Lost items report - Move filters code to a separate js file
For the next patches we will need to reuse what is already done on the
bibliographic record detail page. This patch moves the code to make it
reusable easily and avoid copy and paste.
Jonathan Druart [Thu, 5 Oct 2017 16:02:58 +0000 (13:02 -0300)]
Bug 9573: Lost items report - Add items.notforloan as a filter
This patch adds a new "Not for loan" status filter to the lost items
report.
Test plan:
0/ Apply all patches from this patch set
1/ Use the new "Not for loan" filter to search lost items
2/ The table result must be consistent and a new "Not for loan" column
should be there
3/ Confirm that you are able to hide/show this column with the column
settings tool.
Bug 15794: Add an emoji picker to tag entry in OPAC
This patch introduces an emoji picker int othe OPAC's tag entry form.
It relies on the emoji-picker library [1]
To test:
- Apply the patches
- Restart all services (just in case some caching is taking place):
$ restart_all
- Log into the OPAC
- Do a search, pick a record
- On the detail page for the record, click on 'Add tags'
=> SUCCESS: An input form is displayed, with an emoji picker on the
right.
=> SUCCESS: Choosing an emoji populates the input with it
- Set 'TagsModeration' and retry
=> SUCCESS: Proposed tags are displayed correctly on the staff interface
for tag moderation
- Sign off :-D
Sponsored-by: Hotchkiss School
[1] https://github.com/OneSignal/emoji-picker
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Library groups were added after this patchset was submitted.
This patch adjusts kohastructure.sql entry for library_groups.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Because of the 3-byte vs. 4-byte char size change in utf8mb4, altering a
column's encoding from utf8 into utf8mb4 results in this changes:
TEXT => MEDIUMTEXT
MEDIUMTEXT => LONGTEXT
The column size in the rows (the text itself goes to a separate object
storage) shifts by 1 byte, because all chars are shifted in bytes size
too, so there needs to be room for the byte-count in the column.
This is a debatable change, but the path needs to be included along with
the rest of the patchset for consistency.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 18336: Fix missing utf8_bin > utf8mb4_bin translation in kohastructure.sql
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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 18336: Add explicit index names to kohastructure.sql
This patch just adds an explicit index name to the search_marc_map
table. The atomicupdate on this patchset is a good example of why we
better have them.
Sponsored-by: Hotchkiss School Signed-off-by: Mark Tompsett <mtompset@hotmail.com> 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>
Sponsored-by: Hotchkiss School Signed-off-by: Mark Tompsett <mtompset@hotmail.com> 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>
Sponsored-by: Hotchkiss School Signed-off-by: Mark Tompsett <mtompset@hotmail.com> 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>
This patch adapts the DB structure so it uses utf8mb4 encoding and
utf8mb4_generic_ci collation.
Indexes for columns of type VARCHAR with prefix lenght higher than 191
are shortened because of the smaller max index lenght for utf8mb4
Note: please beware that testing this patchset risks your data and the
patchset includes reinitializing the DB.
To test:
- Be on the master branch
- Have a clean DB:
$ reset_all
(y)
- Apply the first patch (Unit tests)
- Run:
$ kshell
k$ prove t/db_dependent/www/search_utf8.t \
t/db_dependent/www/auth_values_input_www.t
=> FAIL: Tests fail because Koha doesn't support supplemental (UTF-8)
chars.
- Apply the rest of this patchset
- Upgrade the schema:
$ kshell
k$ perl installer/data/mysql/updatedatabase.pl
- Run the tests:
k$ prove t/db_dependent/www/search_utf8.t \
t/db_dependent/www/auth_values_input_www.t
=> SUCCESS: Tests pass!
- Now start from a clean DB
- Run:
$ reset_all
(y)
- Run the tests:
k$ prove t/db_dependent/www/search_utf8.t \
t/db_dependent/www/auth_values_input_www.t
=> SUCCESS: Tests pass!
Verify you can use emojis all over the place (MARC records, AV
descriptions, etc).
Sponsored-by: Hotchkiss School Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Sponsored-by: Hotchkiss School Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 18336: Full stack tests for supplemental UTF-8 chars
This patch introduces tests for Koha's support for 4-byte supplemental
UTF-8 chars. encoding/decoding tools handle this gracefuly. The missing
piece is the MySQL DB backend.
The tests in this patch:
- Adds a couple records for each flavour (MARC21 and UNIMARC) so
search_utf8.t tests 4-byte chars are handled correctly
- Adds emoji testing in auth_values_input_www.t
To test:
- Apply this patch
- Run:
$ kshell
k$ prove t/db_dependent/www/search_utf8.t \
t/db_dependent/www/auth_values_input_www.t
=> FAIL: It should fail if the DB hasn't been migrated into using
utf8mb4
Sponsored-by: Hotchkiss School Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 20004: Adapt /v1/cities to new naming guidelines
This patch implements the changes required by the cities endpoint RFC
[1].
It uses the objects.search helper, and relies on bug 19686.
To test:
- Apply the patches
- Compare the spec with the RFC (api/v1/swagger/definitions/city.json)
=> SUCCESS: It makes sense
- Run:
$ kshell
k$ prove t/db_dependent/api/v1/cities.t
=> Tests pass!
- Sign off :-D
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adapts the unit tests for the cities endpoint to the
requirements from the RFC. This tests are expected to just fail
without the needed followup.
To test:
- Run:
$ kshell
k$ prove t/db_dependent/api/v1/cities.t
=> FAIL: Tests obviously don't pass without the followup patch.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 16 Feb 2018 15:23:26 +0000 (12:23 -0300)]
Bug 20229: Explicitly list the SQL modes we support
In our installation procedure we ask the administrator to edit the
MySQL|MariaDB configuration file to specify the SQL modes we support
(see bug 17258 comment 6 and 7 for more information).
We are on the way to catch and fix all these issues and support these
stricter modes (as they highlight problem in our codebase/DB structure)
but in the meanwhile it may be good to remove this step and revert the
changes when we are ready.
TODO:
- Remove that for dev installations (to let developers catch these bugs)
- Edit the wiki page to remove this step
Test plan:
0. Do not apply this patch
1. Edit your MySQL|MariaDB config and add:
sql-mode = "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
to the [mysqld] section (or edit it)
2. Restart your DBMS
3. Try to make the app explode (watch the logs)
(tips: you should get "'koha_kohadev.me.id' isn't in GROUP BY" when
editing an order)
4. Apply the patch, restart_all, restart your DBMS
5. Try to recreate the failure
=> You should no longer see the error in the logs
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 16 Feb 2018 18:03:17 +0000 (15:03 -0300)]
Bug 18789: (follow-up) Fix page title when creating a new patron
This has been caught by selenium test, the category name must be
displayed when we are creating a new patron, and so does not depends on
the "patron" variable
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 19686: (follow-up) Add to_api param for completeness
This patch adds (yet) another param to objects.search: a reference
to a to_api function to be applied when processing the search results
for output.
To test:
- Apply this patch
- Run:
$ kshell
k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Test count raised, and tests pass!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch introduces a new parameter to the objects.search Mojo helper.
The idea behind this, is that if there's any attribute name mapping
between the DB objects and the API exposed ones, we should be able to
pass it to objects.search so the filtering query params are mapped
correctly for building the DBIC query, like this example:
my $patrons_set = Koha::Patrons->new;
my @patrons = $c->objects->search( $patrons_set,
\&to_model
)->as_list;
# and probably
@patrons = map {to_api($_)} @patrons;
The to_model function needs to avoid autovivification, to prevent
messing with the query parameters (undef params).
To test:
- Apply this patches
- Run:
$ kshell
k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass! Params get mapped!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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 Bourgault <david.bourgault@inlibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 10 Jan 2018 17:19:57 +0000 (17:19 +0000)]
Bug 19947: Update popup window templates to use Bootstrap grid: Acquisitions transfer order
This patch updates the acquisitions transfer order template to use the
Bootstrap grid instead of the YUI grid.
Also fixed: Corrected footer include for popup window.
To test, apply the patch and go to Acquisitions -> Vendor -> Open order
-> Transfer.
In the popup window search for a vendor, select, and choose a basket.
Signed-off-by: Charlotte Cordwell <charlotte.cordwell123@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 [Wed, 7 Feb 2018 14:24:04 +0000 (14:24 +0000)]
Bug 19932: (follow-up) Add fixed footer to cataloging Z39.50 popup
This patch adds additional Bootstrap framework markup to the search form
so that the "Save" and "Cancel" controls are in a fixed footer at the
bottom of the window. This prevents the controls from disappearing down
off screen.
To test, apply the patch and go to Cataloging -> New from Z39.50/SRU.
In the popup window, both the search form and search results pages
should look correct.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> 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>
Owen Leonard [Tue, 9 Jan 2018 13:49:02 +0000 (13:49 +0000)]
Bug 19932: Update popup window templates to use Bootstrap grid: Cataloging Z39.50 search
This patch updates the cataloging Z39.50 search template to use the
Bootstrap grid instead of the YUI grid.
Also fixed: Several un-quoted HTML attributes have been corrected.
To test, apply the patch and go to Cataloging -> New from Z39.50/SRU.
In the popup window, both the search form and search results pages
should look correct.
Signed-off-by: Zoe Bennett <zoebennett1308@gmail.com> Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> 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>
Kyle M Hall [Mon, 21 Jul 2014 17:50:08 +0000 (13:50 -0400)]
Bug 12598: New misc/import_borrowers.pl command line tool
Test Plan:
1) Apply this patch
2) Test importing patrons from command line,
options are availble with --help.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested with minimal csv
(cardnumber,surname,firstname,categorycode,branchcode,password,userid)
Overwrite does not change category or branch.
Patrons are loaded, userid & password works
Updated license to GPLv3
No other koha-qa errors.
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 12598 - Tidy import_borrowers.pl
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 12598 - Move importing code to a subroutine
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 12598 - Update command line script to use patron import subroutine
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 12598 [QA Followup]
* Fix copyright on import_borrowers.pl
* Changes -c --csv to -f --file
* Adds -c --confirm option
* Renames misc/import_borrowers.pl to misc/import_patrons.pl
* Restore userid matchpoint option
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 12598 - Fix merge to master. Backport 3 updates from latest import_borrowers.pl
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 12598 - Started regression tests. Fix missing C4::Members::Attributes package
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 12598 - More refactoring and regression tests in Koha::Patrons::Import
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 12598 - Creating objects in misc/import_patrons.pl and tools/import_borrowers.pl
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 12598 - Refactoring Koha::Patrons::Import includes bug fixed for critical date types and header column parsing
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 12598 - Rebase + backport of 16426 plus fixing 16426
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 12598: catch warnings raised by import_patrons in tests
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Fri, 16 Feb 2018 11:00:25 +0000 (11:00 +0000)]
Bug 18789: (QA follow-up) Fix viewlog when accessed via circulation
Test plan:
Go to any patron and then to Modification log of this patron
-- without patch you will not see the left side menu and patron information
-- with patch menu and patron information is here, and should be fully
working (links)
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Fri, 16 Feb 2018 10:15:14 +0000 (10:15 +0000)]
Bug 18789: (QA follow-up) Use patron object in batch checkout template
1) Enable batch checkouts in system preferences and set it on for some
patron categories
2) Try to batch checkout for some patron with one of these categories
--> without patch the batch checkout page is even not shown
--> with patch batch checking out is working as expected
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Fri, 16 Feb 2018 10:00:22 +0000 (10:00 +0000)]
Bug 18789: (QA follow-up) Fix showing cardnumber when creating a hold
Test plan:
1) Try to create a hold request for a patron
2) On place hold form on the first line is shown the patron name
--> without patch the cardnumber is not shown
--> with patch there is cardnumber right after the patron name
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Fri, 16 Feb 2018 09:57:48 +0000 (09:57 +0000)]
Bug 18789: (QA follow-up) Fix showing patron name when checking in
Test plan:
1) Have a patron with more then one checkouts
2) Check in one of the checkouts
--> without patch patron name is not shown in checked-in items table
--> with patch the patron is shown with name, category, number of
checkouts and both links are working
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Fri, 16 Feb 2018 09:01:26 +0000 (09:01 +0000)]
Bug 18789: (QA follow-up) Fix loading saved address data to edit patron form
Test plan:
1) Have patron with address filled in
2) Edit the patron
-- without this patch the fields for address are blank
-- with patch the fields are filled with actual data
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Fri, 16 Feb 2018 08:15:31 +0000 (08:15 +0000)]
Bug 18789: (QA follow-up) Use first_valid_email_address on Tranfers to receive page
For consistancy with waitng reserves
Test plan:
1) Have a hold for patron which need to be transfered, inititate
transfer and go to target library
2) Go to Circulation -> transfers to receive page and you should see any
first valid email for tha patron in column "On hold for"
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Fri, 16 Feb 2018 08:02:39 +0000 (08:02 +0000)]
Bug 18789: (QA follow-up) Fix showing the name of basket creator on booksellers page
Test plan:
1) Go to Acquisition and search for a vendor, you are presented with vendors and their baskets
2) Look to Created by column
--> without patch only firstname is shown
--> with patch you should see full name
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 7 Feb 2018 18:54:31 +0000 (15:54 -0300)]
Bug 18789: (follow-up) Use Koha::Patron->image from the templates
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 12 Jun 2017 17:20:26 +0000 (14:20 -0300)]
Bug 18789: (follow-up) Send Koha::Patron object to the templates
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 1 Jun 2017 17:03:52 +0000 (14:03 -0300)]
Bug 18789: Update other occurences where is_child should be used
Trivial changes here, just do a code review on the QA step
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 1 Jun 2017 16:58:48 +0000 (13:58 -0300)]
Bug 18789: Remove adultborrower from the pay* scripts
This flag is not used in the templates
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 1 Jun 2017 16:58:04 +0000 (13:58 -0300)]
Bug 18789: Remove useless IS_ADULT variable
Test plan:
git grep IS_ADULT
must not return any results
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 1 Jun 2017 16:57:12 +0000 (13:57 -0300)]
Bug 18789: Use Koha::Patron->is_adult where needed
Test plan:
When editing adult's info you must see the "Add child" button
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 1 Jun 2017 16:52:30 +0000 (13:52 -0300)]
Bug 18789: Use Koha::Patron->is_child where needed
Test plan:
When you are on a page related to a child you should see the "Update
child to adult patron" button
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 1 Jun 2017 16:51:09 +0000 (13:51 -0300)]
Bug 18789: Add tests for is_adult and is_child
This patch add 2 methods to the Koha::Patron module: is_adult and
is_child.
That way the business logic is at only one place and covered by tests.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>