Commit graph

1276 commits

Author SHA1 Message Date
2e6a4a555b
Bug 36376: (QA follow-up) Tidy
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-04 15:24:31 +02:00
841dc00ec8
Bug 36376: Display library limitations alert in patron's messages
Bug 31422 added a warning message when library limitations issue in patron edition page.
We should add this patron's messages in circ and details pages.
Like age limitations.

Test plan:
1) User's login branch and home library is: Centerville
2) Patron category "B - Board" is limited to Franklin
3) Edit a patron with Board category from Centerville
4) A message appears "The patron's current category (Board) is limited to other libraries."

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-04 15:24:30 +02:00
47ccb3165c
Bug 36302: members-home.pl defers loading, member.pl does not
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-03 09:53:31 +02:00
10eb5e46a0
Bug 36368: (QA follow-up) Remove unneeded line
As Emmy stated on comment9, this line is indeed unneeded (and wrong).
A successful cud-insert/cud-save does not come here.
And it is set for add_form, edit_form and duplicate later on.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-02 17:59:09 +02:00
Emmi Takkinen
dac285957d
Bug 36368: Declare template param "op" after variable $op is set
If an error occurs while adding new patron, after fixing the error and
hitting save, patron entry page reloads to "Modify patron" section
and error "Patron not found. Return to search" is displayed. But no
patron is saved.

This happens because we declare template param op too early in the
code and it receives value "cud-insert" instead of "add_form" as it should.

To test:
1. Add new patron and cause an error (wrong age etc.).
2. Attempt to save patron, error message is displayed.
3. Fix your errors and attempt to save again.
=> Error message "Patron not found. Return to search" is displayed and new
patron is not saved to database.
4. Apply this patch.
5. Repeat steps from 1 to 3.
=> Saving patron should now work.
=> To be save, test if modifying patron also works as it should.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-02 17:59:08 +02:00
d0c8c8796c
Bug 35279: Add fallback to print for 'Send welcome email'
We update the 'Send welcome email' button to read 'Send welcome notice'
and add a fallback to enqueue a notice for print when the user doesn't
have an email address defined.

Test plan
1) Apply patch
2) Use the 'Henry Acevedo' user who doesn't yet have a valid email
   address.
3) Click the 'Send welcome notice' button available from the 'more'
   menu.
4) Note that no notice is queued at all.
5) Copy the content of the 'email' WELCOME notice into the 'print'
   template.
5) Repeat step 3.
6) Note that this time a 'print' type notice is queued for the user.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 15:47:36 +01:00
571521ba13
Bug 36321: Problem when dateexpiry in BorrowerUnwantedField
hen dateexpiry is in BorrowerUnwantedField it is hidden in patron edition form.
The problem is when editing an existing patron the value is re-computed with category settings, as if it where empty.

This comes from all fields in BorrowerUnwantedField beeing removed from %newdata in memberentry.pl.
Whe must skip dateexpiry.

Test plan :
1) Be sure dateexpiry is not in BorrowerUnwantedField
2) Define a patron category with enrollment period 12 month
3) Create a new patron in this category
4) Its expiration date is in now + 12 month
5) Edit the patron category to set enrollment period 6 month
6) Add dateexpiry in BorrowerUnwantedField
7) Edit the patron and save
=> Without patch the expiration date is changed to now + 6 month
=> With patch the exporation date is unchanged

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Perl-tidied.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 10:35:21 +01:00
34a3c3b8f6
Bug 36302: Get rid of defer_loading in patron-search
Same test plan as the other patch, behavior is expected to be the same on both

But this alternative removes technical debt, whereas the other patch adds.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-20 18:39:41 +01:00
bb6ce70399
Bug 35331: (QA follow-up): Patron ILL history
With the previous patches applied and successfull test plans, access the users ILL history page, visit:
/cgi-bin/koha/members/ill-requests.pl?borrowernumber=51

Notice you get an error.
Apply this patch, and try again, notice the error is gone and the custom plugin action is also in the patron's ILL history table

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 11:03:35 +01:00
Hammat Wele
9ee8d21b26
Bug 26597: (Fix) remove REST API call and retrieve the patron's data from borrower_data input
This patch remove the REST API call in select_user function and retrieve the patron's data from borrower_data

