AJAX error thrown: SyntaxError: Unexpected token < in JSON at position 0

Manu Mishra June 4, 2018

unable to submit issue collector with google chrome. Getting error "Oops! Something went wrong...
AJAX error thrown: SyntaxError: Unexpected token < in JSON at position 0
Don't worry though! We've logged this problem and will look into it soon!"

SAMPLE SCRIPT:::

<script type="text/javascript" src="https://xxxxxxxx/x/xxxxxxxxxxxxxxxxxxxxxxxxx/en_US-ohbd0p/64029/10/1.4.27/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=ea7c0a44"></script>
    <script type="text/javascript">window.ATL_JQ_PAGE_PROPS =  $.extend(window.ATL_JQ_PAGE_PROPS, {
	'ea7c0a44' : {        
		triggerFunction : function( showCollectorDialog ) {
		$('#nabutton').on( 'click', function(e) {
			e.preventDefault();
			showCollectorDialog();
		}); 
	},
		fieldValues: {
			'customfield_10005' : 'BUSCPT-10450'	,
			'customfield_10062' : '10092',
			summary : 'Put summary here',
			description : 'More info...',
 			priority : '3'	}
	},
	'76d20135' : {        
		triggerFunction : function( showCollectorDialog ) {
		$('#brbutton').on( 'click', function(e) {
			e.preventDefault();
			showCollectorDialog();
		}); 
	},		
		fieldValues: {
			'customfield_10005' : 'BUSCPT-60' ,
 			'customfield_10062' : '10092'
		}
	},
	'bc654984' : {        
		triggerFunction : function( showCollectorDialog ) {
		$('#labutton').on( 'click', function(e) {
			e.preventDefault();
			showCollectorDialog();
		}); 
	},		
		fieldValues: {
			'customfield_10005' : 'BUSCPT-58' , 			
			'customfield_10062' : '10092'
		}
	},
	'4c25b938' : {        
		triggerFunction : function( showCollectorDialog ) {
		$('#notused').on( 'click', function(e) {
			e.preventDefault();
			showCollectorDialog();
		}); 
	},		
		fieldValues: {
			'customfield_10005' : 'BUSCPT-59', 						
			'customfield_10062' : '10092'

		}
	},
	'7b292210' : {        
		triggerFunction : function( showCollectorDialog ) {
		$('#pacebutton').on( 'click', function(e) {
			e.preventDefault();
			showCollectorDialog();
		}); 
	},		
		fieldValues: {
			'customfield_10005' : 'BUSCPT-61', 						
			'customfield_10062' : '10092'
 
		}
	}
});</script>

ERROR MSG:::

issue collector error.JPG

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 5, 2018

Hi Manu,

Your error looks identical to the one discussed in this ticket: https://jira.atlassian.com/browse/JRASERVER-29170

In that case, it is possible to recreate this error in an issue collector when the workflow for the project this issue would be created in, has an additional workflow validator or condition that is not being met by the issue collector.

It tends to happen when you have a 3rd party plugin to Jira that can do a field validation on a custom field, and in turn that specific field is not being included to this issue collector form.

I would go into the project where these issues are expected to be created, and then edit the workflow for those issues in order to understand what validators or conditions might exist in this workflow.

Alternatively, see if you can create an issue via Jira for this project, and see what fields have to be completed for this issue type in that project in order to create an issue, and then make sure those fields exist in the issue collector.

Manu Mishra June 5, 2018

@Andy Heinzer Thanks for your response. As i see there is validation applied on create function req fields (cfEpicLink; cfInitiative; cfInitiativeForStory). However these fields are not present when setting up issue collector 
issue collector fields.JPGso i am note sure how can i add these fields to form?

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 6, 2018

Not all fields will be available on an issue collector.  For this reason, it's instead recommended to adjust the workflow validators for that project so that these issues can still be created.

Suggest an answer

Log in or Sign up to answer