run update database script, look for new laguages under 'Language:' in Advanced search.
Languages that should be added are:
1. Estonian
2. Latvian
3. Lithuanian
4. Inuktitut
5. Inupiaq
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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>
It looks like C4::Languages:getLanguages relies on implicit database
order for languages. They appear to be sorted by subtag so this patch
adds that sorting to the database query to ensure the dropdown is
sorted.
Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
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>
The work of the first patch was not yet finished.
[1] Similar changes to template for Cataloging and Authorities
[2] Made a better distinction now between short title on button
and long title on menu and modal
[3] The short title parameter removes need for previewed var
[4] To keep related code closer, moved the dataPreview hidden code
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
For translated interface.
Using 'Order' (the button text) was not a good idea as the interface can
be translated :)
Signed-off-by: Mark Hofstetter <koha@trust-box.at>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Our query for lowest priority holds only needs to adjust holds on the biblio we are looking at
so I add biblionumber
Additionally we can simply find the end of the array and use that rather than 99998
so I set new_rank to scalar @priority
Lastly, we don't need to fetch the lowest priority holds if we are ignoring lowest priority
so I move it into the conditional
To test:
1 - Add holds with lowest priorty to 2 records in the catalog
2 - Add a hold on a third record
3 - Note errors in log like:
[2021/07/23 17:47:17] [WARN] splice() offset past end of array at /kohadevbox/koha/C4/Reserves.pm line 1649
4 - Apply patch and restart all the things
5 - Add a new hold on third record - no warns
6 - Make one of the holds on third record have lowestPriority (click rightmost arrow with line at bottom)
7 - Note no warns
8 - Adjust other holds on record and note no warns
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
TO test:
1 - Enable OAI-PMH server in Koha
2 - Set OAI-PMH:MaxCount to 5
3 - Define 6 sets in Admin->OAI sets configuration
Can setSpec and setName to 1,2,3....
4 - Browse to:
http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListSets
5 - Click 'Show more'
6 - Keep seeing the same 5 - note the page says 'Results fetched -4-0'
7 - Apply patch
8 - Restart all the things
9 - Reload the ListSets URL above
10 - Click 'Show more'
11 - See the 6th set and note no 'Show more'
12 - Set OAI-PMH:MaxCount to 1
13 - Go to the base ListSets url again
14 - Confirm you can 'Show more' until you reach the end
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds regression tests for the behavior.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch undefines the CNsubfields variable when the whole field is requested
Note that the substr returns '' when no characters are found, so we test if the string eq ''
Testing 'truth' doesn't work because "0" is a valid option
To test:
1 - Edit a record, add an 082 field
082 0 0 ‡aalpha‡bbeta‡0delta
2 - Set itemcallnumber system preference to 082
3 - Attempt to add/edit items
4 - ISE
5 - Apply patch, restart all the things
6 - Add/edit items - no error
7 - Confirm the itemcallnumber field is populated with "alpha beta delta"
8 - Set itemcallnumber system preference to '0820'
9 - Add/edit items
10 - Confirm itemcallnumber is populated with 'delta'
Signed-off-by: Salman Ali <salman.ali@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
When we fetch the biblioitems we use a select to limit the columns fetched,
we must include the biblionumber as well
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The loop here gets items from the record, plus analytic items. Because of this
we need to check more than 1 record - we decide to do this via biblioitems.
We need to preserve that, but when checking ItemsAnyAvailableAndNotRestricted we
cannot assume that the biblionumber and biblioitemnumber are the same (they should be
but this may not be the best of all possible worlds)
I simply switch the call here
To test:
1 - Apply patch
2 - Test placing holds on single bibs and multiple bibs
3 - Confirm it works as expected
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds a maxlength attribute to the "MARC organization code"
field in the form for adding and editing libraries. The maxlength, 16,
matches the limit of the table column.
To reproduce the problem, go to Administration -> Libraries.
- Add or edit a library
- Fill the "MARC organization code" field with a string longer than 16
characters, e.g. Decriminalization
- When you save the record you will see an error.
Apply the patch and add or edit a library.
- Confirm that you cannot enter more than 16 characters in the "MARC
organization code" field.
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>
To test:
1 - Find a bib with 1 item, place 3 bib-level holds on it (just to make
sure there's at least one title on your holds ratio page)
2 - Go to the holds ratio page in circulation
3 - mouse over the Holds Ratio column, see that the number there is a
link to http://[your koha]/cgi-bin/koha/circ/reserveratios.pl#, the
page you're already on
4 - apply patch, restart_all, reload page
5 - link now goes to the holds page for that title
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>
This patch moves the "Desks" link from the "Basic parameters" section to
the "Patrons and circulation" section, matching the category of the link
on the Administration home page.
To test, apply the patch and go to an administration page which includes
the left-hand navigation sidebar, e.g. Administration -> Libraries.
In the sidebar, the "Desks" link should be in the "Patrons and
circulation" section, under "Item circulation alterts," matching its
position on the Administration home page.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 28733: (follow-up) Add manage_libraries permission check
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch removes an unnecessary %s in the text built to show when
there are errors in the cataloging add item form.
To reproduce, open the add item form in cataloging and click "Add item"
without filling in all mandatory fields. You should see an alert message
that contains, "- %s 1 mandatory fields empty (highlighted)"
To test, apply the patch and return to the add item form. Now when you
save an incomplete form the message should omit the %s:
- 1 mandatory fields empty (highlighted)
https://bugs.koha-community.org/show_bug.cgi?id=28690
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>
There are two things here:
* Branches.pickup_location has a default = 1 in DB, we should not set to undef if 0
or it will be set to 1 when stored.
* The other fields are all text (varchar, mediumtext or longtext) and
can be NULL. They are correct set to NULL when a new library is created
but set to an empty string when the library is modified. That's not
consistent
Test plan:
0. Don't apply the patch
1. Create a new library, set pickup location to "No"
2. Save
=> Pickup location is set to YES
=> In DB notice that the different values you didn't fill in are set to
NULL
3. Edit the library
4. Save
=> In DB notice that the different values you didn't fill in are now set
to an empty string
5. Apply the patch, restart_all
6. Run the updatedatabase script
=> In DB all the empty string values are set to NULL
7. Repeat 1 to 4 and confirm that everything is now working as expected
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The random errors were:
03:25:39 koha_1 | # Structures begin differing at:
03:25:39 koha_1 | # $got->[0] = '10'
03:25:39 koha_1 | # $expected->[0] = '9'
and
16:36:15 koha_1 | # Structures begin differing at:
16:36:15 koha_1 | # $got->[0] = '100'
16:36:15 koha_1 | # $expected->[0] = '99'
You see it coming?
We sorted the ordernumbers alphabetically.
Test plan:
0. Don't apply this patch
1. % git checkout v21.05.01 # The error is not appearing in master right now
2. Add 2 warn statements before the 'The 2 orders are returned' tests to
display $order_1->ordernumber and $order_2->ordernumber
3. MariaDB CLI > ALTER TABLE aqorders AUTO_INCREMENT=3;
4. prove t/db_dependent/Koha/Acquisition/Orders.t
=> Fail with
# Structures begin differing at:
# $got->[0] = '10'
# $expected->[0] = '9'
5. Apply this patch, repeat 3. and 4.
=> The test passes now.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The line to use the --databases flag with mysqldump by default was accidentally
removed from koha-dump when the --schema-only option was added. This makes all
backups act as if koha-dump is called with the --without-db-name flag, causing
koha-restore to fail to restore the database because it's neither CREATEd or USEd.
This patch restores that line
To test:
1 - sudo debian/scripts/koha-dump kohadev
2 - zcat /var/spool/koha/kohadev/kohadev-2021-07-28.sql.gz | grep DATABASE
3 - Notice no output
4 - Apply patch
5 - sudo debian/scripts/koha-dump kohadev
6 - zcat /var/spool/koha/kohadev/kohadev-2021-07-28.sql.gz | grep DATABASE
7 - You get the line:
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `koha_kohadev` /*!40100 DEFAULT CHARACTER SET latin1 */;
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Revert "Bug 28585: (follow-up) Tests for q= supporting date/date-time parameters"
This reverts commit 89d9dd6d5d.
Revert "Bug 28585: Use the datetime_parser for handling API dates"
This reverts commit 2e266f35f9.
Revert "Bug 28585: Regression tests"
This reverts commit 8d74d3226a.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
# Failed test 'Returned patron from update matches expected'
# at t/db_dependent/api/v1/patrons.t line 537.
# Structures begin differing at:
# $got->{updated_on} = '2021-07-27T13:33:53+00:00'
# $expected->{updated_on} = '2021-07-27T13:33:52+00:00'
# Looks like you failed 1 test of 42.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
it fixes xgettext and (maybe) friends
[12:22:29] Error: Command failed: misc/translator/xgettext.pl --charset=UTF-8 -s -o /tmp/koha-Jaa9rf/Koha-marc-NORMARC.pot -f /tmp/koha-Jaa9rf/files
/tmp/koha-Jaa9rf/Koha-marc-NORMARC.pot at misc/translator/xgettext.pl line 387.
Use of uninitialized value in subroutine entry at misc/translator/xgettext.pl line 388.
Argument ">:encoding(utf-8)" isn't numeric in subroutine entry at misc/translator/xgettext.pl line 388.
Argument "/tmp/koha-Jaa9rf/Koha-marc-NORMARC.pot" isn't numeric in subroutine entry at misc/translator/xgettext.pl line 388.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
$ perl -wc Koha/I18N.pm
Subroutine Koha::I18N::LC_MESSAGES redefined at Koha/I18N.pm line 36.
Prototype mismatch: sub Koha::I18N::LC_MESSAGES: none vs () at Koha/I18N.pm line 36.
Koha/I18N.pm syntax OK
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test:
1 - Attempt to save a record in the advanced cataloging editor
2 - It fails
3 - Apply patch
4 - It succeeds
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Throughout the file we call methods with the module
Following suit rather than importing the methods
To test:
1 - Attempt to load advanced cataloging editor
2 - it fails
3 - http://localhost:8081/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=define
4 - Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_svc_cataloguing_framework::GetMarcStructure called at /kohadevbox/koha/svc/cataloguing/framework line 18
5 - Apply patch
6 - Cataloging editor loads!
7 - Link in #3 loads!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Tests were too complex with no gain. They even deleted the whole DB to
run (inside a transaction). I refactored to test the same thing, and
make it rely (mostly) on existing data.
_count behavior is tested implicitly by comparing with Koha::*->count.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/UsageStats.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests still pass
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
This patch moves the big sysprefs list to a sub. Behavior shouldn't
change.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/UsageStats.t
=> SUCCESS: Things work as expected, no changes.
2. Sign off :-D
Signed-off-by: David Nind <david@davidnind.com>
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>
This patch makes some style and structure changes to the patron
cartegory entry form:
- Margin added to the enrollment period fieldset so that it aligns with
the rest of the form.
- Informational text inside the form wrapped in <div class="hint"> like
it is on other pages.
- Converted heading tag to legend tag in the messaging preferences
fieldset.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
Go to Administration -> Patron categories -> New category and confirm
that the style updates look good.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch enhances the display of patron attribute information on the
attribute management page.
To test, apply the patch and go to Administration -> Patron attribute
types.
- If necessary, add multiple patron attributes so that there is data to
display. Include:
- Some which are mandatory
- Some which are linked to an authorized value category
- Some which share a class.
- The tables showing your attributes should each have DataTables
sorting and controls (except for column configuration, which isn't
added by this patch).
- Confirm that DataTable controls work correctly for each table.
- The table should include columns showing authorized value category
and whether the attribute is mandatory.
- If you are logged in as a user with permission to manage
authorized values, the data in the authorized value category
column should be linked to that category on the authorized values
page.
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>
This patch makes it possible to link directly to the correct panel on
the "Update patron records" page. The link on the checkout and patron
details screen has been updated to read "Patron has pending
modifications."
Also changed: Moved the "Patron's address in doubt" message so that it
is above the table of changed fields.
To test, apply the patch and if necessary submit patron modification
requests from multiple patrons via the OPAC.
- Open the checkout page for one of these patrons.
- If you are logged in as a user with permission to edit patron
records you should see a message, "Pending modifications: Review
pending modifications," which links to the pending modifications
page.
- Clicking the link should open the page for reviewing pending
patron modifications, and the correct panel should be
automatically expanded.
- If you are logged in as a user without permission to edit patrons
you should see the message "Pending modifications: Patron has
pending modifications," which isn't linked.
- The process should work exactly the same from the patron detail page.
- Following the "Pending modifications" link from the staff interface
home page or the patrons home page should work as before: The page
opens with the first panel expanded.
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>
The while statements were including the next statement, I add brackets to make it
more obvious
Also the highlighting was applying to [[borrowernumber|Borrow number]
I removed the break to match code above and only highlight when syntax complete and correct
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds some additional configuration to CodeMirror so that
column placeholders have a distinct color in the CodeMirror SQL editor.
To test, apply the patch and create or edit an SQL report which contains
one or more column placeholders, e.g. [[itemnumber|Item number]],
[[borrowernumber|Borrower number]], etc.
Confirm that when editing the SQL, these placeholders should appear as
red text. Save your report and view it. The syntax highlighting should
be updated in this view too.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 15253 originally had the ability to specify the incoming IP address used for
a given log statement via SIP, as well as the SIP2 account that was in use at the time.
This data is very helpful for debugging purposes, and should be brought back.
Test Plan:
1) Apply this patch
2) Update you SIP ConversionPattern to "[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n"
3) Restart SIP
4) Use the SIP cli tester to make some SIP requests
5) View the SIP2 log, note the account id and client ip address show in the log!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>