JIRA Incoming Email Handler Cannot be Created

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

Problem

When attempting to create an incoming mail handler, after selecting the mail server and specifying which folder JIRA should create issue from as well as the option on how to handler emails (Create new issues always, create new issue and update existing, e.t.c) when the user presses Next, they would have the continuous spinning icon without the expected pop-up to configure which project, issue type, e.t.c that the email handler is for.

The following appears in the browser Console error

Uncaught TypeError: Cannot read property 'get' of undefined
    at child.setSelectedId (batch.js?healthcheck-resources=true&is-server-instance=true&is-system-admin=true&locale=en-US&nps-a…:1435)
    at child.changeSelected (batch.js?healthcheck-resources=true&is-server-instance=true&is-system-admin=true&locale=en-US&nps-a…:1488)
    at HTMLSelectElement.dispatch (batch.js?locale=en-US:5012)
    at HTMLSelectElement.eventHandle (batch.js?locale=en-US:4621)
    at Object.trigger (batch.js?locale=en-US:4890)
    at HTMLSelectElement.<anonymous> (batch.js?locale=en-US:5549)
    at Function.each (batch.js?locale=en-US:2340)
    at init.each (batch.js?locale=en-US:1951)
    at init.trigger (batch.js?locale=en-US:5548)
    at child.setSelectedId (batch.js?healthcheck-resources=true&is-server-instance=true&is-system-admin=true&locale=en-US&nps-a…:1503)

When you click on the batch.js script link, it would redirect you to the following:

;;/* module-key = 'com.atlassian.jira.jira-mail-plugin:edit-handler-details-page', location = 'javascript/views/issue-types-view.js' */
define('jira/mail/views/issue-types-view', ['jira/mail/views/options-view', 'jquery'], function(OptionsView, jQuery) {
    return OptionsView.extend({
        setSelectedId: function(issueTypeId) {
            var selectedType = this.collection.find(function(type) {
                return type.get("id") == issueTypeId;
            });
            this.model.set({
                "issueTypeId": selectedType.get("id")
            });

Diagnosis

Diagnostic Steps

  • Query your JIRA instance database to ensure that the default issue type scheme has values in it:

    select * from optionconfiguration where fieldconfig = '10000';

Cause

The problem is caused when your JIRA instance does not have any values associated with the default  issue type scheme.

Workaround

  1. Shutdown JIRA

    Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  2. Re-associate back the issue types to default issue type scheme:

    insert into optionconfiguration (id,fieldid,optionid,fieldconfig,sequence) values ('10306','issuetype','10000','10000','0');
    insert into optionconfiguration (id,fieldid,optionid,fieldconfig,sequence) values ('10307','issuetype','10001','10000','1');
    insert into optionconfiguration (id,fieldid,optionid,fieldconfig,sequence) values ('10308','issuetype','10002','10000','2');
    insert into optionconfiguration (id,fieldid,optionid,fieldconfig,sequence) values ('10304','issuetype','10003','10000','3');
    insert into optionconfiguration (id,fieldid,optionid,fieldconfig,sequence) values ('10305','issuetype','10004','10000','4');
  3. Restart JIRA.

 

Last modified on May 17, 2017

Was this helpful?

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