Koha/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing
Paul Derscheid ef803755f5
Bug 32418: Can't call method 'unblessed' on an undefined value at cataloguing/additem.pl
Check whether the current op is edititem or dupeitem and if so check
whether the itemnumber supplied as a query param actually exists.

If it doesn't, redirect to the additem op and hide all UI elements except
for a dialog that gives options to add a new item to the record or to
view the records holdings.

This behaviour was adapted from the addbiblio view, as suggested by
Fridolin.

To test:
1. Go to any record
2. Hit the edit button on an item in the holdings table
3. Modify the URL so that the query param for the itemnumber is either
    3.1 empty: /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=
    3.2 an itemnumber that doesn't exist:
      /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=9999999999
    3.3 whatever else you come up with..
4. Check the same thing for the dupe option (op=dupeitem)
5. Sign off

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-14 11:35:20 -03:00
..
value_builder Bug 32567: (QA follow-up) Fix some labelling inconsistencies 2023-02-07 15:30:32 -03:00
addbiblio.tt Bug 33148: Use template wrapper for breadcrumbs: Cataloging 2023-04-06 09:29:25 -03:00
addbooks.tt Bug 33148: Use template wrapper for breadcrumbs: Cataloging 2023-04-06 09:29:25 -03:00
additem.tt Bug 32418: Can't call method 'unblessed' on an undefined value at cataloguing/additem.pl 2023-04-14 11:35:20 -03:00
cataloging-home.tt Bug 33148: Use template wrapper for breadcrumbs: Cataloging 2023-04-06 09:29:25 -03:00
concerns.tt Bug 31028: (follow-up) Remove special:undefined 2023-03-07 14:54:38 -03:00
editor.tt Bug 33148: Use template wrapper for breadcrumbs: Cataloging 2023-04-06 09:29:25 -03:00
linkitem.tt Bug 33148: Use template wrapper for breadcrumbs: Cataloging 2023-04-06 09:29:25 -03:00
merge.tt Bug 33148: Use template wrapper for breadcrumbs: Cataloging 2023-04-06 09:29:25 -03:00
moveitem.tt Bug 33148: Use template wrapper for breadcrumbs: Cataloging 2023-04-06 09:29:25 -03:00
z3950_auth_search.tt Bug 32072: Consistent classes for primary buttons: Cataloging 2022-11-11 16:52:33 -03:00
z3950_search.tt Bug 32299: Add page-section to Z39.50 results 2022-11-23 09:29:07 -03:00