Skip to content

Commit

Permalink
Fix --inject-id-prefixed in export, improve help.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Feb 28, 2025
1 parent bbbed78 commit edca2e6
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/RecordManager/Base/Command/Records/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public function iterateRecordsCallback($record): bool
$this->addXmlNode($xml, $this->injectId, $id);
}
if ($this->injectIdPrefixed) {
$this->addXmlNode($xml, $this->injectId, $record['_id']);
$this->addXmlNode($xml, $this->injectIdPrefixed, $record['_id']);
}
if ($this->injectCreationTimestamp) {
$this->addXmlNode(
Expand Down Expand Up @@ -509,16 +509,6 @@ protected function configure()
"Whether to include dedup id's in exported records. Supported"
. ' values: <comment>deduped</comment> = if duplicates exist, <comment>always</comment> = always. '
. " Default is to not include the dedup id's."
)->addOption(
'inject-id',
null,
InputOption::VALUE_REQUIRED,
'Inject record ID without source prefix to the given XML field'
)->addOption(
'inject-id-prefixed',
null,
InputOption::VALUE_REQUIRED,
'Inject record ID with source prefix to the given XML field'
)->addOption(
'inject-created',
null,
Expand All @@ -529,6 +519,18 @@ protected function configure()
. ' (e.g. <comment>\'custom:elem/subelem[@type="some"]\'</comment>). Additional'
. ' namespace prefixes can be defined with the <info>--add-namespace</info>'
. ' parameter.'
)->addOption(
'inject-id',
null,
InputOption::VALUE_REQUIRED,
'Inject record ID without source prefix to the given XML field'
. ' (see <info>--inject-created</info> for more information)'
)->addOption(
'inject-id-prefixed',
null,
InputOption::VALUE_REQUIRED,
'Inject record ID with source prefix to the given XML field'
. ' (see <info>--inject-created</info> for more information)'
)->addOption(
'inject-date',
null,
Expand Down

0 comments on commit edca2e6

Please sign in to comment.