Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT} Added a html filter for qa tools..
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adjusts the link to cancel jobs to be submitted as a POST with cud-cancel operation
To test:
1 - Stop your long tasks bacground jobs worker
sudo koha-worker --stop --queue long_tasks kohadev
2 - Stage a file for import
3 - Administration -> Manage jobs
4 - See your new job
5 - Click 'cancel'
6 - It didn't work
7 - Apply patch
8 - Browse to jobs again
9 - Click 'Cancel'
10 - Job is successfully cancelled
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Default to KohaAdminEmailAddress if ReplytoDefault is not set
Test plan:
1. Enter a valid email address into ReplytoDefault and
KohaAdminEmailAddress sysprefs
2. Apply patch and restart services
3. Generate a file on your Koha server. Place it in /tmp/test.mrc
4. Manually connect to the SFTP remote host and accept the hostkey
5. Enter Koha shell
6. Run the sftp_file.pl command-line script
./sftp_file.pl --host <your remote hostname> --user <your user> --pass <your password> --upload_dir <your upload directory> --file /tmp/test.mrc --email <your email>
7. Confirm the SFTP was successful
8. Confirm that the email that you received has a from address matching the
ReplytoDefault syspref
9. Empty out the ReplytoDefault syspref and repeat steps 5 and 6
10. Confirm that the new email you received has a from address matching
the KohaAdminEmailAddress syspref
Sponsored-by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
On "Bug 36640: Remove fnAddFilters" I assume that it was only used for
debounce. But actually it was used on this table to add filtering.
This patch adjusts how we deal with the filters on this table, reusing
the standard "add_filters" and "filters_options" parameters of
KohaTable.
It also passes the DT object allowing to use DT's api. Here it is
useful to retrieve the data in the column.
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Might have been broken by the bootstrap 5 upgrade, but not sure.
Not sure why the click does not trigger the modal.
1. Place an order in acquisitions
1.1. Go to Acquisitions
1.2. Click 'Search' next to 'Search vendors'
1.3. Click 'Add to basket' next to 'My basket'
1.4. Search for an existing record (e.g. search for Shakespeare)
1.5. Click 'Add order' next to a result or in the detailed record
1.6. In the item form, choose an item type
1.7. Click 'Add item'
1.8. Choose a fund
1.9. Enter a price in 'Vendor price'
1.10. Click 'Save'
1.11. Click 'Close basket'
1.12. Click 'Yes, close'
2. Receive the order
2.1. Click 'Receive shipments'
2.2. Enter a value in 'Vendor invoice'
2.3. Click 'Next'
2.4. Click 'Receive' next to your order
=> The modal is shown
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
A lot happened, hard to summarize everything.
Basically at this point, we have (among other things):
* fixed bug 38118 (but reintroduced it with bug 36640)
* fixed bug 38436 (the original report was that the is_hidden setting
was no longer taken into effect on the holdings tables)
Here we are trying to deal with making user's previous changes
persistent across the pagination and col vis changes.
Test plan:
Confirm that hiding checkouts in settings hide the columns
Confirm that showing checkouts then change page (*pagination*, so you need
more than 20 items) and confirm that the columns are still the same
Add a callnumber for an item from page 2 and confirm that the column is
hidden on page 1 and shown on page 2
Hide callnumber from the settings and confirm that the column is hidden
on pages 1 and 2
Show callnumber from the holdings page and confirm that the column is
displayed on page 2, go page 1: hidden, go back page 2: displayed.
And certainly way more other things to test, just confirm that the
behaviours with this patch are consistent with what a end user would
expect.
Note for QA/self: this is not very nice as column-visibility.dt event
can change in datatables.js and not impact this one.
Also the following nice sounds good and should be added to datatables.js
+ if (recalc === false) return;
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This is too complicated (at least for 24.11.00) to have everything works
in all situations.
This table has this specific "hide when empty" behaviour which
complicated how we deal with/restore the state
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
On the holdings table of the bibliographic record detail page, we have a special
behaviour: we hide columns if there is no data to display. Indeed we have a lot
of column and we want to limit the number of columns displayed.
This behaviour conflicts with "Save state": when the columns are hidden the
state is modified. If you leave the page and come back, the column will stay
hidden, even if the global settings does not have it as hidden and even if the
user didn't explicitly hide it.
We want to implement something correctly to prevent a conflict with those 2
behaviours, but 24.11.00 is coming and we need a quick fix: here we are going to
remove save state for these 2 tables.
Test plan:
Apply this patch, restart_all
Go to the tables settings admin, jump to holdings_table
Notice that "Save configuration state on page change" is turned off by default
Go to catalogue/detail.plbiblionumber=13 (item does not have call number)
=> "Call number" column is not displayed
Edit the item, set a call number
Go to catalogue/detail.plbiblionumber=13 (item has call number)
=> "Call number" column is displayed
Go to the tables settings admin, jump to holdings_table
Turn on "Save configuration state on page change"
Go to catalogue/detail.plbiblionumber=1 (item does not have call number)
=> "Call number" column is not displayed
Edit the item, set a call number
Go to catalogue/detail.plbiblionumber=13 (item does not have call number)
=> "Call number" column is still not displayed
This can be considered a bug, that why we are disabling the feature for this
table.
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: PhilipOrr <philip.orr@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch sync columns_settings.inc for the OPAC-side
It however removes 'api' from datatables.js as it is never used.
'api' was renamed 'kohaTable' on bug 29408 but OPAC was forgotten.
Better to not have to deal with this unused code for now, we will
reintroduce it if needed later.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Make it use bKohaColumnsUseNames as we are building the columns
depending on sysprefs.
Note that the hard-coded list of columns to export is wrong
exportColumns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
Must use .noExport instead.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
If the table does not have table settings we should not deal with the
column visibility and not display the 'Columns' button.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Typically the patrons search.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
If a column has no data on the items table we should hide the column.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
When the columns displayed in the table can vary (depending on sysprefs)
we use bKohaColumnsUseNames. This allows us to use the name of the
columns instead of there order number.
The code was totally wrong, and didn't retrieve the correct number.
A good example to confirm that is to add:
console.log("%s is at %s".format(this.columnname, used_id));
at the end of the `if ( use_names ) {` block of _dt_visibility.
If at least one column is hidden by default and cannot be toggled (and
so won't appear in the list of the columns of the "Column visibility" button),
there will be a shift.
This line was definitelly wrong:
var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( selector + ' th' );
We cannot rely on the order of the visible columns, we need to retrieve
the list of the columns using DT's api.
Now the columns are retrieved using their class names, and from DT's
api.
The code is way nicer and more inline with how we are supposed to play
with DT.
Look at those 2 lines to pass the list of columns to the colvis button:
let included_columns = table_settings.columns.filter(c => !c.cannot_be_toggled);
columns: included_columns.map(c => '.' + c.columnname).join(',')
Test plan:
Play intensively with the items table (detail.pl), but also with the
other tables not using bKohaColumnsUseNames (eg. patrons search)
You need to set column as hidden by default and/or cannot be toggled.
You need to play with the "Columns" button.
Note that you need to remove the localStorage keys starting with 'DataTables_'
to retrieve the visibility settings from what is defined in the admin area.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Removing the prefix holdings_ and otherholdings_
Could have been done at the code level but does not seem necessary to
have different column names
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This has been introduced by bug 33484 as we needed to know if the state
was loaded (from URL or localStorage).
If the state is loaded then we need to:
1. not redirect if only one patron to display (to prevent a blocking
situation)
2. display the table (ie. not defer loading)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
DataTable's settings do no longer allow to store custom properties.
Here we are passing bKohaColumnsUseNames to the constructor, but we
cannot retrieve it later from DT's api.
We need to store it in data().
Test plan:
0. Do not apply this patch
1. In _dt_visibility add console.log(settings.bKohaColumnsUseNames);
where relevant
2. Open your browser, clear localStorage entries (we want to reach the
set_default() code)
3. Hit http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=4
Notice that the value is true then false (displayed once per columns).
This is because we are calling _dt_visibility twice:
* with the 'settings' we passed to the constructor:
1044 [hidden_ids, included_ids] = _dt_visibility(table_settings, settings, this)
* from set_default() where we pass the settings retrieved from DT's api
900 [hidden_ids, included_ids] = _dt_visibility(table_settings, settings, $("#"+settings.nTable.id));
4. Apply this patch, console.log again and confirm that it's now true.
Notice that everything is then buggy...
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
If we don't have the "other holdings" tab, no need to try to build the
table.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
The call expects a library object, not a branchcode, likely rebasing issue
To test:
1 - Place a hold for an item at a different library than current library
2 - Check item in and confirm transfer
3 - Check item in again
4 - Kaboom!
5 - Apply patch/restart_all
6 - Check item in again
7 - Ok!
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan, ktd:
1) Generate translation files
$ gulp po:update --lang de-DE
2) Verify that strings using _() do not exist on the pot file:
$ cat -n misc/translator/Koha-messages-js.pot | grep "Copied!"
$ cat -n misc/translator/Koha-messages-js.pot | grep "Form not submitted because of the following problem"
$ cat -n misc/translator/Koha-messages-js.pot | grep "No matches found"
3) Apply patch. Repeat test plan.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch updates the used version of redocly/cli to the latest stable.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ yarn api:bundle
=> FAIL: You get
```
yarn run v1.22.22
$ redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json
╔════════════════════════════════════════════════════════╗
║ ║
║ A new version of Redocly CLI (1.25.11) is available. ║
║ Update now: `npm i -g @redocly/cli@latest`. ║
║ Changelog: https://redocly.com/docs/cli/changelog/ ║
║ ║
╚════════════════════════════════════════════════════════╝
bundling api/v1/swagger/swagger.yaml...
📦 Created a bundle for api/v1/swagger/swagger.yaml at api/v1/swagger/swagger_bundle.json 207ms.
Done in 1.34s.
```
3. Apply this patch
4. Run:
k$ sudo yarn install --modules-folder /kohadevbox/node_modules
5. Repeat 2:
=> SUCCESS: You get
```
yarn run v1.22.22
$ redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json
bundling api/v1/swagger/swagger.yaml...
📦 Created a bundle for api/v1/swagger/swagger.yaml at api/v1/swagger/swagger_bundle.json 200ms.
Done in 1.29s.
```
6. Restart plack and check the API loads without issues:
k$ koha-plack --restart kohadev; tail -f /var/log/koha/kohadev/*.log
7. Run the tests:
k$ prove -r t/db_dependent/api/
=> SUCCESS: No failures
8. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
0. APPLY PATCH
1. Have some expired patrons
2. Do a search that will return some expired patrons and some not expired.
3. Look at the 'Expires on' column.
4. The expired patrons should have an expired class set and the date should be red/italic.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
With a over-sufficient number of items, when more than one patron has
placed hold, and the holds have been partially filled (checked-in =
waiting for pick up), the number of items to pull in the Holds
to pull table shows the total number of holds, including those waiting.
This erroneously suggests to the librarian to pull an excessive number
of items from the shelves.
Test plan:
==========
1. For a bibliographic record with more than two items (in ktd, e.g.
"Lanark a life in four books"), place hold for two patrons.
2. On the Holds to pull page control that there are two items to pull.
3. As a librarian from the library of one of the patrons, Check-in one
item.
4. Note that in Holds to pull table you still see two items to pull,
which is misleading.
5. Apply the patch; restart_all.
6. Now you should see only one item to be pulled.
Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
In English, there should not be a space before an exclamation mark
in a sentence. For example, "Thank you !" is not correct.
Test plan:
1. Search the codebase for "Thank you !": grep -rn "Thank you !" *
2. Result - one occurance:
C4/SIP/ILS.pm:317: return (1, 'Thank you !', '');
3. Apply the patch.
4. Repeat step 1.
5. There should now be no occurances.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Extend patch of 135a to cover all choices with all possible values as
described by IFLA for 135a.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch add more values to selection of 135a in UNIMARC
Test Plan:
1) Add on default framework the field 135a and check the Editor option
2) Set on plugin section the value of unimarc_field_135a.pl
3) Open cataloguing editor and use 135 field tag editor to select a value
4) Apply patch
5) Open cataloguing editor and use 135 field tag editor to select a value,
after patch you have more options to select
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 37069 correctly changed OPAC authority searches from a POST to a GET, but
forgot to remove the CSRF token that is only needed for a POST, so now it
clutters up the URL by making the first 107 characters of the query string
meaningless.
Test plan:
1. Without the patch, in the OPAC, go to Authority search
2. Change the dropdowns to non-default values so you have meaningful search
conditions, and search for something that will return results, like
Topical Term/starts with/a/in any heading/Heading descendant
3. Copy the URL of your search results, paste it in an email compose window,
look at what you just pasted and wonder whether that big opaque string is
actually safe to send to a coworker. Go to lunch. Come back and wonder
what you searched for, and look at the URL in the browser to try to tell
4. Apply patch, click the browser back button, reload the page, search again
5. Copy and paste the URL, notice it looks fine to send, just a search. Look
at the URL in the browser address bar, notice that within the limits of
your window size, you can see what you searched for
Sponsored-by: Chetco Community Public Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
We shouldn't use hide() to hide the Bootstrap menu. The correct move
here is to empty the "style" attribute.
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch makes some adjustments to the JS for the Z39.50 search
results page to correct the behavior of dropdown menus. If the split
button's menu trigger is clicked a cloned version of the menu shouldn't
appear along with the default one.
To test, apply the patch and clear your browser cache if necessary.
- Go to Cataloging -> New from Z39.50.
- Perform a search which will return multiple results.
- Click any table cell in the results except the last one.
- You should get a popup menu with "MARC preview," "Card preview," and
"Import."
- Each menu item should work correctly.
- Test the button in the last column to confirm that both the "primary"
button works correctly and that the popup menu works correctly.
- Test the process of adding a new authority from Z39.50 to confirm that
the authority search results table works the same as the bibliographic
one.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
1. Set copynumber in MarcItemFieldsToOrder: copyno: 965$z
2. Have a mrc file that includes this marc field
3. Stage a mrc file for import
4. Notice the copynumber isn't correctly copied over
5. APPLY PATCH, restart_all
6. Try again, this time it should work.
Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch updates the OPACPopupAuthorsSearch feature so that it wraps
search terms with quotes. This is the behavior we have in place for
author searches outside the context of OPACPopupAuthorisSearch, e.g.
'au:"Criterion Collection (Firm)"'
To test, apply the patch and enable the OPACPopupAuthorsSearch system
preference.
- Search for a record in the OPAC which has author data containing
parentheses (it should not be a field linked to an authority record).
- View the detail page for that record.
- Click on one of the problematic author links.
- This should trigger a modal window with a list of authors and
checkboxes for each.
- With just the single checkbox checked, click "Search."
- The search should return the correct results.
- Test other author searches to confirm that they work too.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>