To test:
1) Apply patch
2) Search PrefillGuaranteeField preference and make sure some fields are selected
3) Select a user that can have a guarantor
4) In the edit form, click on "Search to add" in "Patron guarantor" fieldset
5) Choose a patron who has at least one of the fields in 1) set
6) Click Select
7) Confirm guarantee's information is filled from the guarantor's record
8) Check that any preexisting information is not overwritten

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 11:03:32 +01:00
Hammat Wele
b9e4b88d32
Bug 26597: Fixing the populate of fields when using the REST API route
This attachment correct the populate of fields by using the api mapping.
Now All fields are populated following the selected PrefillGuaranteeField options

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 11:03:31 +01:00
Hammat Wele
d3822c7d86
Bug 26597: Transfer informations from guarantor when adding a guarantor to an existing patron
When creating a new guarantee from the guarantor, the preference PrefillGuaranteeField dictates some fields to be transfered from guarantor to guarantee. This patch makes it so those informations are also transfered when adding a new guarantor relationship to an existing patron.

To test:
1) Apply patch
2) Search PrefillGuaranteeField preference and make sure some fields are selected
3) Select a user that can have a guarantor
4) In the edit form, click on 'Search to add' in 'Patron guarantor' fieldset
5) Choose a patron who has at least one of the fields in 1) set
6) Click 'Select'
7) Confirm guarantee's information is filled from the guarantor's record
8) Check that any preexisting information is not overwritten

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 11:03:30 +01:00
e701926442
Bug 36190: Fix problems found by test
opac-shelves           - forms were stateless - changed to GET
sco-main               - forms stateless - changed to GET
                         ** untested because sco + auth is broken
smart-rules.tt         - JS form template - added placeholder 'cud-' op
ill-requests           - added cud- tp ops
                         ** tested comments, but not checkout, simple changes
boraccount             - removed repeated op - updated script
patroncards/edit-batch - add placeholder 'cud-' op
patroncards/manage     - add placheholder 'cud-' op
elasticsearch/mappings - separate forms - this could use a style follow-up, but makes more sense separate I think
reports/dictionary      - stateless - changed to GET
guided_reports_start    - stateless - changed to GET
suggestion/suggestion   - add placeholder 'cud-' op
inventory               - filed bug 36305, needs more handling

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>
2024-03-15 09:38:54 +01:00
Shi Yao Wang
ac71adbd23
Bug 35911: Make archived suggestions not show in patron's account
Remove archived suggestions in patron's account page

