diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 56b6690cb5..84df7b4d85 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -996,7 +996,15 @@ class baseRouter if($writable) { $ztSessionHandler = new ztSessionHandler($_GET['tid']); - session_set_save_handler($ztSessionHandler, true); + session_set_save_handler( + array($ztSessionHandler, "open"), + array($ztSessionHandler, "close"), + array($ztSessionHandler, "read"), + array($ztSessionHandler, "write"), + array($ztSessionHandler, "destroy"), + array($ztSessionHandler, "gc") + ); + register_shutdown_function('session_write_close'); } } @@ -3140,7 +3148,7 @@ class EndResponseException extends \Exception * * @package framework */ -class ztSessionHandler implements SessionHandlerInterface +class ztSessionHandler { public $sessSavePath; public $tagID; diff --git a/module/action/model.php b/module/action/model.php index d626791567..df39540510 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -575,7 +575,7 @@ class actionModel extends model if($history->field == 'git') $history->diff = str_replace('+', '%2B', $history->diff); } } - elseif($actionName == 'linkstory' or $actionName == 'unlinkstory') + elseif(strpos('linkstory,unlinkstory,createchildrenstory', $actionName) !== false) { $extra = ''; foreach(explode(',', $action->extra) as $id) $extra .= common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$id"), "#$id ") . ', ' : "#$id, "; diff --git a/module/bug/config.php b/module/bug/config.php index 5ac6e7d586..a2dc0c6292 100644 --- a/module/bug/config.php +++ b/module/bug/config.php @@ -24,7 +24,7 @@ $config->bug->list->allFields = 'id, module, execution, story, task, lastEditedBy, lastEditedDate'; -$config->bug->list->defaultFields = 'id,severity,pri,title,openedBy,assignedTo,resolvedBy,resolution'; +$config->bug->list->defaultFields = 'id,title,severity,pri,openedBy,assignedTo,resolvedBy,resolution'; $config->bug->exportFields = 'id, product, branch, module, project, execution, story, task, title, keywords, severity, pri, type, os, browser, @@ -159,7 +159,7 @@ $config->bug->search['params']['deadline'] = array('operator' => '=', $config->bug->search['params']['activatedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); $config->bug->datatable = new stdclass(); -$config->bug->datatable->defaultField = array('id', 'severity', 'pri', 'confirmed', 'title', 'status', 'openedBy', 'openedDate', 'assignedTo', 'resolution', 'actions'); +$config->bug->datatable->defaultField = array('id', 'title', 'severity', 'pri', 'status', 'openedBy', 'openedDate', 'confirmed', 'assignedTo', 'resolution', 'actions'); $config->bug->datatable->fieldList['id']['title'] = 'idAB'; $config->bug->datatable->fieldList['id']['fixed'] = 'left'; @@ -174,6 +174,12 @@ $config->bug->datatable->fieldList['module']['control'] = 'select'; $config->bug->datatable->fieldList['module']['title'] = 'module'; $config->bug->datatable->fieldList['module']['dataSource'] = array('module' => 'tree', 'method' => 'getOptionMenu', 'params' => '$productID&bug'); +$config->bug->datatable->fieldList['title']['title'] = 'title'; +$config->bug->datatable->fieldList['title']['fixed'] = 'left'; +$config->bug->datatable->fieldList['title']['width'] = 'auto'; +$config->bug->datatable->fieldList['title']['required'] = 'yes'; +$config->bug->datatable->fieldList['title']['minWidth'] = '200'; + $config->bug->datatable->fieldList['severity']['title'] = 'severityAB'; $config->bug->datatable->fieldList['severity']['fixed'] = 'left'; $config->bug->datatable->fieldList['severity']['width'] = '50'; @@ -186,16 +192,10 @@ $config->bug->datatable->fieldList['pri']['width'] = '50'; $config->bug->datatable->fieldList['pri']['required'] = 'no'; $config->bug->datatable->fieldList['pri']['name'] = $lang->bug->pri; -$config->bug->datatable->fieldList['confirmed']['title'] = 'confirmedAB'; -$config->bug->datatable->fieldList['confirmed']['fixed'] = 'left'; -$config->bug->datatable->fieldList['confirmed']['width'] = '100'; -$config->bug->datatable->fieldList['confirmed']['required'] = 'no'; - -$config->bug->datatable->fieldList['title']['title'] = 'title'; -$config->bug->datatable->fieldList['title']['fixed'] = 'left'; -$config->bug->datatable->fieldList['title']['width'] = 'auto'; -$config->bug->datatable->fieldList['title']['required'] = 'yes'; -$config->bug->datatable->fieldList['title']['minWidth'] = '200'; +$config->bug->datatable->fieldList['status']['title'] = 'statusAB'; +$config->bug->datatable->fieldList['status']['fixed'] = 'left'; +$config->bug->datatable->fieldList['status']['width'] = '80'; +$config->bug->datatable->fieldList['status']['required'] = 'no'; $config->bug->datatable->fieldList['branch']['title'] = 'branch'; $config->bug->datatable->fieldList['branch']['fixed'] = 'left'; @@ -230,10 +230,66 @@ $config->bug->datatable->fieldList['plan']['fixed'] = 'no'; $config->bug->datatable->fieldList['plan']['width'] = '120'; $config->bug->datatable->fieldList['plan']['required'] = 'no'; -$config->bug->datatable->fieldList['status']['title'] = 'statusAB'; -$config->bug->datatable->fieldList['status']['fixed'] = 'no'; -$config->bug->datatable->fieldList['status']['width'] = '80'; -$config->bug->datatable->fieldList['status']['required'] = 'no'; +$config->bug->datatable->fieldList['openedBy']['title'] = 'openedByAB'; +$config->bug->datatable->fieldList['openedBy']['fixed'] = 'no'; +$config->bug->datatable->fieldList['openedBy']['width'] = '80'; +$config->bug->datatable->fieldList['openedBy']['required'] = 'no'; + +$config->bug->datatable->fieldList['openedDate']['title'] = 'openedDateAB'; +$config->bug->datatable->fieldList['openedDate']['fixed'] = 'no'; +$config->bug->datatable->fieldList['openedDate']['width'] = '90'; +$config->bug->datatable->fieldList['openedDate']['required'] = 'no'; + +$config->bug->datatable->fieldList['openedBuild']['title'] = 'openedBuild'; +$config->bug->datatable->fieldList['openedBuild']['fixed'] = 'no'; +$config->bug->datatable->fieldList['openedBuild']['width'] = '120'; +$config->bug->datatable->fieldList['openedBuild']['required'] = 'no'; +$config->bug->datatable->fieldList['openedBuild']['control'] = 'multiple'; +$config->bug->datatable->fieldList['openedBuild']['dataSource'] = array('module' => 'build', 'method' =>'getBuildPairs', 'params' => '$productID&$branch&noempty,noterminate,nodone,withbranch'); + +$config->bug->datatable->fieldList['confirmed']['title'] = 'confirmedAB'; +$config->bug->datatable->fieldList['confirmed']['fixed'] = 'no'; +$config->bug->datatable->fieldList['confirmed']['width'] = '100'; +$config->bug->datatable->fieldList['confirmed']['required'] = 'no'; + +$config->bug->datatable->fieldList['assignedTo']['title'] = 'assignedToAB'; +$config->bug->datatable->fieldList['assignedTo']['fixed'] = 'no'; +$config->bug->datatable->fieldList['assignedTo']['width'] = '120'; +$config->bug->datatable->fieldList['assignedTo']['required'] = 'no'; +$config->bug->datatable->fieldList['assignedTo']['dataSource'] = array('module' => 'user', 'method' =>'getPairs', 'params' => 'noclosed|noletter'); + +$config->bug->datatable->fieldList['assignedDate']['title'] = 'assignedDate'; +$config->bug->datatable->fieldList['assignedDate']['fixed'] = 'no'; +$config->bug->datatable->fieldList['assignedDate']['width'] = '90'; +$config->bug->datatable->fieldList['assignedDate']['required'] = 'no'; + +$config->bug->datatable->fieldList['deadline']['title'] = 'deadline'; +$config->bug->datatable->fieldList['deadline']['fixed'] = 'no'; +$config->bug->datatable->fieldList['deadline']['width'] = '90'; +$config->bug->datatable->fieldList['deadline']['required'] = 'no'; +$config->bug->datatable->fieldList['deadline']['control'] = 'date'; + +$config->bug->datatable->fieldList['resolvedBy']['title'] = 'resolvedBy'; +$config->bug->datatable->fieldList['resolvedBy']['fixed'] = 'no'; +$config->bug->datatable->fieldList['resolvedBy']['width'] = '100'; +$config->bug->datatable->fieldList['resolvedBy']['required'] = 'no'; + +$config->bug->datatable->fieldList['resolution']['title'] = 'resolutionAB'; +$config->bug->datatable->fieldList['resolution']['fixed'] = 'no'; +$config->bug->datatable->fieldList['resolution']['width'] = '110'; +$config->bug->datatable->fieldList['resolution']['required'] = 'no'; + +$config->bug->datatable->fieldList['resolvedDate']['title'] = 'resolvedDateAB'; +$config->bug->datatable->fieldList['resolvedDate']['fixed'] = 'no'; +$config->bug->datatable->fieldList['resolvedDate']['width'] = '120'; +$config->bug->datatable->fieldList['resolvedDate']['required'] = 'no'; + +$config->bug->datatable->fieldList['resolvedBuild']['title'] = 'resolvedBuild'; +$config->bug->datatable->fieldList['resolvedBuild']['fixed'] = 'no'; +$config->bug->datatable->fieldList['resolvedBuild']['width'] = '120'; +$config->bug->datatable->fieldList['resolvedBuild']['required'] = 'no'; +$config->bug->datatable->fieldList['resolvedBuild']['control'] = 'select'; +$config->bug->datatable->fieldList['resolvedBuild']['dataSource'] = array('module' => 'bug', 'method' =>'getRelatedObjects', 'params' => 'resolvedBuild&id,name'); $config->bug->datatable->fieldList['activatedCount']['title'] = 'activatedCountAB'; $config->bug->datatable->fieldList['activatedCount']['fixed'] = 'no'; @@ -283,62 +339,6 @@ $config->bug->datatable->fieldList['mailto']['fixed'] = 'no'; $config->bug->datatable->fieldList['mailto']['width'] = '100'; $config->bug->datatable->fieldList['mailto']['required'] = 'no'; -$config->bug->datatable->fieldList['openedBy']['title'] = 'openedByAB'; -$config->bug->datatable->fieldList['openedBy']['fixed'] = 'no'; -$config->bug->datatable->fieldList['openedBy']['width'] = '80'; -$config->bug->datatable->fieldList['openedBy']['required'] = 'no'; - -$config->bug->datatable->fieldList['openedDate']['title'] = 'openedDateAB'; -$config->bug->datatable->fieldList['openedDate']['fixed'] = 'no'; -$config->bug->datatable->fieldList['openedDate']['width'] = '90'; -$config->bug->datatable->fieldList['openedDate']['required'] = 'no'; - -$config->bug->datatable->fieldList['openedBuild']['title'] = 'openedBuild'; -$config->bug->datatable->fieldList['openedBuild']['fixed'] = 'no'; -$config->bug->datatable->fieldList['openedBuild']['width'] = '120'; -$config->bug->datatable->fieldList['openedBuild']['required'] = 'no'; -$config->bug->datatable->fieldList['openedBuild']['control'] = 'multiple'; -$config->bug->datatable->fieldList['openedBuild']['dataSource'] = array('module' => 'build', 'method' =>'getBuildPairs', 'params' => '$productID&$branch&noempty,noterminate,nodone,withbranch'); - -$config->bug->datatable->fieldList['assignedTo']['title'] = 'assignedToAB'; -$config->bug->datatable->fieldList['assignedTo']['fixed'] = 'no'; -$config->bug->datatable->fieldList['assignedTo']['width'] = '120'; -$config->bug->datatable->fieldList['assignedTo']['required'] = 'no'; -$config->bug->datatable->fieldList['assignedTo']['dataSource'] = array('module' => 'user', 'method' =>'getPairs', 'params' => 'noclosed|noletter'); - -$config->bug->datatable->fieldList['assignedDate']['title'] = 'assignedDate'; -$config->bug->datatable->fieldList['assignedDate']['fixed'] = 'no'; -$config->bug->datatable->fieldList['assignedDate']['width'] = '90'; -$config->bug->datatable->fieldList['assignedDate']['required'] = 'no'; - -$config->bug->datatable->fieldList['deadline']['title'] = 'deadline'; -$config->bug->datatable->fieldList['deadline']['fixed'] = 'no'; -$config->bug->datatable->fieldList['deadline']['width'] = '90'; -$config->bug->datatable->fieldList['deadline']['required'] = 'no'; -$config->bug->datatable->fieldList['deadline']['control'] = 'date'; - -$config->bug->datatable->fieldList['resolvedBy']['title'] = 'resolvedByAB'; -$config->bug->datatable->fieldList['resolvedBy']['fixed'] = 'no'; -$config->bug->datatable->fieldList['resolvedBy']['width'] = '100'; -$config->bug->datatable->fieldList['resolvedBy']['required'] = 'no'; - -$config->bug->datatable->fieldList['resolution']['title'] = 'resolutionAB'; -$config->bug->datatable->fieldList['resolution']['fixed'] = 'no'; -$config->bug->datatable->fieldList['resolution']['width'] = '110'; -$config->bug->datatable->fieldList['resolution']['required'] = 'no'; - -$config->bug->datatable->fieldList['resolvedDate']['title'] = 'resolvedDateAB'; -$config->bug->datatable->fieldList['resolvedDate']['fixed'] = 'no'; -$config->bug->datatable->fieldList['resolvedDate']['width'] = '120'; -$config->bug->datatable->fieldList['resolvedDate']['required'] = 'no'; - -$config->bug->datatable->fieldList['resolvedBuild']['title'] = 'resolvedBuild'; -$config->bug->datatable->fieldList['resolvedBuild']['fixed'] = 'no'; -$config->bug->datatable->fieldList['resolvedBuild']['width'] = '120'; -$config->bug->datatable->fieldList['resolvedBuild']['required'] = 'no'; -$config->bug->datatable->fieldList['resolvedBuild']['control'] = 'select'; -$config->bug->datatable->fieldList['resolvedBuild']['dataSource'] = array('module' => 'bug', 'method' =>'getRelatedObjects', 'params' => 'resolvedBuild&id,name'); - $config->bug->datatable->fieldList['closedBy']['title'] = 'closedBy'; $config->bug->datatable->fieldList['closedBy']['fixed'] = 'no'; $config->bug->datatable->fieldList['closedBy']['width'] = '80'; diff --git a/module/bug/control.php b/module/bug/control.php index 99dd327aaa..1463d145f1 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -966,14 +966,8 @@ class bug extends control $changes = $this->bug->update($bugID); if(dao::isError()) { - if(defined('RUN_MODE') && RUN_MODE == 'api') - { - return $this->send(array('status' => 'error', 'message' => dao::getError())); - } - else - { - return print(js::error(dao::getError())); - } + if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'error', 'message' => dao::getError())); + return print(js::error(dao::getError())); } } @@ -1158,6 +1152,7 @@ class bug extends control $branch = $product->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : ''; $productBugs = $this->bug->getProductBugPairs($productID, $branch); + unset($productBugs[$bugID]); $this->view->bug = $bug; $this->view->productID = $productID; @@ -1814,6 +1809,7 @@ class bug extends control $product = $this->loadModel('product')->getById($productID); $branch = $product->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : ''; $productBugs = $this->bug->getProductBugPairs($productID, $branch); + unset($productBugs[$bugID]); $this->bug->checkBugExecutionPriv($bug); $this->qa->setMenu($this->products, $productID, $bug->branch); diff --git a/module/bug/css/browse.css b/module/bug/css/browse.css index 55068d74be..8d9aac8543 100644 --- a/module/bug/css/browse.css +++ b/module/bug/css/browse.css @@ -2,7 +2,6 @@ .closed, .closed a {color: gray; text-decoration:line-through;} .resolved, .resolved a {color: #8EC21F; text-decoration: none;} .tree .closed, .tree .closed a {color: #003366; text-decoration: none;} -td.delayed {color: #fff; background: #e84e0f !important;} #bugForm .setting {height: 25px;} .datatable-wrapper .table-datatable .datatable-row td {height: 37px;} diff --git a/module/bug/model.php b/module/bug/model.php index 70f4ae486c..7679e599ae 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -754,7 +754,7 @@ class bugModel extends model /* Link bug to build and release. */ if($bug->resolution == 'fixed' and !empty($bug->resolvedBuild) and $oldBug->resolvedBuild != $bug->resolvedBuild) { - if(!empty($oldBug->resolvedBuild)) $this->loadModel('build')->unlinkBug((int)$oldBug->resolvedBuild, (int)$bugID); + if(!empty($oldBug->resolvedBuild)) $this->loadModel('build')->unlinkBug($oldBug->resolvedBuild, (int)$bugID); $this->linkBugToBuild($bugID, $bug->resolvedBuild); } @@ -3297,6 +3297,9 @@ class bugModel extends model $class .= ' text-ellipsis'; $title = "title='" . $browser . "'"; break; + case 'deadline': + $class .= ' text-center'; + break; } if($id == 'deadline' && isset($bug->delay) && $bug->status == 'active') $class .= ' delayed'; @@ -3440,7 +3443,7 @@ class bugModel extends model echo helper::isZeroDate($bug->assignedDate) ? '' : substr($bug->assignedDate, 5, 11); break; case 'deadline': - echo helper::isZeroDate($bug->deadline) ? '' : substr($bug->deadline, 5, 11); + echo helper::isZeroDate($bug->deadline) ? '' : '' . substr($bug->deadline, 5, 11) . ''; break; case 'resolvedBy': echo zget($users, $bug->resolvedBy, $bug->resolvedBy); diff --git a/module/bug/view/batchedit.html.php b/module/bug/view/batchedit.html.php index f1e9c9c348..89d343479d 100644 --- a/module/bug/view/batchedit.html.php +++ b/module/bug/view/batchedit.html.php @@ -143,7 +143,11 @@