The Export always exports with tasks even if the user selects the "User Stories..." option.
If you export a list of stories that do not contain tasks, the "filters" variable in the _exportTasks function becomes null and the waspi call for the tasks fail with no errors reported to the user.
I fixed these two issues with minimal code refactoring:
Added a _standardExport handler for the "User Stories..." option
In the _export function, I build an array of user story object ids before calling the _exportTasks function (used the code in the _exportTasks function)
I pass the array of user story object ids into the _exportTasks function after checking the array is not zero length
Found two export issues:
I fixed these two issues with minimal code refactoring:
I pass the array of user story object ids into the _exportTasks function after checking the array is not zero length
Code Updates _standardExport: function(){ this._export(false); }, _deepExport: function(){ this._export(true); }, _export: function(includeTasks) {
}, _exportTasks: function(userStories, fetch, columns, oids){
}