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)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 21 Apr 2020 11:28:56 +0000 (12:28 +0100)
commit4a2cc4e9039dbeeb77d776ff8ae1099aa84fde30
tree1840f928b5d1f7d6a632fbc2e4aa06edd05bff10
parente94ea221df93bb0bcbc3a2e90b4b8ff5daab761a
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>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
tools/manage-marc-import.pl