Bug #12696

CSV term export task's culture parameter does not work as expected

Added by Dan Gillean about 3 years ago. Updated over 2 years ago.

Status:NewStart date:01/10/2019
Priority:MediumDue date:
Assignee:-% Done:


Category:CLI tools
Target version:-
Google Code Legacy ID: Tested version:2.5
Sponsored:No Requires documentation:Yes


In issue #11082, we added a task that would export a list of terms linked to descriptions in a given taxonomy. The task is documented here:

Here is the help output:

 symfony csv:export-term-usage [--application[="..."]] [--env="..."] [--connection="..."] [--items-until-update[="..."]] [--taxonomy-id[="..."]] [--taxonomy-name[="..."]] [--taxonomy-name-culture[="..."]] path

 path                     The destination path for export file(s).

 --application            The application name (default: qubit)
 --env                    The environment (default: cli)
 --connection             The connection name (default: propel)
 --items-until-update     Indicate progress every n items.
 --taxonomy-id            ID of taxonomy
 --taxonomy-name          Name of taxonomy
 --taxonomy-name-culture  Culture to use for taxonomy name lookup

As it currently functions the --taxonomy-name-culture is extremely counter-intuitive. If you have terms translated into multiple cultures, you cannot select which version to export using the --taxonomy-name-culture parameter. Instead, the only way to get terms added in another culture out with this task is to change the default installation culture in app/qubit/config/settings.yml. This is inconvenient and unclear. We should make the culture param work so users can export terms in the culture of their choosing by using this option, without having to change the installation culture.

To reproduce - Part 1

  • In a default English installation, navigate to the Subjects taxonomy
  • Flip the user interface to another culture, e.g. French (fr)
  • Add some French translations to existing terms
  • Add some new terms in French
  • Make sure that the translated and native French terms are all linked to at least one description
  • Now run the export task - example:
php symfony csv:export-term-usage --taxonomy-id="35" --taxonomy-name-culture="fr" /vagrant/french-subjects.csv
  • Examine the output

Issues encountered

  • Despite setting --taxonomy-name-culture to "fr", only English terms are exported

To reproduce - Part 2

  • Change the default installation culture in app/qubit/config/settings.yml from "en" to "fr" and save
  • Restart services, clear the application cache, and reindex
  • Run the term-usage export task again
  • Examine the output
  • Issues encountered*
  • Now French terms can be exported, but only when the entire installation culture has been changed

Expected result

  • It should be possible to export the FR terms without changing the installation culture
  • Culture fallback should be used where there are no French translations for terms created in another culture but the culture option has been set to French
  • the --taxonomy-name-culture option should be used to set the culture of the terms exported

Related issues

Related to Access to Memory (AtoM) - Feature #11082: Add CLI task for exporting terms, in a given taxonomy, th... Verified 04/18/2017


#1 Updated by Dan Gillean about 3 years ago

  • Related to Feature #11082: Add CLI task for exporting terms, in a given taxonomy, that have been associated with one or more information objects added

#2 Updated by Dan Gillean over 2 years ago

  • Requires documentation set to Yes

Marking docs required as yes, so we remember if we make changes to review the documentation for the csv:export-term-usage task (see issue #11082 for details).

Also available in: Atom PDF