From 65c55d042f46ff0523d6c680c4b6d9f0f09b9c23 Mon Sep 17 00:00:00 2001
From: leiyong <1549684884@qq.com>
Date: Thu, 3 Sep 2020 17:37:39 +0800
Subject: [PATCH] * Fix bug#3395,bug#3394,bug#3393,bug#3392.
---
module/issue/control.php | 1 +
module/issue/model.php | 9 ++-
module/issue/view/bugform.html.php | 83 +---------------------------
module/issue/view/resolve.html.php | 1 +
module/issue/view/storyform.html.php | 52 ++---------------
module/issue/view/taskform.html.php | 45 +--------------
module/programplan/model.php | 6 +-
7 files changed, 21 insertions(+), 176 deletions(-)
diff --git a/module/issue/control.php b/module/issue/control.php
index 0e2e8974f2..203e524295 100644
--- a/module/issue/control.php
+++ b/module/issue/control.php
@@ -363,6 +363,7 @@ class issue extends control
$moduleOptionMenu = $this->tree->getTaskOptionMenu($projectID, 0, 0, $showAllModule ? 'allModule' : '');
$this->view->projects = $projects;
+ $this->view->projectID = $projectID;
$this->view->showAllModule = $showAllModule;
$this->view->moduleOptionMenu = $moduleOptionMenu;
$this->view->showFields = $this->config->task->custom->createFields;
diff --git a/module/issue/model.php b/module/issue/model.php
index a4664e463b..410cd7ec74 100644
--- a/module/issue/model.php
+++ b/module/issue/model.php
@@ -304,7 +304,14 @@ class issueModel extends model
public function resolve($issueID)
{
$data = fixer::input('post')->get();
- $this->dao->update(TABLE_ISSUE)->data($data)->where('id')->eq($issueID)->exec();
+
+ $issue = new stdClass();
+ $issue->resolution = $data->resolution;
+ $issue->resolutionComment = $data->resolution;
+ $issue->resolvedBy = $data->resolution;
+ $issue->resolvedDate = $data->resolution;
+
+ $this->dao->update(TABLE_ISSUE)->data($issue)->where('id')->eq($issueID)->exec();
}
/**
diff --git a/module/issue/view/bugform.html.php b/module/issue/view/bugform.html.php
index a191842b9a..e8511ddecf 100644
--- a/module/issue/view/bugform.html.php
+++ b/module/issue/view/bugform.html.php
@@ -130,68 +130,11 @@
@@ -202,30 +145,6 @@
desc, "rows='10' class='form-control'");?>
-
-
-
- | bug->story : $lang->bug->task;?> |
-
-
-
- |
-
-
-
-
-
- bug->task?>
-
-
-
- |
-
-
-
| issue->resolvedBy;?> |
diff --git a/module/issue/view/resolve.html.php b/module/issue/view/resolve.html.php
index ccadc0ef5e..e28e294e70 100644
--- a/module/issue/view/resolve.html.php
+++ b/module/issue/view/resolve.html.php
@@ -14,6 +14,7 @@
include '../../common/view/header.html.php';
include '../../common/view/kindeditor.html.php';
include '../../common/view/datepicker.html.php';
+include '../../common/view/sortable.html.php';
?>
id);
diff --git a/module/issue/view/storyform.html.php b/module/issue/view/storyform.html.php
index 7cd45b8dcd..13d5f8e464 100644
--- a/module/issue/view/storyform.html.php
+++ b/module/issue/view/storyform.html.php
@@ -58,60 +58,20 @@
|
| story->title;?> |
- |
diff --git a/module/issue/view/taskform.html.php b/module/issue/view/taskform.html.php
index f5e6624df5..2541a330cd 100644
--- a/module/issue/view/taskform.html.php
+++ b/module/issue/view/taskform.html.php
@@ -18,7 +18,7 @@
| task->project;?> |
- id, "class='form-control chosen' onchange='loadAll(this.value)'");?> | | |
+ | | |
| task->type;?> |
@@ -31,7 +31,7 @@
| task->module;?> |
- module, "class='form-control chosen' onchange='setStories(this.value, $project->id)'");?> |
+ module, "class='form-control chosen' onchange='setStories(this.value, $projectID)'");?> |
|
-
-
-
-
-
- |
| task->status;?> |
@@ -63,51 +57,18 @@
|
diff --git a/module/programplan/model.php b/module/programplan/model.php
index 4b649f6b2f..8e8955bd21 100644
--- a/module/programplan/model.php
+++ b/module/programplan/model.php
@@ -608,7 +608,6 @@ class programplanModel extends model
{
$oldPlan = $this->getByID($planID);
$plan = fixer::input('post')
- ->remove('uid')
->setDefault('begin', '0000-00-00')
->setDefault('end', '0000-00-00')
->setDefault('realStarted', '0000-00-00')
@@ -617,7 +616,7 @@ class programplanModel extends model
->get();
if($plan->begin == '0000-00-00') dao::$errors['begin'][] = sprintf($this->lang->error->notempty, $this->lang->programplan->begin);
- if($plan->end == '0000-00-00') dao::$errors['end'][] = sprintf($this->lang->error->notempty, $this->lang->programplan->end);
+ if($plan->end == '0000-00-00') dao::$errors['end'][] = sprintf($this->lang->error->notempty, $this->lang->programplan->end);
$planChanged = ($oldPlan->name != $plan->name || $oldPlan->milestone != $plan->milestone || $oldPlan->begin != $plan->begin || $oldPlan->end != $plan->end);
@@ -638,9 +637,6 @@ class programplanModel extends model
->andWhere('id')->ne($oldPlan->id)
->andWhere('id')->in($projects)
->fetch('count');
-
- if(isset($plan->attribute) && $plan->attribute == 'dev') $devCounts += 1;
- if($devCounts > 1) dao::$errors['attribute'][] = $this->lang->programplan->error->onlyOneDev;
}
if($plan->parent > 0)