]> git.pld-linux.org Git - packages/rt.git/commitdiff
- rel 3; fix upstream bug 33027 auto/th/rt-4.4.2-3
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 30 Jan 2018 14:40:29 +0000 (15:40 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 30 Jan 2018 14:40:29 +0000 (15:40 +0100)
rt-bug-33027.patch [new file with mode: 0644]
rt.spec

diff --git a/rt-bug-33027.patch b/rt-bug-33027.patch
new file mode 100644 (file)
index 0000000..4d7064b
--- /dev/null
@@ -0,0 +1,59 @@
+commit db6ef53164cc03d9e696f21664da0c092617b4bd
+Author: Shawn M Moore <shawn@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();
diff --git a/rt.spec b/rt.spec
index 42c2bb46e6b18325bb0fc1a31cdc5a2e01fe6fe0..12a9418f1064502b13ed1452c20a7ab8c804d134 100644 (file)
--- 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
 
This page took 0.075112 seconds and 4 git commands to generate.