Short description of issue
The ‘aggregated_update’ property of line item in the Order Printer app is wrong
Reproduction steps
- Create an order
- Make > 1 edit to a single line in that order (i.e. add 3 of units, then remove 2 units)
- Create a template using the Order Printer app that uses the line_item.aggregated_update property
- View the output of the template
Additional info
The ‘aggregated_update’ property is meant to aggregate any line item updates (as listed in the ‘item_updates’ property (an array) on the line item object in the Order Printer app.
However, if multiple updates are made, ‘aggregated_update’ is simply the last of those updates. For example, with a line with original quantity of 15, if I add 5 units in 1 edit, then remove 1 unit in a subsequent edit, then ‘item_updates’ is an array of length 2 with entries:
“Removed 1 of 20”
“Added 5”
However ‘aggregated_update’ (which I would expect to say something like ‘Added 4’ (15 + 5 - 1 = 19, 19 - 15 = +4 units), it simply says:
“Removed 1 of 20”
Which isn’t the aggregated value at all.
What type of topic is this
Bug report