-
-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: export packaging data #8359
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but a comment to add, if possible.
{ | ||
$j++; | ||
if (defined $packaging_ref->{$field}) { | ||
my $field_sort_key = sprintf("%08d", $group_number * 1000 + $i * 10 + $j); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment to explain this $field_sort_key ?
(also above).
also why don't you use $field_sort_key . "_$j" like on line 272 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a comment a bit above:
# %populated_fields will contain the field name as the key,
# and a sort key as the value so that the CSV columns are in the order of $options{import_export_fields_groups}
my %populated_fields = ();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add another comment for packagings:
# Generate a sort key so that the packaging fields in the CSV file are in this order:
# - all fields for packaging component 1, then all fields for packaging component 2
# - number_of_units, shape, material etc. (same a for loop above)
Kudos, SonarCloud Quality Gate passed! |
This PR is needed to export packagings data from the producers platform to the public platform.