Doing 'Send shipment' or 'Cancel shipment' should add a log entry to Order activity.
Issue fork commerce_shipping-3159002
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
tko commentedComment #3
thetwentyseven commentedWe needed the same functionality so I created a patch
Comment #4
jsacksick commentedwe need to put this logic in a different event subscriber, that is registered conditionally (i.e only when the commerce_log module is installed), otherwise this logic would crash.
Additionally, we need tests coverage for this logic.
Comment #5
jsacksick commentedfollowing our Slack discussion, CommerceShippingServiceProvider needs to register a new subscriber, only if commerce_log is enabled.
The subscriber can be called ShipmentLogSubscriber.
Comment #6
jsacksick commentedComment #7
jsacksick commentedAlso, let's not hardcode the link to the shipment in the log template but instead pass a
{{ shipment_url}}or something.Note that we need a Kernel test asserting that the log messages are correctly generated (See
OrderIntegrationTestunder commerce_log for an example).Let's call it
LogIntegrationTest.Comment #8
thetwentyseven commentedThank you very much for your time. I am afraid I do not have time right now to do the test. But I will try as soon as I can.
Comment #9
thetwentyseven commentedSorry forgot to import class
Comment #10
thetwentyseven commentedRelative path fix
Comment #11
anybody@thetwentyseven would you mind creating the final fix as MR? And still needs tests.
Comment #13
chizh273 commentedComment #15
chizh273 commentedI have created MR from the last patch and also have added tests.
The "PHPUnit" pipeline job failed because of FunctionalJavascript tests, the new ShipmentLogSubscriberTest was passed successfully
Comment #17
khiminrm commentedComment #18
rszrama commentedComment #20
jsacksick commented