diff --git a/js/kanbanclasses.js b/js/kanbanclasses.js index f33a75b..fa71398 100644 --- a/js/kanbanclasses.js +++ b/js/kanbanclasses.js @@ -284,23 +284,27 @@ KanbanStory.prototype = { }, get Tasks() { - for(var iq = 0; iq < this.StorySource.custom_fields.length; iq++) { - var customField = this.StorySource.custom_fields[iq]; - if(customField.field.name == Mantis.TaskListField) { - if(this.StorySource.custom_fields[iq].value == null) { - return []; - } else { - return JSON.parse(this.StorySource.custom_fields[iq].value); + if (Kanban.UsingCustomField) { + for(var iq = 0; iq < this.StorySource.custom_fields.length; iq++) { + var customField = this.StorySource.custom_fields[iq]; + if(customField.field.name == Mantis.TaskListField) { + if(this.StorySource.custom_fields[iq].value == null) { + return []; + } else { + return JSON.parse(this.StorySource.custom_fields[iq].value); + } } } } return []; }, set Tasks(value) { - for(var iq = 0; iq < this.StorySource.custom_fields.length; iq++) { - var customField = this.StorySource.custom_fields[iq]; - if(customField.field.name == Mantis.TaskListField) { - this.StorySource.custom_fields[iq].value = JSON.stringify(value); + if (Kanban.UsingCustomField) { + for(var iq = 0; iq < this.StorySource.custom_fields.length; iq++) { + var customField = this.StorySource.custom_fields[iq]; + if(customField.field.name == Mantis.TaskListField) { + this.StorySource.custom_fields[iq].value = JSON.stringify(value); + } } } },