The JSM canned response button does not work on the first click and clears the comment field

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

    

Summary

The canned response feature that comes out of the box with Jira Service Management (JSM) does not behave as expected:

  • when clicking on the canned response button the 1st time
  • the 2 following issues occur:
    • the dropdown is not displayed
    • the URL in the browser URL box is automatically modified with #wiki-edit-dropdown2-cannnedresponses-wikiEdit0 being appended to it
  • however, when clicking on the canned response button the 2nd time, it works as expected: the canned response dropdown is shown:

(warning) Note that some other unexpected behavior might also occur. For example, after the page is refreshed while keeping the modified the URL in the browser, the following will happen on Chrome:

  • the 1st time we click on the canned response button, nothing will happen
  • the 2nd time we click on the canned response button:
    • The page will be automatically scrolled up
    • If there was anything written in the comment field, the comment field will be automatically cleared

Environment

Jira Service Management (JSM) Server/Data Center on 5.5.0 or any higher version.

Diagnosis

When replicating the issue while the Browser development tool is opened, the following can be observed:

  • The following error is thrown in the console tab

    batch.js?agile_global_admin_condition=true&baseurl-check-resources=true&healthcheck-resources=true&jag=true&jaguser=true&jira.create.linked.issue=true&locale=en-US&richediton=true&whisper-enabled=true:33 Uncaught TypeError: Cannot read properties of null (reading 'querySelector')
        at HTMLAnchorElement.<anonymous> (batch.js?agile_global_admin_condition=true&baseurl-check-resources=true&healthcheck-resources=true&jag=true&jaguser=true&jira.create.linked.issue=true&locale=en-US&richediton=true&whisper-enabled=true:33:285452)
        at HTMLAnchorElement.i (batch.js?locale=en-US:154:1614)
        at HTMLAnchorElement.dispatch (batch.js?locale=en-US:154:3915)
        at v.handle (batch.js?locale=en-US:154:2004)
  • when clicking on any link in the slack trace, we are directed to the batch.js script file and the line where the error is thrown. If we check the module-key, we can find the class com.topshelfsolution.simpletasklists:task-resources, which belongs to the 3rd party add-on Simple Tasklists: 

    try {
    /* module-key = 'com.topshelfsolution.simpletasklists:task-resources', location = 'react/build/static/js/common.chunk.js' */
    (this.webpackJsonptasklist=this.webpackJsonptasklist||[]).push([[1],{118:function(e,t,a){"use strict";a.d(t,"b",(function(){return f})),a.d(
    
    ....
    
    u/i7/1Ns5cdfcyVlcfeCOgjH8CAwyoWwzKYzcAAAAASUVORK5CYII="}}]);
    }catch(e){WRMCB(e)};
    ;

If we go to the page ⚙ > Manage Apps > Manage Apps and search for the add-on Simple Tasklist, it shows as incompatible:

When disabling this add-on, the issue with the canned response button goes away: the canned response button works as expected on the 1st click.

Cause

The 3rd party add-on Simple Tasklist is causing the issue with the canned response. Note at the time this page was written, this add-on is not listed as compatible with JSM 5.5.0 (Jira 9.5.0) yet, which might explain why it is causing the issue with the canned response button.

Solution

The temporary solution is unfortunately to keep the add-on Simple Tasklist disabled, until the issue gets fixed in the add-on. You might want to consider reaching out to the add-on support team via their support portal, to check if they are aware of this issue and working on a fix.

Last modified on Feb 9, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.