Details
- 
    Type:
Sub-task
 - 
    Status: Done/Fixed
 - 
    Priority:
Minor
 - 
    Resolution: Fixed/Completed
 - 
    Affects Version/s: 4.4.0
 - 
    Fix Version/s: None
 - 
    Component/s: CiviHR, Extension System
 - 
    Labels:None
 
Description
When creating a module/extension with a custom-data group, one needs to produce a file (e.g. an XML file) with a description of various CustomGroup, CustomField, OptionGroup, and OptionValue records. One can currently export all custom-data groups with bin/migrate/export.php, but the resulting XML has way too many records.
Two possible formulations:
1: drush cvapi --ij CustomGroup.export id='["IN",[1,4,7]]' return=xml > my-data.xml
2: civix generate:customxml 1,4,7
#1 requires adding more features to the drush interface – e.g. support for inlined-json arguments (--ij) and support for somehow output "print $result[xml]" instead of "print_r($result)". This seems like the more flexible option, but I'm not clear on how to make the output work.
#2 seems easier and is now the leading candidate unless someone has a clever idea for how to handle the output.
Attachments
Issue Links
- supplements
 - 
                    
CRM-13501 Add current custom-data groups to CiviHR extensions
-         
 - Done/Fixed
 
 -