Download & Extend

Rules email notification not working properly when bulk changing order status

Project:Ubercart
Version:7.x-3.x-dev
Component:Orders
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi,

I found little bug. I have default rule for sending notification emails when order status is changed:

<?php
{ "uc_order_update_email_customer" : {
   
"LABEL" : "Poslať email so správou o zmene objednávky",
   
"PLUGIN" : "reaction rule",
   
"REQUIRES" : [ "rules", "uc_order" ],
   
"ON" : [ "uc_order_status_email_update" ],
   
"IF" : [
      {
"NOT data_is" : { "data" : [ "order:order-status" ], "value" : "in_checkout" } }
    ],
   
"DO" : [
      {
"uc_order_email" : {
         
"order" : [ "order" ],
         
"from" : "Biolinea Acai berry Thin \u003Cinfo@acaiberrythin.sk\u003E",
         
"addresses" : "[uc_order:email]",
         
"subject" : "Order #[uc_order:order-number] Update",
         
"message" : "[uc_order:first-name] [uc_order:last-name], \u000D\u000A\u000D\u000AStatus Vašej objednávky čislo [uc_order:link] v [store:name] bol zmenený. \u000D\u000A\u000D\u000ANový status: [uc_order:order-status]\u000D\u000A\u000D\u000AKomentár: [uc_order:last-comment] \u000D\u000A\u000D\u000ANa prezretie detailov Vašej objednávky kliknite na tento odkaz: [site:login-link] \u000D\u000A\u000D\u000A\u000D\u000AĎakujeme.\u000D\u000AS pozdravom,\u000D\u000A\u000D\u000A[store:name] \u000D\u000A[site:slogan]",
         
"format" : "filtered_html"
       
}
      }
    ]
  }
}
?>

It is not possible for me to select updated-order in data selector.

When I bulk change order status with views bulk operation set order status email is sent but with old order status. When I change status in order detail (not bulk) everything works correctly.

Could you please look at this?

Comments

#1

Could somebody please look into this? Thanks!

#2

Status:active» needs review

Please test the attached patch.

AttachmentSizeStatusTest resultOperations
1833152-bulk-update-order-email-status.patch550 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 2,685 pass(es).View details

#3

Status:needs review» reviewed & tested by the community

I think it works properly now. Thank you, longwave!

#4

Status:reviewed & tested by the community» fixed

Committed, thanks for testing.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here