[Koha-bugs] [Bug 8218] Add a script to sanitize entity where "&" character was wrongly replaced with "& "

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 25 16:36:13 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8218

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29795|0                           |1
        is obsolete|                            |
  Attachment #29798|0                           |1
        is obsolete|                            |

--- Comment #31 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 30120
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30120&action=edit
[PASSED QA] Bug 8218 : Add a maintenance script to sanitize biblio records

This patch adds:
- a new maintenance script batch_sanitize_records
- a new subroutine C4::Charset::SanitizeRecord
- new unit tests for the new subroutine

Test plan:
1/ prove t/db_dependent/Charset.t
2/ Create a record containing "&amp;" (could be follow with as many
'amp;' as you want) in one of its fields and the same for the field
linked to biblioitems.url.
The url should not be sanitized, it may contain "&".
3/ Launch the maintenance script with the -h parameter to see how to use
it.
4/ Launch the script using the different parameters:
 --filename=FILENAME
 --biblionumbers='XXX'
 --auto-search

The auto-search permits to sanitize all records containing "&amp;" in
the marcxml field.

Use the verbose flag for testing.
Without the --confirm flag, nothing is done.

5/ Use the --confirm flag and verify in the biblioitems.marcxml field
that the record has been sanitized.

6/ Try the --reindex flag to reindex records which have been modified.

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list