| Summary: | Adding subfield without field in addbiblio.pl | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Nuño López Ansótegui <nunyo.lopez> |
| Component: | Cataloging | Assignee: | Nuño López Ansótegui <nunyo.lopez> |
| Status: | Failed QA --- | QA Contact: | Testopia <testopia> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | jonathan.druart, m.de.rooy, mtompset, nunyo.lopez, veron |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 |
| Patch complexity: | --- | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: | Circulation function: | ||
| Attachments: | Bug 11200 - Adding subfield without field in addbiblio.pl | ||
Created attachment 22716 [details] [review] Bug 11200 - Adding subfield without field in addbiblio.pl Please provide a more thorough description of the problem this fixes and a test plan. Is this bug still valid? (In reply to Marc Véron from comment #3) > Is this bug still valid? From my quick skim of the code, I think maybe so. If you have z3950NormalizeAuthor, z3950AuthorAuthFields, and UNIMARC... and you lack a biblio.author field, as defined in marc_subfields_structure tagfield and subtagfield, in the record, then $field never gets defined. If it isn't defined, I would expect $field->add_subfields() to explode. Lowering severity as we do not have a test plan to recreate the problem. |
In addbiblio.pl, subfield is adding but don't check if field exist. if ($title) { # $field->add_subfields("$subfield"=>"[ ".ucfirst($title).ucfirst($firstname)." ".$number." ]"); $field->add_subfields( "$subfield" => ucfirst($title) . " " . ucfirst($firstname) . " " . $number ); } else { # $field->add_subfields("$subfield"=>"[ ".ucfirst($firstname).", ".ucfirst($lastname)." ]"); $field->add_subfields( "$subfield" => ucfirst($firstname) . ", " . ucfirst($lastname) ); }