Test plan:
1. Go to a patron's account in the staff interface
2. Go to the Suggestions tab
3. Click New purchase suggestion and create a suggestion
4. In another browser tab, go to Acquisitions > Suggestions
5. Click the small arrow next to the edit button to the right of the suggestion, and choose Archive (alternatively, check the suggestion's box and click Archive selected)
   --> Suggestion disappears from the suggestions management page (OK)
6. Go back to the tab with the patron's account and refresh
   --> Suggestion is still visible
7. Apply the patch
8. Redo step 6 and notice the suggestion is not visible anymore
9. Redo step 4 and 5 but this time, unarchiving the suggestion
10. Redo step 6 and notice the suggestion is back

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-08 18:58:23 +01:00
cd9de702e2
Bug 36170: Wrong error variable in memberentry
It is hidding an important error.

$@ is never set here, we need $_ (inside a try-catch)

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-07 16:36:46 +01:00
a15f32ec9b
Bug 35329: Move patron search to modal - remove members/search.pl
git grep members/search.pl
should not return any results

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:01:15 +01:00
f03b7ce0d0
Bug 34478: Manual fix - remove cud from members/search
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 11:00:14 +01:00
c0c581c5ee
Bug 34478: Manual fix - add cud- op - alert-subscriptions.pl
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:46 +01:00
33380209e9
Bug 34478: Remove warnings from members/memberentry.pl
Use of uninitialized value $op in string eq at /kohadevbox/koha/members/memberentry.pl line 86.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:43 +01:00
76aac9b301
Bug 34478: Fix name of CGI variable
'$query->param' in this script should be '$input->param'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:38 +01:00
7947f7872b
Bug 34478: Fix various parameters on housebound details page
This patch converts the delivery delete buttons to a form and changes
the corresponding op check in the script.

The patch also fixes an error in the form markup and corrects the op
parameter name in several links.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:37 +01:00
1825c93fe4
Bug 34478: Add notes to pay.pl
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:31 +01:00
20d22f17be
Bug 34478: Add cud-pay and cud-writeoff to paycollect
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:30 +01:00
adbe4f0d90
Bug 34478: Add op to pay_individual
I also move the writeoff handling out of it's own block in into the rest
of the x_individual handling.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:29 +01:00
9b1e34fb9f
Bug 34478: Move writeoff-individual to paycollect.pl
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:28 +01:00
5a333e3cfa
Bug 34478: Use op and cud in pay -> paycollect redirect
The pay to paycollect post/redirect flow here doesn't actually
consistute a state change, however it's much simpler to add the csrf
token check flow here than to refactor the code to a get (url's quickly
grow too large for a GET) or rework it in other ways.  I opted to do
this for now and work on a refactor at a future date.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:59:19 +01:00
bc2bb89930
Bug 34478: (follow-up) Remove check_csrf from pl files
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:58:41 +01:00
84922d4ad9
Bug 34478: Changes for members/member-flags
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:46 +01:00
7bd78700cf
Bug 34478: Manual fix - add op - members/housebound
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:31 +01:00
0a92c55c7e
Bug 34478: Manual fix - add op - members/maninvoice
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:31 +01:00
1244fffa9c
Bug 34478: Manual fix - add op - members/mancredit
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:30 +01:00
f731a19676
Bug 34478: Manual fix - add op - members/member-password
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:29 +01:00
44949a88ea
Bug 34478: Manual fix - add op - members/discharge
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:27 +01:00
7f25a1a131
Bug 34478: op =~ ^cud- in pl/pm - Manual cud-email => email
Wrong replace of 'email' in a lot of places.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:14 +01:00
e8d02c58d2
Bug 34478: Add missing op - members-update
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:04 +01:00
c790129c7d
Bug 34478: Rename action with op - mod_debarment
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:03 +01:00
dd5f3701ce
Bug 34478: op modify=>edit_form, add=>add_form - memberentry.pl
Bug 34478: TO SQUASH op modify=>edit_form, add=>add_form ( pass opadd to template )- memberentry.pl

The template expects opadd when showing the form - along the way it was changed to 'add' and broke new patron
entry

Bug 34478: TO SQUASH op modify=>edit_form, add=>add_form ( pass op to template )- memberentry.pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:02 +01:00
6870eb5329
Bug 34478: op=modify should be op=add_form - memberentry.pl
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:01 +01:00
fc781b238e
Bug 34478: actionType parameter not used - memberentry.pl
Bug 34478: [TO SQUASH] actionType parameter not used - memberentry.pl

syntax error at members/memberentry.pl line 103, near "\|"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:57:00 +01:00
b78641fd2f
Bug 34478: Rename action with op - members/boraccount
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:57 +01:00
0e1239e93b
Bug 34478: Manual fix - fix ops and method - deletemem
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:41 +01:00
9f99265f34
Bug 34478: Manual fix - Rename action with op change to post - merge-patrons
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:40 +01:00
1a98ef7584
Bug 34478: Manual fix - account payout
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:16 +01:00
b92e9a2115
Bug 34478: Manual fix - memberentry (modify)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:13 +01:00
18e808240f
Bug 34478: op =~ ^cud- in pl/pm
This is the result of
  bash op_must_start_with_cud-perl.sh

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:11 +01:00
314fe71ff8
Bug 34478: Remove check_csrf from pl files
We should no longer need to check CSRF token from pl files

TODO - there is a change for some files where we returned 403

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:56:01 +01:00
7e7159bf58
Bug 34478: Remove generate_csrf from pl
We do not longer need to generate_csrf from pl files

TODO - members/boraccount.tt and sco/sco-main.tt needs to be adjusted

Bug 34478: [TO SQUASH] Remove generate_csrf from pl

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2024-03-01 10:55:56 +01:00
Thibaud Guillot
fc75a344b8
Bug 30230: Add new 'list_borrowers' permission
When a patron search is performed only a user with edit_borrowers
permission can search by name. Search can works only with cardnumber but
it makes searching less intuitive I think.

So, as mentioned in the discussion, I've added a new 'list_borrowers' permission,
completely independent of 'edit_borrowers', so that I can search for a member via the interface
and get the results. In addition to the permission to perform check in and checkouts, this no longer poses an obstacle to simple use.

Test plan:

1) Check with a user without 'edit_borrowers' permission that the patron search can only be performed with cardnumber
2) Apply this patch
3) Make the updatedatabase to add new 'list_borrowers' permissions
4) Set 'list_borrowers' permission on one user and see the difference

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-01-29 12:25:08 +01:00
f83b9ab1ff
Bug 30287: Conditionally render notice preview
This patch adds conditional formatting based on whether the notice was
generated from an HTML template or a plaintext one. We simply drop the
'html_line_break' filter for the case where the notice should already be
html formatted.

I was tempted to replace the html_line_break for plaintext formatted
notices too as I believe this closer resembles how we actually output
such generated notices.. but I decided that should be for another bug.

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>
2023-12-19 13:42:10 +01:00
b0c4bc3623
Bug 12133: (QA follow-up) Tidy for qa script
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-11-10 10:59:42 -03:00