Notification pop up for issue creation does not automatically disappear.

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Low
    • None
    • Affects Version/s: 10.2.0, 10.3.0
    • Component/s: Accessibility
    • 10.02
    • 1
    • Severity 3 - Minor

      Issue Summary

      In Jira 10.2.x and 10.3.x, the notification pop up for issue creation does not disappear automatically. This is inconsistent with the notification pop up for issue edit in the same version (which disappears automatically).

      Steps to Reproduce

      1. Set up Jira 10.2.x or 10.3.x
      2. Create an issue

      Expected Results

      The notification pop up will show up at the top right, and will disappear automatically after a few seconds.

      Actual Results

      The notification pop up will show up at the top right, but will not disappear automatically after a few seconds.
      In 10.3.x, the issue creation notification pop up is missing the aui-will-close class.

      10.3.x - issue creation:

      <div class="aui-message closeable aui-message-success">Issue <a class="issue-created-key issue-link" data-issue-key="SCRUM-25" href="/jira/browse/SCRUM-25">SCRUM-25 - Test Issue 1</a> has been successfully created.<button type="button" class="aui-close-button" aria-label="Close"></button></div>
      

      10.3.x - issue edit:

      <div class="aui-message closeable aui-message-success aui-will-close">SCRUM-25 has been updated.<button type="button" class="aui-close-button" aria-label="Close"></button></div>
      

      Workaround

      • Close the pop up window manually, OR
      • Refresh the page, OR
      • Access different page, OR
      • Add this to the announcement banner which will hide the notification after 1000ms (this is unsupported customization, script is provided as is)
        <script type="text/javascript">
        function autocloseCreateNotification(loadEvent) {
            url = loadEvent.currentTarget.responseURL;
            if (url !== null && url !== undefined && url.indexOf("/QuickCreateIssue.jspa") >= 0) {
                waitToAutocloseCreateNotification();
            }
        };
        
        // Wait 1000ms for the AUI notification to pop up before deleting it.
        function waitToAutocloseCreateNotification() {
            window.setTimeout(function() {
                auiContainer = document.getElementById('aui-flag-container');
                if (auiContainer !== null) {
                    auiNotifications = auiContainer.getElementsByClassName('aui-flag');
                    for (let auiNotification of auiNotifications) {
                        if (auiNotification.getAttribute('aria-label').indexOf('has been successfully created') >= 0) {
                            auiNotification.remove();
                        }
                    }
                }
            }, 1000);
        }
        
        // The impacted notification banner appears when an issue is created via a subrequest, so we need to override XMLHttpRequest after loading each subrequest.
        var defaultXMLHttpRequest = window.XMLHttpRequest;
        function modifiedXMLHttpRequest() {
            var XHR = new defaultXMLHttpRequest();
            XHR.addEventListener("load", autocloseCreateNotification);
            return XHR;
        }
        window.XMLHttpRequest = modifiedXMLHttpRequest;
        </script>
        

            Assignee:
            Unassigned
            Reporter:
            Aqqiela (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: