[packages/rt] - rel 3; fix upstream bug 33027

arekm arekm at pld-linux.org
Tue Jan 30 15:40:37 CET 2018


commit e77a34c910a1fa5291b160afea79b23ce4e6f7e0
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Jan 30 15:40:29 2018 +0100

    - rel 3; fix upstream bug 33027

 rt-bug-33027.patch | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 rt.spec            |  4 +++-
 2 files changed, 62 insertions(+), 1 deletion(-)
---
diff --git a/rt.spec b/rt.spec
index 42c2bb4..12a9418 100644
--- a/rt.spec
+++ b/rt.spec
@@ -45,7 +45,7 @@ Summary:	Request Tracker
 Summary(pl.UTF-8):	Request Tracker - system do śledzenia zleceń
 Name:		rt
 Version:	4.4.2
-Release:	2
+Release:	3
 License:	GPL v2
 Group:		Applications
 Source0:	http://download.bestpractical.com/pub/rt/release/%{name}-%{version}.tar.gz
@@ -58,6 +58,7 @@ Source5:	lighttpd.conf
 Patch0:		%{name}-layout.patch
 Patch1:		%{name}-config.patch
 Patch2:		%{name}-perl.patch
+Patch3:		rt-bug-33027.patch
 URL:		http://www.bestpractical.com/rt/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -321,6 +322,7 @@ Pliki wspomagające używanie RT z Apache.
 %patch0 -p0
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 mv aclocal.m4 acinclude.m4
 
diff --git a/rt-bug-33027.patch b/rt-bug-33027.patch
new file mode 100644
index 0000000..4d7064b
--- /dev/null
+++ b/rt-bug-33027.patch
@@ -0,0 +1,59 @@
+commit db6ef53164cc03d9e696f21664da0c092617b4bd
+Author: Shawn M Moore <shawn at bestpractical.com>
+Date:   Fri Aug 18 17:47:41 2017 +0000
+
+    Avoid spuriously unchecking all recipient checkboxes
+    
+    This 4.4.2 regression, introduced in
+    f0a7105da8bc8f00a54bcdb5bfd48d788bbb888b and
+    4b11cf37360ad5084f6428c62553ccc6858313a7, could happen if you caused a
+    second refresh while the first one was still running. serializeArray()
+    doesn't include disabled form fields, so what the AJAX request reported
+    to the server made it look like the user had explicitly unchecked
+    recipients.
+    
+    Fixes: I#33027
+
+diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
+index 075940306..8b4ba94c2 100644
+--- a/share/html/Ticket/Update.html
++++ b/share/html/Ticket/Update.html
+@@ -217,8 +217,18 @@ jQuery( function() {
+        jQuery('#recipients div.titlebox-content').addClass('refreshing');
+        jQuery('#previewscrips div.titlebox-content').addClass('refreshing');
+ 
++       /* temporarily re-enable the checkboxes so they will be included in
++          payload */
++       jQuery("#recipients input[name=TxnSendMailToAll], #recipients input[name=TxnSendMailTo]").attr('disabled', false);
++       jQuery("#previewscrips input[name=TxnSendMailToAll], #previewscrips input[name=TxnSendMailTo]").attr('disabled', false);
++
++       var payload = jQuery('form[name=TicketUpdate]').serializeArray();
++
++       jQuery("#recipients input[name=TxnSendMailToAll], #recipients input[name=TxnSendMailTo]").attr('disabled', true);
++       jQuery("#previewscrips input[name=TxnSendMailToAll], #previewscrips input[name=TxnSendMailTo]").attr('disabled', true);
++
+        jQuery('#recipients div.titlebox-content').load( '<% RT->Config->Get('WebPath')%>/Helpers/ShowSimplifiedRecipients',
+-           jQuery('form[name=TicketUpdate]').serializeArray(),
++           payload,
+            function() {
+                jQuery('#recipients div.titlebox-content').removeClass('refreshing');
+                var txn_send_field = jQuery("#recipients input[name=TxnSendMailTo]");
+@@ -232,7 +242,7 @@ jQuery( function() {
+        );
+ 
+        jQuery('#previewscrips div.titlebox-content').load( '<% RT->Config->Get('WebPath')%>/Helpers/PreviewScrips',
+-           jQuery('form[name=TicketUpdate]').serializeArray(),
++           payload,
+            function() {
+                jQuery('#previewscrips div.titlebox-content').removeClass('refreshing');
+                var txn_send_field = jQuery("#previewscrips input[name=TxnSendMailTo]");
+@@ -244,9 +254,6 @@ jQuery( function() {
+                }
+            }
+        );
+-
+-       jQuery("#recipients input[name=TxnSendMailToAll], #recipients input[name=TxnSendMailTo]").attr('disabled', true);
+-       jQuery("#previewscrips input[name=TxnSendMailToAll], #previewscrips input[name=TxnSendMailTo]").attr('disabled', true);
+    };
+    updateScrips();
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rt.git/commitdiff/e77a34c910a1fa5291b160afea79b23ce4e6f7e0



More information about the pld-cvs-commit mailing list