From 1d600ede32841ae09c1e9efbb0b145ea92f1dcca Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Fri, 25 Jun 2021 16:29:59 +0800 Subject: [PATCH] * Adjust import to asset lib. --- module/story/model.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module/story/model.php b/module/story/model.php index 903ffc4e3f..94de7798d3 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3291,6 +3291,12 @@ class storyModel extends model if($action == 'batchcreate' and $story->type == 'requirement' and $story->status != 'closed') return $story->status != 'draft'; if($action == 'batchcreate' and ($story->status != 'active' or $story->stage != 'wait')) return false; + if($action == 'importtolib') + { + $hasExisted = $app->dbh->query("select id from " . TABLE_STORY . " where fromStory=$story->id and fromVersion=$story->version")->fetch(); + if($hasExisted) return false; + } + return true; }