Bug 38005 - 500 error on self registration when patron attribute is set as mandatory
Summary: 500 error on self registration when patron attribute is set as mandatory
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lucas Gass (lukeg)
QA Contact: Pedro Amorim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-25 15:38 UTC by Lucas Gass (lukeg)
Modified: 2024-10-16 12:52 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 38005: Pass opac_editable to search params when interface is OPAC (2.39 KB, patch)
2024-09-25 21:27 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 38005: Pass opac_editable to search params when interface is OPAC (2.44 KB, patch)
2024-10-07 21:20 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 38005: Pass opac_editable to search params when interface is OPAC (2.49 KB, patch)
2024-10-07 23:19 UTC, David Nind
Details | Diff | Splinter Review
Bug 38005: Pass opac_editable to search params when interface is OPAC (2.55 KB, patch)
2024-10-08 08:25 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38005: (follow-up) Add/adjust tests (3.52 KB, patch)
2024-10-11 19:20 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 38005: (follow-up) Add/adjust tests (4.15 KB, patch)
2024-10-15 15:43 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2024-09-25 15:38:15 UTC
To recreate:
1. Create a patron attribute.
2. Check it as Mandatory.
3. Do NOT make it display or editable in the OPAC. 
4. Go to OPAC self reg form
5. You will not see the attribute.
6. Submit the form and see the 500 error:

Missing mandatory extended attribute (type=MANDO) at /usr/share/perl5/Exception/Class/Base.pm line 88
Comment 1 Lucas Gass (lukeg) 2024-09-25 21:27:01 UTC
Created attachment 171956 [details] [review]
Bug 38005: Pass opac_editable to search params when interface is OPAC

1. Create a patron attribute.
2. Check it as Mandatory.
3. Do NOT make it display or editable in the OPAC.
4. Go to OPAC self reg form
5. You will not see the attribute.
6. Submit the form and see the 500 error.
7. Apply patch, restart_all.
8. Try again, now you should be able to submit the OPAC form.
Comment 2 Roman Dolny 2024-10-07 21:20:53 UTC
Created attachment 172501 [details] [review]
Bug 38005: Pass opac_editable to search params when interface is OPAC

1. Create a patron attribute.
2. Check it as Mandatory.
3. Do NOT make it display or editable in the OPAC.
4. Go to OPAC self reg form
5. You will not see the attribute.
6. Submit the form and see the 500 error.
7. Apply patch, restart_all.
8. Try again, now you should be able to submit the OPAC form.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 3 David Nind 2024-10-07 23:19:06 UTC
Created attachment 172504 [details] [review]
Bug 38005: Pass opac_editable to search params when interface is OPAC

1. Create a patron attribute.
2. Check it as Mandatory.
3. Do NOT make it display or editable in the OPAC.
4. Go to OPAC self reg form
5. You will not see the attribute.
6. Submit the form and see the 500 error.
7. Apply patch, restart_all.
8. Try again, now you should be able to submit the OPAC form.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Pedro Amorim 2024-10-08 08:25:32 UTC
Created attachment 172513 [details] [review]
Bug 38005: Pass opac_editable to search params when interface is OPAC

1. Create a patron attribute.
2. Check it as Mandatory.
3. Do NOT make it display or editable in the OPAC.
4. Go to OPAC self reg form
5. You will not see the attribute.
6. Submit the form and see the 500 error.
7. Apply patch, restart_all.
8. Try again, now you should be able to submit the OPAC form.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 5 Katrin Fischer 2024-10-11 08:57:41 UTC
Should we add a note about the change in the code? It might cause confusion later on.
Comment 6 Katrin Fischer 2024-10-11 09:15:41 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 7 Katrin Fischer 2024-10-11 10:22:51 UTC
I am sorry, but this breaks the tests:
t_db_dependent_Koha_Patron_t.extended_attributes

Please fix urgently, lots of enh waiting.
Comment 8 Lucas Gass (lukeg) 2024-10-11 19:20:03 UTC
Created attachment 172702 [details] [review]
Bug 38005: (follow-up) Add/adjust tests
Comment 9 Nick Clemens (kidclamp) 2024-10-15 15:43:02 UTC
Created attachment 172784 [details] [review]
Bug 38005: (follow-up) Add/adjust tests

NC amended patch, tidied
Bug 38005: (QA follow-up) Tidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Katrin Fischer 2024-10-16 12:37:28 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 11 Pedro Amorim 2024-10-16 12:51:42 UTC
(In reply to Katrin Fischer from comment #10)
> Pushed for 24.11!
> 
> Well done everyone, thank you!

Removing additional_work_needed as the tests have been fixed.
Comment 12 Katrin Fischer 2024-10-16 12:52:52 UTC
(In reply to Pedro Amorim from comment #11)
> (In reply to Katrin Fischer from comment #10)
> > Pushed for 24.11!
> > 
> > Well done everyone, thank you!
> 
> Removing additional_work_needed as the tests have been fixed.

D11 just died... so I am hopeful, but not sure what's going on there...