diff --git a/module/bug/control.php b/module/bug/control.php index 3108266b17..5a634a6198 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -582,7 +582,8 @@ class bug extends control $this->lang->set('menugroup.bug', 'my'); $this->lang->bug->menuOrder = $this->lang->my->menuOrder; $this->loadModel('my')->setMenu(); - $this->view->title = "BUG" . $this->lang->bug->batchEdit; + $this->view->position[] = html::a($this->createLink('my', 'bug'), $this->lang->my->bug); + $this->view->title = "BUG" . $this->lang->bug->batchEdit; } /* Initialize vars.*/ $bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($bugIDList)->fetchAll('id'); @@ -1112,7 +1113,7 @@ class bug extends control $relatedTasks = $this->dao->select('id, name')->from(TABLE_TASK)->where('id')->in($relatedTaskIdList)->fetchPairs(); $relatedBugs = $this->dao->select('id, title')->from(TABLE_BUG)->where('id')->in($relatedBugIdList)->fetchPairs(); $relatedCases = $this->dao->select('id, title')->from(TABLE_CASE)->where('id')->in($relatedCaseIdList)->fetchPairs(); - $relatedBuilds = $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->in($relatedBuildIdList)->fetchPairs(); + $relatedBuilds = array('trunk' => 'Trunk') + $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->in($relatedBuildIdList)->fetchPairs(); $relatedFiles = $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)->where('objectType')->eq('bug')->andWhere('objectID')->in(@array_keys($bugs))->fetchGroup('objectID'); foreach($bugs as $bug) @@ -1127,13 +1128,14 @@ class bug extends control } /* fill some field with useful value. */ - if(isset($products[$bug->product])) $bug->product = $products[$bug->product]; - if(isset($projects[$bug->project])) $bug->project = $projects[$bug->project]; - if(isset($relatedModules[$bug->module])) $bug->module = $relatedModules[$bug->module]; - if(isset($relatedStories[$bug->story])) $bug->story = $relatedStories[$bug->story]; - if(isset($relatedTasks[$bug->task])) $bug->task = $relatedTasks[$bug->task]; - if(isset($relatedBugs[$bug->duplicateBug])) $bug->duplicateBug = $relatedBugs[$bug->duplicateBug]; - if(isset($relatedCases[$bug->case])) $bug->case = $relatedCases[$bug->case]; + if(isset($products[$bug->product])) $bug->product = $products[$bug->product] . "(#$bug->product)"; + if(isset($projects[$bug->project])) $bug->project = $projects[$bug->project] . "(#$bug->project)"; + if(isset($relatedModules[$bug->module])) $bug->module = $relatedModules[$bug->module] . "(#$bug->module)"; + if(isset($relatedStories[$bug->story])) $bug->story = $relatedStories[$bug->story] . "(#$bug->story)"; + if(isset($relatedTasks[$bug->task])) $bug->task = $relatedTasks[$bug->task] . "($bug->task)"; + if(isset($relatedBugs[$bug->duplicateBug])) $bug->duplicateBug = $relatedBugs[$bug->duplicateBug] . "($bug->duplicateBug)"; + if(isset($relatedCases[$bug->case])) $bug->case = $relatedCases[$bug->case] . "($bug->case)"; + if(isset($relatedBuilds[$bug->resolvedBuild])) $bug->resolvedBuild = $relatedBuilds[$bug->resolvedBuild] . "(#$bug->resolvedBuild)"; if(isset($bugLang->priList[$bug->pri])) $bug->pri = $bugLang->priList[$bug->pri]; if(isset($bugLang->typeList[$bug->type])) $bug->type = $bugLang->typeList[$bug->type]; @@ -1173,20 +1175,10 @@ class bug extends control foreach($buildIdList as $buildID) { $buildID = trim($buildID); - $tmpOpenedBuilds[] = isset($relatedBuilds[$buildID]) ? $relatedBuilds[$buildID] : $buildID; + $tmpOpenedBuilds[] = isset($relatedBuilds[$buildID]) ? $relatedBuilds[$buildID] . "(#$buildID)" : $buildID; } - $bug->openedBuild = join("; \n", $tmpOpenedBuilds); - } - - if($bug->resolvedBuild) - { - $buildIdList = explode(',', $bug->resolvedBuild); - foreach($buildIdList as $buildID) - { - $buildID = trim($buildID); - $tmpResolvedBuilds[] = isset($relatedBuilds[$buildID]) ? $relatedBuilds[$buildID] : $buildID; - } - $bug->resolvedBuild = join("; \n", $tmpResolvedBuilds); + $bug->openedBuild = join("\n", $tmpOpenedBuilds); + if($this->post->fileType == 'html') $bug->openedBuild = nl2br($bug->openedBuild); } /* Set related files. */ diff --git a/module/story/control.php b/module/story/control.php index 4004ab6b7d..c9114feed6 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -326,7 +326,8 @@ class story extends control { $this->product->setMenu($this->product->getPairs('nodeleted'), $productID); $product = $this->product->getByID($productID); - $this->view->title = $product->name . $this->lang->colon . $this->lang->story->batchEdit; + $this->view->position[] = html::a($this->createLink('product', 'browse', "product=$product->id"), $product->name); + $this->view->title = $product->name . $this->lang->colon . $this->lang->story->batchEdit; } /* The stories of a project. */ @@ -337,7 +338,8 @@ class story extends control $this->lang->set('menugroup.story', 'project'); $this->lang->story->menuOrder = $this->lang->project->menuOrder; $project = $this->project->getByID($projectID); - $this->view->title = $project->name . $this->lang->colon . $this->lang->story->batchEdit; + $this->view->position[] = html::a($this->createLink('project', 'story', "project=$project->id"), $project->name); + $this->view->title = $project->name . $this->lang->colon . $this->lang->story->batchEdit; } /* The stories of my. */ else @@ -346,7 +348,8 @@ class story extends control $this->lang->set('menugroup.story', 'my'); $this->lang->story->menuOrder = $this->lang->my->menuOrder; $this->loadModel('my')->setMenu(); - $this->view->title = $this->lang->story->batchEdit; + $this->view->position[] = html::a($this->createLink('my', 'story'), $this->lang->my->story); + $this->view->title = $this->lang->story->batchEdit; } /* Get the module and productplan of edited stories. */ @@ -365,7 +368,6 @@ class story extends control $this->app->session->set('showSuhosinInfo', $showSuhosinInfo); if($showSuhosinInfo) $this->view->suhosinInfo = $this->lang->suhosinInfo; - $this->view->position[] = html::a($this->createLink('product', 'browse', "product=$product->id"), $product->name); $this->view->position[] = $this->lang->story->common; $this->view->position[] = $this->lang->story->batchEdit; $this->view->users = $this->loadModel('user')->getPairs('nodeleted'); @@ -681,7 +683,8 @@ class story extends control $this->project->setMenu($this->project->getPairs('nodeleted'), $projectID); $this->lang->set('menugroup.story', 'project'); $project = $this->project->getByID($projectID); - $this->view->title = $project->name . $this->lang->colon . $this->lang->story->batchClose; + $this->view->position[] = html::a($this->createLink('project', 'story', "project=$project->id"), $project->name); + $this->view->title = $project->name . $this->lang->colon . $this->lang->story->batchClose; } /* The stories of my. */ else @@ -690,7 +693,8 @@ class story extends control $this->lang->set('menugroup.story', 'my'); $this->lang->story->menuOrder = $this->lang->my->menuOrder; $this->loadModel('my')->setMenu(); - $this->view->title = $this->lang->story->batchEdit; + $this->view->position[] = html::a($this->createLink('my', 'story'), $this->lang->my->story); + $this->view->title = $this->lang->story->batchEdit; } /* Judge whether the editedStories is too large and set session. */ @@ -1026,9 +1030,9 @@ class story extends control $story->verify = str_replace('"', '""', $story->verify); } /* fill some field with useful value. */ - if(isset($products[$story->product])) $story->product = $products[$story->product]; - if(isset($relatedModules[$story->module])) $story->module = $relatedModules[$story->module]; - if(isset($relatedPlans[$story->plan])) $story->plan = $relatedPlans[$story->plan]; + if(isset($products[$story->product])) $story->product = $products[$story->product] . "(#$story->product)"; + if(isset($relatedModules[$story->module])) $story->module = $relatedModules[$story->module] . "(#$story->module)"; + if(isset($relatedPlans[$story->plan])) $story->plan = $relatedPlans[$story->plan] . "(#$story->plan)"; if(isset($relatedStories[$story->duplicateStory])) $story->duplicateStory = $relatedStories[$story->duplicateStory]; if(isset($storyLang->priList[$story->pri])) $story->pri = $storyLang->priList[$story->pri]; diff --git a/module/task/control.php b/module/task/control.php index 2a85dc17de..dec8b260c3 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -325,8 +325,9 @@ class task extends control $this->lang->set('menugroup.task', 'my'); $this->lang->task->menuOrder = $this->lang->my->menuOrder; $this->loadModel('my')->setMenu(); - $this->view->title = $this->lang->task->batchEdit; - $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->position[] = html::a($this->createLink('my', 'task'), $this->lang->my->task); + $this->view->title = $this->lang->task->batchEdit; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); } /* Get edited tasks. */ @@ -949,14 +950,14 @@ class task extends control } /* fill some field with useful value. */ - $task->story = isset($relatedStories[$task->story]) ? $relatedStories[$task->story] : ''; + $task->story = isset($relatedStories[$task->story]) ? $relatedStories[$task->story] . "(#$task->story)" : ''; - if(isset($projects[$task->project])) $task->project = $projects[$task->project]; + if(isset($projects[$task->project])) $task->project = $projects[$task->project] . "(#$task->project)"; if(isset($taskLang->typeList[$task->type])) $task->type = $taskLang->typeList[$task->type]; if(isset($taskLang->priList[$task->pri])) $task->pri = $taskLang->priList[$task->pri]; if(isset($taskLang->statusList[$task->status])) $task->status = $taskLang->statusList[$task->status]; if(isset($taskLang->reasonList[$task->closedReason])) $task->closedReason = $taskLang->reasonList[$task->closedReason]; - if(isset($relatedModules[$task->module])) $task->module = $relatedModules[$task->module]; + if(isset($relatedModules[$task->module])) $task->module = $relatedModules[$task->module] . "(#$task->module)"; if(isset($users[$task->openedBy])) $task->openedBy = $users[$task->openedBy]; if(isset($users[$task->assignedTo])) $task->assignedTo = $users[$task->assignedTo]; diff --git a/module/task/view/batchedit.html.php b/module/task/view/batchedit.html.php index dd9986070d..291592d97d 100755 --- a/module/task/view/batchedit.html.php +++ b/module/task/view/batchedit.html.php @@ -55,13 +55,12 @@ - +
- type != 'sprint')) ? $this->config->task->batchEdit->columns + 1 : $this->config->task->batchEdit->columns;?> - + diff --git a/module/testcase/control.php b/module/testcase/control.php index de824fcc07..22413702ea 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -467,7 +467,8 @@ class testcase extends control $this->lang->set('menugroup.testcase', 'my'); $this->lang->testcase->menuOrder = $this->lang->my->menuOrder; $this->loadModel('my')->setMenu(); - $this->view->title = $this->lang->testcase->batchEdit; + $this->view->position[] = html::a($this->server->http_referer, $this->lang->my->testCase); + $this->view->title = $this->lang->testcase->batchEdit; } /* Judge whether the editedTasks is too large and set session. */ @@ -662,9 +663,9 @@ class testcase extends control } /* fill some field with useful value. */ - if(isset($products[$case->product])) $case->product = $products[$case->product]; - if(isset($relatedModules[$case->module])) $case->module = $relatedModules[$case->module]; - if(isset($relatedStories[$case->story])) $case->story = $relatedStories[$case->story]; + if(isset($products[$case->product])) $case->product = $products[$case->product] . "(#$case->product)"; + if(isset($relatedModules[$case->module])) $case->module = $relatedModules[$case->module] . "(#$case->module)"; + if(isset($relatedStories[$case->story])) $case->story = $relatedStories[$case->story] . "(#$case->story)"; if(isset($caseLang->priList[$case->pri])) $case->pri = $caseLang->priList[$case->pri]; if(isset($caseLang->typeList[$case->type])) $case->type = $caseLang->typeList[$case->type]; @@ -687,7 +688,7 @@ class testcase extends control foreach($linkCaseIdList as $linkCaseID) { $linkCaseID = trim($linkCaseID); - $tmpLinkCases[] = isset($relatedCases[$linkCaseID]) ? $relatedCases[$linkCaseID] : $linkCaseID; + $tmpLinkCases[] = isset($relatedCases[$linkCaseID]) ? $relatedCases[$linkCaseID] . "(#$linkCaseID)" : $linkCaseID; } $case->linkCase = join("; \n", $tmpLinkCases); } diff --git a/module/todo/control.php b/module/todo/control.php index b93aabf81e..0272459a36 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -190,6 +190,7 @@ class todo extends control /* Assign. */ $title = $this->lang->todo->common . $this->lang->colon . $this->lang->todo->batchEdit; + $position[] = html::a($this->createLink('my', 'todo'), $this->lang->my->todo); $position[] = $this->lang->todo->common; $position[] = $this->lang->todo->batchEdit; @@ -393,8 +394,8 @@ class todo extends control if(isset($users[$todo->account])) $todo->account = $users[$todo->account]; if(isset($times[$todo->begin])) $todo->begin = $times[$todo->begin]; if(isset($times[$todo->end])) $todo->end = $times[$todo->end]; - if($todo->type == 'bug') $todo->name = isset($bugs[$todo->idvalue]) ? $bugs[$todo->idvalue] : ''; - if($todo->type == 'task') $todo->name = isset($tasks[$todo->idvalue]) ? $tasks[$todo->idvalue] : ''; + if($todo->type == 'bug') $todo->name = isset($bugs[$todo->idvalue]) ? $bugs[$todo->idvalue] . "(#$todo->idvalue)" : ''; + if($todo->type == 'task') $todo->name = isset($tasks[$todo->idvalue]) ? $tasks[$todo->idvalue] . "(#$todo->idvalue)" : ''; if(isset($todoLang->typeList[$todo->type])) $todo->type = $todoLang->typeList[$todo->type]; if(isset($todoLang->priList[$todo->pri])) $todo->pri = $todoLang->priList[$todo->pri]; if(isset($todoLang->statusList[$todo->status])) $todo->status = $todoLang->statusList[$todo->status];