Otherwise the same itemnumber can appear several times in the array.
It could be moved to its own bug but this is only code cleaning it
seems, there is no impact on the UX
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch makes an adjustment to the style of .btn-link controls
associated with the holdings table. I've also updated the markup of the
other controls so that they match the updated batch controls.
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
The way the "Delete selected items" and "Modify selected items" links
are build on the bibliographic detail page is not nice. We could do
better, for instance using a proper form element instead of building an
URL.
Test plan:
Go to the detail page of a bibliographic record which has several items.
In the items table check some checkboxes and play with "select all",
"clear all" and the action buttons.
Notice that everything works as before.
Minor UI regression that must be fixed: there are CSS rules that cause
problem. When the action links are displayed or hidden the table is
moving up and down.
I think the problematic rules are:
.btn {
padding: 6px 12px;
font-size: 12px;
}
It makes the UI better if I remove them but still get the bumping
issue.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch the staff interface's bibliographic detail page, adding a tab
that shows comments submitted by users from the OPAC.
To test, apply the patch and restart services.
- If necessary, enable the "OPACComments" system preference and submit
some comments in the OPAC.
- In the staff interface, locate the title you submitted comments on.
- The bibliographic detail page should show a "Comments" tab with a
count of the number of all comments (approved and unapproved).
Sponsored-By: Athens County Public Libraries
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
We preserve the existing logic of this bug and add another case
for when we just encounter expired bookings.
In that case we render the fieldset without the 'filtered' class and
determine the value of filter_expired in bookings.js by the class being set.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This allows access by the bookings-tab and the expired_filter click handlers
which are both required for the state change to work.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds the 'Show completed' filter toggle option to the
bookings display tab on both the patron details and circulation pages.
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
These cumalation of patches introduce a new patron page on the OPAC: "My virtual card." This page and its contents are reliant on the system preferences 'OPACVirtualCard' and 'OPACVirtualCardBarcode'. OPACVirutalCard determines whether the virtual card page is even displayed on the OPAC whereas OPACVirtualCardBarcode selects the type of barcode to display on this page (if page is displayed). Currently, the virtual card page consits of a patron image (if available), the patron's barcode, and the library name. A potential follow up would be to allow customization of this page. The barcode generation is handled by a new library bwip-js.
To test:
1) Apply patch, updatedatabase, restart_all, build yarn
2) In system preferences, search for 'OPACVirtualCard'. Both this and the barcode sys. pref should show up with the same search. Notice they are dependent on one another. The default for the first pref should be "Don't allow". Leave this as is for now.
3) Leave the preference page open and log into the OPAC. Visit the user page. Notice that the navbar on the left consiting of 'Summary', 'Charges', etc. looks the same.
4) Go back to the sys. pref page and set the OPACVirtualCard to "Allow"
5) Also in the sys. prefs, make a search for "patron images" and set 'OPACpatronimages' to "Show" and 'patronimages' to allow.
6) Visit the patron's page that you used to sign in to the OPAC. Add a patron image if there is not one already.
7) Now, edit their details and change their card number to '00012345678905'
8) Venture back to the OPAC patron page. Refresh this and you should see a new "My Virtual Card" page at the bottom.
9) Click this page and you should see a new virtual card for you patron, consiting of their image, a barcode, and their library.
10) Open the dev tools for your browser and switch to vieiwing in mobile mode. Make sure the card looks good. This would likely be the most common use case.
11) Switch back to a system preference page and try playing around with the 'OPACVirtualCardBarcode'. Note that these changes affect the type of barcode that is display in the virtual card page. If you selected a barcode format that is incompatible, an error message should display in the virtual card page.
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
bwip-js is the chosen library for generating and displaying barcodes in the OPAC. It allows for many different barcode types and customizable settings. This patch created a new directory and file for the js library code to live as well as updating the about.tt to give credit.
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch corrects two instances of RESERVED_WAITING to RESERVE_WAITING
Test plan:
1) Navigate to system preferences and search for AllowItemsOnHoldCheckoutSCO
2) Observe from the description that the correct status code is RESERVE_WAITING
3) Search the repository for RESERVED_WAITING - you should find two instances, one in Checkouts.pm and one in checkout.js
4) Apply patch
5) Repeat step 3 - there should be 0 instances
Signed-off-by: Lucas <lchirlias@ville-roubaix.fr>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
These routines ultimately need to be moved to the Koha namespace, for now though,
we can reduce look ups during import and batch modification by caching the values
here for each request
To test:
1 - prove -v t/db_dependent/ClassSources.t
2 - Import some records with items, confirm cn_sort values correctly built
3 - Edit some items, confirm cn_Sort correclty built
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
When viewing patron checkouts table from details or circulation page, overdue checkouts
are preselected for renewals and the overdue dates are bolded and red. This patch will enable
also preselecting checkouts that are due on the current day. The due dates for these checkouts
will be bolded but not red.
Test plan:
1) See/create a patron with several checkouts: overdue, due today and due later.
2) Note that only the overdue checkouts have a checkmark on Renew column when loading the table.
3) Apply patch.
4) Load the checkouts table again. Note that now also the checkout due today has a preselected renewal
checkmark and the due date has been bolded.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test (k-t-d):
1) Enable ILLModule and install FreeForm, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Checkout 24.05.x branch, run:
cd /kohadevbox/koha/Koha/Illbackends/FreeForm
git checkout 24.05.x
3) Create a new ILL request from:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl
4) Confirm the request creation works as before
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>
If you have AllowReturnToBranch enabled and you check in an item which
is disallowed by the preference (returned at the wrong branch, for
instance) You get a "Cannot check in" modal.
Previously clicking the "OK" button in this form triggered JS which is
supposed to submit a form. However, all the button needs to do is
dismiss the modal. The form and the "approve" class on the button are
removed by this patch.
NOTE: This patch contains indentation changes.
To test, apply the patch and set the AllowReturnToBranch system
preference to "only at the library that the item is from."
- Locate an item belonging to another library and check it out to a
patron.
- Check in the item.
- You should see a modal confirmation, "Cannot check in".
- Clicking the "OK" button should dismiss the modal window without
triggering a reload of the page.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test, run the following test file a couple times until it fails:
prove t/db_dependent/Koha/Object/Mixin/AdditionalFields.t
My testing this failed around 50% of the time so it should not take
long to reproduce. I believe this is because the order of the array
elements may differ.
Apply this patch and run the test file again many times. It should
never fail.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
1) Follow any of the above test plans to add some
additional_field_values entries
2) Run the following SQL:
update additional_field_values set value = '';
3) Run updatedatabase twice. Notice the first time it tells you how many
entries were removed. The 2nd time it does nothing.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
using immediately invoked function expression
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Most definitely a copy paste error. I've tested and retested this
particular JS piece of code, works as intended before and after removing
this badly copy pasted code. I'm surprised this wasn't causing a console
error.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit also ensures any existing '0' value additional fields are
kept if batch editing and submitting the input empty
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This now allows for value '0' for an additional field (repeatable or
not).
This still does not allow for an empty '' field in additional fields.
This is consistent with borrower patron attributes, i.e. if you submit
an empty borrower patron attribute entry, it does not store it as empty.
Additionally, if you have a value in a borrower patron attribute but
then submit the form with that field as empty, it gets deleted from the
database.
I agree not being able to save the value '0' is a blocker, but not the
empty.
For consistency sake I'm keeping this as is, I don't see a use-case
where a row with an empty field value is preferred over it not existing.
If we allow for '' values of additional fields, the 'clear' button for
repeatable fields would have to remove the input instead of clearing the
value (or else how would the user remove repeatable fields entries?).
If this is done, it's inconsistent with the repeatable fields from
patron attribute types, as in that instance the 'clear' button only
removes the input contents, not the input element itself.
prove t/db_dependent/Koha/Object/Mixin/AdditionalFields.t
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan:
prove t/db_dependent/Koha/Object/Mixin/AdditionalFields.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan, k-t-d:
Preparation: Create additional fields for table 'accountlines:credit',
visit:
/cgi-bin/koha/admin/additional-fields.pl?tablename=accountlines%3Acredit
2 text fields, one repeatable, one not-repeatable
2 AV fields, one repeatable, one not-repeatable
1) Add a new manual credit for admin borrower:
/cgi-bin/koha/members/mancredit.pl?borrowernumber=51
2) Set the mandatory "Amount" input (e.g. '5'). Click the 'Next' and
press 'Ok' on the alert box.
3) Fill in all additional fields, click the '+New' and 'Clear' links,
hit 'Save'
4) On the table, click "Details" for the for account line we just
created.
5) Notice the additional fields are there, repeated fields are comma
separated.
6) Repeat the above test plan, but for accountlines:debit instead,
visit:
/cgi-bin/koha/admin/additional-fields.pl?tablename=accountlines%3Adebit
7) To add a manual invoice, visit:
/cgi-bin/koha/members/maninvoice.pl?borrowernumber=51
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan, k-t-d:
Preparation: Create additional fields for table 'subscription', visit:
/cgi-bin/koha/admin/additional-fields.pl?tablename=subscription
2 text fields, one repeatable, one not-repeatable
2 AV fields, one repeatable, one not-repeatable
2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field
942$c
Attempt to create a repeatable MARC field (get or set). Notice you're
unable to.
1) Add a new serial subscription, visit:
/cgi-bin/koha/serials/subscription-add.pl
2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and
press 'Ok' on the alert box.
3) Fill in all required fields and press "Test prediction pattern"
4) At the bottom, fill in all additional fields, click the '+New' and
'Clear' links, hit 'Save'
5) Notice the fields are shown, repeated fields are comma separated
6) Repeat steps 1-4 to create a second subscription
7) Visit serials home and hit "Search":
/cgi-bin/koha/serials/serials-home.pl
8) Check the checkboxes next to the 2 subscriptions and click "Edit
selected serials"
9) Input some values in the additional fields section, click the '+New'
and 'Clear' links, hit 'Save'
10) Verify that both subscriptions now have the new values form the
batch edit.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan, k-t-d:
Preparation: Create additional fields for table 'subscription', visit:
/cgi-bin/koha/admin/additional-fields.pl?tablename=subscription
2 text fields, one repeatable, one not-repeatable
2 AV fields, one repeatable, one not-repeatable
2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field
942$c
Attempt to create a repeatable MARC field (get or set). Notice you're
unable to.
1) Add a new serial subscription, visit:
/cgi-bin/koha/serials/subscription-add.pl
2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and
press 'Ok' on the alert box.
3) Fill in all required fields and press "Test prediction pattern"
4) At the bottom, fill in all additional fields, click the '+New' and
'Clear' links, hit 'Save'
5) Notice the fields are shown, repeated fields are comma separated
6) Click Edit -> Edit Subscription, repeat steps 4 and 5
7) Go back to subscription additional fields, set all fields as
searchable
8) Visit serials-home: /cgi-bin/koha/serials/serials-home.pl
9) Click 'Search'
10) Notice the searchable fields now show in their columns, repeated
fields separated by comma
11) Perform a search using a repeatable field, verify it all works as
expected.
-- Subscription Claims --
Preparation:
1) Define a new claim notice, visit:
/cgi-bin/koha/tools/letter.pl?op=add_form&module=claimissues
2) Input code, name, click "Email" set a "Message subject" and put
something in the message body. Hit 'Save'.
3) Set a serial as late, visit our original subscription:
/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=1
4) Click "Edit serials" and status -> "Late". Hit "Save".
5) Link the original subscription to the existing vendor, visit:
/cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=1
6) Click "Search for a vendor". Hit "Ok". Hit "Choose". Save the
subscription.
Claims:
7) Visit claims:
/cgi-bin/koha/serials/claims.pl
8) Click "Ok"
9) Verify that searchable additional fields all have their respective
column. Repeated fields are shown comma separated.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Added fixme comment to invoices.tt, the search works so nothing to do
here, but the code is not DRY
Test plan, k-t-d:
Preparation: Create additional fields for table 'aqinvoices':
2 text fields, one repeatable, one not-repeatable
2 AV fields, one repeatable, one not-repeatable
1) Add a new invoice for an existing vendor, visit:
/cgi-bin/koha/acqui/parcels.pl?booksellerid=1
2) Input something in the mandatory "Vendor invoice" field.
3) Fill in all additional fields, click the '+New' and 'Clear' links,
hit 'Save'
4) Search for invoices, visit:
http://localhost:8081/cgi-bin/koha/acqui/invoices.pl
5) Click "Search" on the left column of the page
6) Click the invoice we just created. Verify all the fields show
correctly.
7) Go back to the additional fields configuration, set all additional
fields as "searchable"
8) Return to http://localhost:8081/cgi-bin/koha/acqui/invoices.pl
9) Perform some searches using the additional fields values.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan, k-t-d:
Preparation: Create additional fields for table 'aqorders':
2 text fields, one repeatable, one not-repeatable
2 AV fields, one repeatable, one not-repeatable
2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field
942$c
Attempt to create a repeatable MARC field (get or set). Notice you're
unable to.
1) Add a new order for an existing basket, with an existing record,
visit:
/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=1&basketno=1&biblionumber=76
2) Set the mandatory "Koha item type" for the item. Click the 'Add item'
button below.
3) Notice the accounting details now have quantity:1
4) Set the mandatory "Fund" input in accounting details.
5) At the bottom, fill in all additional fields, click the '+New' and
'Clear' links, hit 'Save'
6) In the orders table shown, click "Modify". Notice all the fields are
presented correctly in the edit form.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan, k-t-d:
Preparation: Create additional fields for table 'aqbasket':
2 text fields, one repeatable, one not-repeatable
2 AV fields, one repeatable, one not-repeatable
1) Add a new basket, visit:
/cgi-bin/koha/acqui/basketheader.pl?booksellerid=1&op=add_form
2) Fill in name and all additional fields, click the '+New' and 'Clear'
links, hit 'Save'
3) Notice the basket screen shows repeated fields separated by comma.
4) Notice that only non-null additional fields labels are shown.
5) Edit the basket. Notice all fields are shown as expected.
Additional testing:
Having a repeatable field with multiple instances, go back to the
additional fields configuration and make the additional field
non-repeatable again. Edit the basket again. Notice the multiple text
instances are still shown, but the '+New' link no longer shows.
You're able to remove existing multiple instances, but unable to add new
ones, this is because the field is no longer repeatable.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
get_additional_field_values_for_template method
New method to be utilized for retrieval of additional fields of any
class that implements it.
This is to be used when additional_fields are needed to be sent to .tt
files for renderering. Both for form entries and read-only 'show' pages.
Template files:
Updated additional-fields-entry.inc:
Now considers entry of repeatable fields.
Repeatable text fields will have a "+New" link to allow for adding of a
new instance of a repeatable field.
Repeatable AV fields will be shown as checkboxes instead of a dropdown
Update additional-fields-display.inc
When displaying non-editable additional-fields, multiple instances for
each field are now considered.
Label now only shows if field has a non-null value in it.
Option to show value_only
Option to set if its to be displayed on a table cell
Update histsearch.tt and filter-orders.inc
Now calls additional-fields-entry.inc with search_form=1 to prevent
repetable "+New" controls from showing on search inputs.
additional-fields-entry.js
New JS asset to be called by template files who require
additional-fields-entry.inc for repeatable fields controls.
This also handles the need for having the marcfield of type
'get' submitted if it is a disabled dropdown (AV marc field)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
There is now a new 'repeatable' checkbox when configuring
(adding or editing) an additional field for a specific table.
It is also displayed in a column in the additional fields panel
for a given tablename.
MARC fields are not allowed to be repeatable.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>