Problem/Motivation
The ubercart order status migration is done using the static_map process plugin. The current map does not have a mapping for the ubercart status 'post_checkout', which in the text fixture has two labels, 'Pending' and 'Processing'.
Are there other statuses? Do we know if other modules add others?
The defaults, from the test fixture are:
Title | State | Canceled | canceled |
---|---|
Completed | competed |
In checkout | in_checkout |
Payment | payment_received |
Pending | post_checkout |
Processing | post_checkout |
Proposed resolution
Because of the default value in the static_map process plugin, 'processing' is being converted to 'draft'. let's pull that out and make it explicit, which is in line with the other value that is being converted to draft. It may just save someone a moment wondering why 'processing' is not in the list.
Yes, it could just be commented and both values removed from the static map. It just seems clearer to add all the standard order statuses to the map.
There is more detail in #6
Remaining tasks
Write a patch
review
commit
Comment | File | Size | Author |
---|---|---|---|
#6 | 2886644-6.patch | 475 bytes | quietone |
Comments
Comment #2
quietone CreditAttribution: quietone commentedComment #3
quietone CreditAttribution: quietone commentedIt seems I left the IS half finished. This is really about what to do for the 'post_checkout' status.
Comment #4
swickham CreditAttribution: swickham at Acro Commerce commentedIt looks like like they're already mapped to be set to the Validation status which makes sense as that status is meant for any orders still waiting on some admin approval or whatever other kind of verification needs to be met. I'm looking at the d6_ubercart_order.yml file though, where are you looking?
Comment #5
quietone CreditAttribution: quietone commentedBeen a while since I looked at this, so starting at the beginning.
The test db has the following order_status_ids and states:
The current process for the state is:
From this it is clear that the static_map is using the order_status_id as the source information and ignoring the value of the state.
Then there is the order table which uses the order_status_id. The state values as given in the first table, uc_order_status, do not appear in any field of the order table. Again, it seems that only the order_status_id is to be migrated.
However, uc_order_statuses has 6 non testing status ids and the static map only has 5. The value 'processing' is ignored. But the process has a default value of 'draft'. Therefore a Ubercart order_status_id of 'processing' will be converted to 'draft'. That seems reasonable. Is that correct?
If it is, or it should be a different value, it would be better to have it explicit in the map and remove any confusion about why it is being treated differently than the other order_status_ids.
Comment #6
quietone CreditAttribution: quietone commentedSo a simple one line fix to make it explicit that 'processing' is migrated to 'draft'.
Comment #7
quietone CreditAttribution: quietone commentedThere is an existing test for an order with an order_status_id of 'processing' that is converted to 'draft'. It is order_id 4, see here http://cgit.drupalcode.org/commerce_migrate/tree/modules/ubercart/tests/...
So this wee fix is good to go.
Update the IS
Comment #8
heddnIS is clear. Fix makes sense.
Comment #10
heddn