diff --git a/module/repo/js/linkbug.ui.js b/module/repo/js/linkbug.ui.js index f478e496a2..507e8cd465 100644 --- a/module/repo/js/linkbug.ui.js +++ b/module/repo/js/linkbug.ui.js @@ -13,11 +13,11 @@ $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer if(!checkedList.length) return; const tabType = $(this).data('type'); - const postData = []; - postData[`${tabType}[]`] = checkedList; + const postData = new FormData(); + checkedList.forEach((id) => postData.append(`${tabType}[]`, id)); $.ajaxSubmit({ url: $(this).data('url'), data: postData }); -}); \ No newline at end of file +}); diff --git a/module/repo/js/linkstory.ui.js b/module/repo/js/linkstory.ui.js index 8d2c7ce53f..b4c29b3b3a 100644 --- a/module/repo/js/linkstory.ui.js +++ b/module/repo/js/linkstory.ui.js @@ -13,8 +13,8 @@ $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer if(!checkedList.length) return; const tabType = $(this).data('type'); - const postData = []; - postData[`${tabType}[]`] = checkedList; + const postData = new FormData(); + checkedList.forEach((id) => postData.append(`${tabType}[]`, id)); $.ajaxSubmit({ url: $(this).data('url'), diff --git a/module/repo/js/linktask.ui.js b/module/repo/js/linktask.ui.js index ee7cf6a266..673f2826ff 100644 --- a/module/repo/js/linktask.ui.js +++ b/module/repo/js/linktask.ui.js @@ -13,11 +13,11 @@ $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer if(!checkedList.length) return; const tabType = $(this).data('type'); - const postData = []; - postData[`${tabType}[]`] = checkedList; + const postData = new FormData(); + checkedList.forEach((id) => postData.append(`${tabType}[]`, id)); $.ajaxSubmit({ url: $(this).data('url'), data: postData }); -}); \ No newline at end of file +}); diff --git a/module/repo/model.php b/module/repo/model.php index e7f424c2bb..9ea6ba46d0 100644 --- a/module/repo/model.php +++ b/module/repo/model.php @@ -2779,7 +2779,7 @@ class repoModel extends model } $stories = empty($storyIDs) ? array() : $this->loadModel('story')->getByList($storyIDs); $bugs = empty($bugIDs) ? array() : $this->loadModel('bug')->getByList($bugIDs); - $tasks = empty($taskIDs) ? array() : $this->loadModel('task')->getByIdList($taskIDs); + $tasks = empty($taskIDs) ? array() : $this->loadModel('task')->getByList($taskIDs); $titleList = array(); foreach($relationList as $key => $relation)