From 41908ac69b3bd15c74ac44311ca41f93bc73e045 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 28 Mar 2022 10:27:48 +0800 Subject: [PATCH] * Fix bug of modify index of batch create. --- module/story/view/batchcreate.html.php | 2 +- module/task/model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/story/view/batchcreate.html.php b/module/story/view/batchcreate.html.php index 61d35f5d4b..b0874ccbea 100644 --- a/module/story/view/batchcreate.html.php +++ b/module/story/view/batchcreate.html.php @@ -150,7 +150,7 @@ $(function() $select.next('.chosen-container').find('.chosen-drop').width($select.closest('td').width() + 50); }, 200); }); - var storyTitle = storyTitles && storyTitles[index]; + var storyTitle = storyTitles && storyTitles[index - 1]; if (storyTitle !== undefined && storyTitle !== null) { $row.find('.input-story-title').val(storyTitle).after(''); diff --git a/module/task/model.php b/module/task/model.php index 25c9939bb3..83ff6c9cba 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -258,7 +258,7 @@ class taskModel extends model parse_str($extra, $output); /* Judge whether the current task is a parent. */ - $parentID = !empty($this->post->parent[0]) ? $this->post->parent[0] : 0; + $parentID = !empty($this->post->parent[1]) ? $this->post->parent[1] : 0; foreach($tasks->story as $key => $storyID) {