The Move to Islandora Kit is an extensible PHP command-line tool for converting source content and metadata into packages suitable for importing into Islandora (or other digital repository and preservations systems).
GNU General Public License v3.0
34
stars
11
forks
source link
Issue 442 - checkconfig failure on null mappings #443
Provides a new command-line option, --ignore_null_mappings, which skips validating null0,null0-style mappings used by the InsertXmlFromTemplate metadata manipulator. Without this logic, those mappings trigger a false validation failure.
What's new?
addition to the mik script of a new command-line option, --ignore_null_mappings, which if present has a value of TRUE and if absent has a value of FALSE.
addition to the mik script of command-line help for this new option
logic within src/config/Config.php to skip validating mappings whose right-hand value starts with null if the --ignore_null_mappings option is
How should this be tested?
Changes in this PR do not have PHPUnit tests and must be smoke tested.
To show that this change has no side effects, run mik in the master and issue-442 branches with --checkconfig snippets or --checkconfig all on an .ini file that is known to pass config checks. Everything should work as it did before this PR.
Using the .ini and mappings .csv file in the attached zip file,
run ./mik -c issue-442.ini --checkconfig snippets or ./mik -c issue-442.ini --checkconfig all and you should get an error indicating that "Mapping snippet null3 appears not to be well formed."
run ./mik -c issue-442.ini --checkconfig snippets --ignore_null_mappings and you should get a message saying that "Mapping snippets are OK."
Github issue: (#442)
What does this Pull Request do?
Provides a new command-line option,
--ignore_null_mappings
, which skips validatingnull0,null0
-style mappings used by the InsertXmlFromTemplate metadata manipulator. Without this logic, those mappings trigger a false validation failure.What's new?
mik
script of a new command-line option,--ignore_null_mappings
, which if present has a value of TRUE and if absent has a value of FALSE.mik
script of command-line help for this new optionnull
if the--ignore_null_mappings
option isHow should this be tested?
Changes in this PR do not have PHPUnit tests and must be smoke tested.
master
andissue-442
branches with--checkconfig snippets
or--checkconfig all
on an .ini file that is known to pass config checks. Everything should work as it did before this PR../mik -c issue-442.ini --checkconfig snippets
or./mik -c issue-442.ini --checkconfig all
and you should get an error indicating that "Mapping snippet null3 appears not to be well formed."./mik -c issue-442.ini --checkconfig snippets --ignore_null_mappings
and you should get a message saying that "Mapping snippets are OK."Additional Notes
--ignore_null_mappings
is present, its mapping will trigger an error onsnippets
validation.Interested parties
@bondjimbond
issue-442.zip