Bug 36832 - Adding authority records is broken
Summary: Adding authority records is broken
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low blocker
Assignee: Emily Lamancusa (emlam)
QA Contact: Testopia
URL:
Keywords:
Depends on: 36791
Blocks:
  Show dependency treegraph
 
Reported: 2024-05-10 15:44 UTC by Katrin Fischer
Modified: 2024-11-14 14:38 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.06,23.05.12
Circulation function:


Attachments
Bug 36832: (bug 36791 follow-up) Allow authid=0 (1.01 KB, patch)
2024-05-10 18:08 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review
Bug 36832: (bug 36791 follow-up) Allow authid=0 (1.40 KB, patch)
2024-05-10 18:57 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 36832: (bug 36791 follow-up) Allow authid=0 (1.06 KB, patch)
2024-05-10 18:58 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 36832: (bug 36791 follow-up) Allow authid=0 (1.45 KB, patch)
2024-05-10 19:01 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 36832: (bug 36791 follow-up) Allow authid=0 (1.51 KB, patch)
2024-05-11 19:03 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2024-05-10 15:44:51 UTC
We get a 404 after opening a blank authority record and using Z39.50 to try to import a record and after manually filling out the form and submitting.
Comment 1 Phil Ringnalda 2024-05-10 17:21:50 UTC
That's the patch from bug 36791 which failed to realize that z3950_auth_search.pl passes back ?authid=0 when it isn't replacing an existing authority.
Comment 2 Katrin Fischer 2024-05-10 18:05:46 UTC
Thanks Phil!
Comment 3 Emily Lamancusa (emlam) 2024-05-10 18:08:53 UTC
Created attachment 166592 [details] [review]
Bug 36832: (bug 36791 follow-up) Allow authid=0

To test:
1. Go to the Authorities module and do a Z39.50 search that will return
   results (e.g. a general subject heading)
2. Import an authority record from the results
--> Confirm that the record is imported into the editor
Comment 4 Emily Lamancusa (emlam) 2024-05-10 18:12:01 UTC
Thanks, Phil! Give it a try with the above patch
Comment 5 Phil Ringnalda 2024-05-10 18:57:39 UTC
Created attachment 166604 [details] [review]
Bug 36832: (bug 36791 follow-up) Allow authid=0

To test:
1. Go to the Authorities module and do a Z39.50 search that will return
   results (e.g. a general subject heading)
2. Import an authority record from the results
--> Confirm that the record is imported into the editor
3. Authorities > New, replace it via Z39.50, confirm it's imported
4. Authorities > New, fill the required fields, confirm it saves
5. Edit an existing authority, replace it via Z39.50, confirm it saves
6. Edit an existing authority, replace authid=nn in the URL with a
   number that doesn't exist like 1000000, confirm you get a 404 page

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 6 Janusz Kaczmarek 2024-05-10 18:58:43 UTC
Created attachment 166605 [details] [review]
Bug 36832: (bug 36791 follow-up) Allow authid=0

To test:
1. Go to the Authorities module and do a Z39.50 search that will return
   results (e.g. a general subject heading)
2. Import an authority record from the results
--> Confirm that the record is imported into the editor

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Comment 7 Janusz Kaczmarek 2024-05-10 19:01:44 UTC
Created attachment 166606 [details] [review]
Bug 36832: (bug 36791 follow-up) Allow authid=0

To test:
1. Go to the Authorities module and do a Z39.50 search that will return
   results (e.g. a general subject heading)
2. Import an authority record from the results
--> Confirm that the record is imported into the editor
3. Authorities > New, replace it via Z39.50, confirm it's imported
4. Authorities > New, fill the required fields, confirm it saves
5. Edit an existing authority, replace it via Z39.50, confirm it saves
6. Edit an existing authority, replace authid=nn in the URL with a
   number that doesn't exist like 1000000, confirm you get a 404 page

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Comment 8 Phil Ringnalda 2024-05-10 19:06:43 UTC
I fleshed out the test plan because my patch to z3950_auth_search.tt to not output the silly authid=0 only fixed some cases, not all.

Colliding signoffs is a nice problem to have :)
Comment 9 Janusz Kaczmarek 2024-05-10 19:36:44 UTC
(In reply to Phil Ringnalda from comment #8)
> Colliding signoffs is a nice problem to have :)

Yes, and colliding patches--I had a patch ready, but Emily was like two minutes faster ;)

Anyway, thanks for the catch!
Comment 10 Victor Grousset/tuxayo 2024-05-11 19:03:56 UTC
Created attachment 166613 [details] [review]
Bug 36832: (bug 36791 follow-up) Allow authid=0

To test:
1. Go to the Authorities module and do a Z39.50 search that will return
   results (e.g. a general subject heading)
2. Import an authority record from the results
--> Confirm that the record is imported into the editor
3. Authorities > New, replace it via Z39.50, confirm it's imported
4. Authorities > New, fill the required fields, confirm it saves
5. Edit an existing authority, replace it via Z39.50, confirm it saves
6. Edit an existing authority, replace authid=nn in the URL with a
   number that doesn't exist like 1000000, confirm you get a 404 page

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 11 Victor Grousset/tuxayo 2024-05-11 19:04:25 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 12 Katrin Fischer 2024-05-13 08:42:35 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 13 Fridolin Somers 2024-05-22 12:53:43 UTC
Pushed to 23.11.x for 23.11.06
Comment 14 Lucas Gass (lukeg) 2024-05-23 14:17:49 UTC
Backported to 23.05.x for upcoming 23.05.12