Bug 14369: Only show 'Create labels' link on staged records import when status is...
authorKatrin Fischer <katrin.fischer.83@web.de>
Sun, 12 Apr 2020 22:06:05 +0000 (22:06 +0000)
committerJoy Nelson <joy@bywatersolutions.com>
Thu, 7 May 2020 21:50:13 +0000 (21:50 +0000)
commitac162468290f24cdc105f8848740a52c805dd481
tree0c512286b473efbf77e4059ccd1e66a205188440
parent8cbe6a740ceb9d1529da6cc9ae8ff681d8f924fd
Bug 14369: Only show 'Create labels' link on staged records import when status is imported

The label creator won't be able to add a batch for items, if they are
not imported into the database (missing itemnumber). This patch hides
the link, when the status is not imported, to avoid the error situation.

To test:
- Export a record with items from your Koha installation
- Delete items and record from Koha
- Stage the record with the items - the "Create labels" link should be showing
- Try to create the labels - note error
- Apply patch
- Retry - the link should no longer show
- Import the records - the link should show now
- Create labels again - a new batch should have been created
- Verify the link on the batch # leads to the batch in the labels module

Bonus: Moves the message from the .pl file to the template to make
it translatable.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
tools/manage-marc-import.pl