Hi,
Anyone can confirm (or) let me know the issue with AP.jira.WorkflowConfiguration API which we observed recently in our app. When installing the app in new cloud instances we are getting issues like the below in the browser console, while viewing the post functions.
all.js:16 [Simple-XDM] Unexpected token u in JSON at position 0 SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse () at https://csot-stage.dts-bobswift.appfire.app/ui/updateissue-view.fa39ddf3dcdbe5384207.js:78:123030 at b.d._handleResponse (https://connect-cdn.atl-paas.net/all.js:63:99) at b._receiveMessage (https://connect-cdn.atl-paas.net/all.js:21:77)
The issue arises because this API(AP.jira.WorkflowConfiguration) was not calling on async componentDidMount() and at execution time onSave function was skipped to save the config object. Due to this while loading post functions in the workflow, we are getting the below error
"all.js:16 [Simple-XDM] Unexpected token u in JSON at position 0 SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse ()"
async componentDidMount() {
await postEvent();
AP.jira.WorkflowConfiguration.onSave(function() {
const { config } = _that.state;
return JSON.stringify(config);
});
}