[Rt-commit] rt branch 5.0/detect-attachments-from-session created. rt-5.0.2-12-g81df3375c7
BPS Git Server
git at git.bestpractical.com
Tue Dec 14 17:37:38 UTC 2021
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/detect-attachments-from-session has been created
at 81df3375c7dd9286e10eecc62331d0a12d2e81fe (commit)
- Log -----------------------------------------------------------------
commit 81df3375c7dd9286e10eecc62331d0a12d2e81fe
Author: Brian Conry <bconry at bestpractical.com>
Date: Tue Dec 14 11:27:49 2021 -0600
Suppress warning when session attachments exist
Previously toggleAttachmentWarning didn't detect attachments that were
uploaded in the current session for the current action but before the
current page load. If the text contained a trigger word for an
attachment, and was not otherwise suppressed, this would cause the page
to display a warning to the user: "It looks like you may have forgotten
to add an attachment". This could be triggered in several ways on
ticket creation and update.
Fixes: T#228792
diff --git a/share/static/js/util.js b/share/static/js/util.js
index 5c0c7fc18f..1111f5777a 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -429,6 +429,7 @@ function AddAttachmentWarning() {
var needsWarning = text &&
text.match(regex) &&
!dropzoneElement.hasClass('has-attachments') &&
+ !jQuery('a.delete-attach').length &&
!has_reused_attachments;
if (needsWarning) {
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list