Merge branch 'sprint/207_mayue_bug#23765' into 'master'
Sprint/207 mayue bug#23765 See merge request easycorp/zentaopms!4094
This commit is contained in:
@@ -2034,6 +2034,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(1,'execution','putoff'),
|
||||
(1,'execution','start'),
|
||||
(1,'execution','story'),
|
||||
(1,'execution','storyView'),
|
||||
(1,'execution','storyEstimate'),
|
||||
(1,'execution','storyKanban'),
|
||||
(1,'execution','storySort'),
|
||||
@@ -2584,6 +2585,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(2,'execution','manageMembers'),
|
||||
(2,'execution','printKanban'),
|
||||
(2,'execution','story'),
|
||||
(2,'execution','storyView'),
|
||||
(2,'execution','storyEstimate'),
|
||||
(2,'execution','storyKanban'),
|
||||
(2,'execution','task'),
|
||||
@@ -2882,6 +2884,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(3,'execution','index'),
|
||||
(3,'execution','kanban'),
|
||||
(3,'execution','story'),
|
||||
(3,'execution','storyView'),
|
||||
(3,'execution','task'),
|
||||
(3,'execution','team'),
|
||||
(3,'execution','testcase'),
|
||||
@@ -3236,6 +3239,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(4,'execution','putoff'),
|
||||
(4,'execution','start'),
|
||||
(4,'execution','story'),
|
||||
(4,'execution','storyView'),
|
||||
(4,'execution','storyEstimate'),
|
||||
(4,'execution','storyKanban'),
|
||||
(4,'execution','storySort'),
|
||||
@@ -3732,6 +3736,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(5,'execution','putoff'),
|
||||
(5,'execution','start'),
|
||||
(5,'execution','story'),
|
||||
(5,'execution','storyView'),
|
||||
(5,'execution','storyEstimate'),
|
||||
(5,'execution','storyKanban'),
|
||||
(5,'execution','storySort'),
|
||||
@@ -4181,6 +4186,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(6,'execution','putoff'),
|
||||
(6,'execution','start'),
|
||||
(6,'execution','story'),
|
||||
(6,'execution','storyView'),
|
||||
(6,'execution','storyEstimate'),
|
||||
(6,'execution','storyKanban'),
|
||||
(6,'execution','storySort'),
|
||||
@@ -4548,6 +4554,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(7,'execution','linkStory'),
|
||||
(7,'execution','manageProducts'),
|
||||
(7,'execution','story'),
|
||||
(7,'execution','storyView'),
|
||||
(7,'execution','storyKanban'),
|
||||
(7,'execution','storySort'),
|
||||
(7,'execution','task'),
|
||||
@@ -4951,6 +4958,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(8,'execution','index'),
|
||||
(8,'execution','kanban'),
|
||||
(8,'execution','story'),
|
||||
(8,'execution','storyView'),
|
||||
(8,'execution','storyKanban'),
|
||||
(8,'execution','task'),
|
||||
(8,'execution','team'),
|
||||
@@ -5329,6 +5337,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(9,'execution','kanban'),
|
||||
(9,'execution','manageMembers'),
|
||||
(9,'execution','story'),
|
||||
(9,'execution','storyView'),
|
||||
(9,'execution','storyKanban'),
|
||||
(9,'execution','storySort'),
|
||||
(9,'execution','task'),
|
||||
@@ -5646,6 +5655,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(10,'execution','index'),
|
||||
(10,'execution','kanban'),
|
||||
(10,'execution','story'),
|
||||
(10,'execution','storyView'),
|
||||
(10,'execution','task'),
|
||||
(10,'execution','team'),
|
||||
(10,'execution','testtask'),
|
||||
@@ -5879,6 +5889,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(11,'execution','index'),
|
||||
(11,'execution','kanban'),
|
||||
(11,'execution','story'),
|
||||
(11,'execution','storyView'),
|
||||
(11,'execution','task'),
|
||||
(11,'execution','team'),
|
||||
(11,'execution','testcase'),
|
||||
|
||||
@@ -91,9 +91,7 @@ tbody tr td:first-child input {display: none;}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='text-center'>
|
||||
<?php $objectID = $this->app->tab == 'execution' ? $build->execution : $build->project;?>
|
||||
<?php foreach($stories as $storyID => $story):?>
|
||||
<?php $storyLink = $this->app->tab == 'execution' ? $this->createLink('execution', 'storyView', "storyID=$story->id", '', true) : $this->createLink('story', 'view', "storyID=$story->id&version=0¶m=$objectID", '', true);?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
<?php if($canBatchUnlink):?>
|
||||
@@ -106,7 +104,18 @@ tbody tr td:first-child input {display: none;}
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'>
|
||||
<?php
|
||||
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
|
||||
echo html::a($storyLink,$story->title, '', isonlybody() ? "data-width='1000'" : "class='iframe' data-width='1000'");
|
||||
if($this->app->tab == 'execution' and common::hasPriv('execution', 'storyView'))
|
||||
{
|
||||
echo html::a($this->createLink('execution', 'storyView', "storyID=$story->id", '', true), $story->title, '', isonlybody() ? "data-width='1000'" : "class='iframe' data-width='1000'");
|
||||
}
|
||||
elseif($this->app->tab == 'project' and common::hasPriv('projectstory', 'view'))
|
||||
{
|
||||
echo html::a($this->createLink('projectstory', 'view', "storyID=$story->id&version=0¶m=$build->project", '', true), $story->title, '', isonlybody() ? "data-width='1000'" : "class='iframe' data-width='1000'");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<a>' . $story->title . '</a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
|
||||
@@ -500,8 +500,8 @@ function renderStoryItem(item, $item, col)
|
||||
var $title = $item.find('.title');
|
||||
if(!$title.length)
|
||||
{
|
||||
$title = $('<a class="title iframe">' + (scaleSize <= 1 ? '<i class="icon icon-lightbulb text-muted"></i> ' : '') + '<span class="text"></span></a>')
|
||||
.attr('href', $.createLink('execution', 'storyView', 'storyID=' + item.id + '&version=0¶m=' + execution.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '95%');
|
||||
$title = $('<a class="title iframe">' + (scaleSize <= 1 ? '<i class="icon icon-lightbulb text-muted"></i> ' : '') + '<span class="text"></span></a>');
|
||||
if(priv.canViewStory) $title = $title.attr('href', $.createLink('execution', 'storyView', 'storyID=' + item.id + '&version=0¶m=' + execution.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '95%');
|
||||
$title.appendTo($item);
|
||||
}
|
||||
var title = rdSearchValue != '' ? "<span class='text'>" + item.title.replaceAll(rdSearchValue, "<span class='text-danger'>" + rdSearchValue + "</span>") + "</span>": "<span class='text'>" + item.title + "</span>";
|
||||
@@ -565,8 +565,8 @@ function renderBugItem(item, $item, col)
|
||||
var $title = $item.find('.title');
|
||||
if(!$title.length)
|
||||
{
|
||||
$title = $('<a class="title iframe" data-width="95%">' + (scaleSize <= 1 ? '<i class="icon icon-bug text-muted"></i> ' : '') + '<span class="text"></span></a>')
|
||||
.attr('href', $.createLink('bug', 'view', 'bugID=' + item.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '80%');
|
||||
$title = $('<a class="title iframe" data-width="95%">' + (scaleSize <= 1 ? '<i class="icon icon-bug text-muted"></i> ' : '') + '<span class="text"></span></a>');
|
||||
if(priv.canViewBug) $title =$title.attr('href', $.createLink('bug', 'view', 'bugID=' + item.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '80%');
|
||||
$title.appendTo($item);
|
||||
}
|
||||
var title = rdSearchValue != '' ? "<span class='text'>" + item.title.replaceAll(rdSearchValue, "<span class='text-danger'>" + rdSearchValue + "</span>") + "</span>": "<span class='text'>" + item.title + "</span>";
|
||||
@@ -632,7 +632,8 @@ function renderTaskItem(item, $item, col)
|
||||
var $title = $item.find('.title');
|
||||
if(!$title.length)
|
||||
{
|
||||
$title = $('<a class="title iframe" data-width="95%">' + (scaleSize <= 1 ? '<i class="icon icon-checked text-muted"></i> ' : '') + '<span class="text"></span></a>').attr('href', $.createLink('task', 'view', 'taskID=' + item.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '80%');
|
||||
$title = $('<a class="title iframe" data-width="95%">' + (scaleSize <= 1 ? '<i class="icon icon-checked text-muted"></i> ' : '') + '<span class="text"></span></a>');
|
||||
if(priv.canViewTask) $title = $title.attr('href', $.createLink('task', 'view', 'taskID=' + item.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '80%');
|
||||
$title.appendTo($item);
|
||||
}
|
||||
var name = rdSearchValue != '' ? "<span class='text'>" + item.name.replaceAll(rdSearchValue, "<span class='text-danger'>" + rdSearchValue + "</span>") + "</span>": "<span class='text'>" + item.name + "</span>";
|
||||
|
||||
@@ -87,6 +87,7 @@ js::set('priv',
|
||||
'canBatchCreateStory' => $canBatchCreateStory,
|
||||
'canLinkStory' => $canLinkStory,
|
||||
'canLinkStoryByPlan' => $canLinkStoryByPlan,
|
||||
'canViewBug' => common::hasPriv('bug', 'view'),
|
||||
'canAssignBug' => common::hasPriv('bug', 'assignto'),
|
||||
'canConfirmBug' => common::hasPriv('bug', 'confirmBug'),
|
||||
'canResolveBug' => common::hasPriv('bug', 'resolve'),
|
||||
@@ -94,6 +95,7 @@ js::set('priv',
|
||||
'canEditBug' => common::hasPriv('bug', 'edit'),
|
||||
'canDeleteBug' => common::hasPriv('bug', 'delete'),
|
||||
'canActivateBug' => common::hasPriv('bug', 'activate'),
|
||||
'canViewTask' => common::hasPriv('task', 'view'),
|
||||
'canAssignTask' => common::hasPriv('task', 'assignto'),
|
||||
'canFinishTask' => common::hasPriv('task', 'finish'),
|
||||
'canPauseTask' => common::hasPriv('task', 'pause'),
|
||||
@@ -113,6 +115,7 @@ js::set('priv',
|
||||
'canChangeStory' => common::hasPriv('story', 'change'),
|
||||
'canCloseStory' => common::hasPriv('story', 'close'),
|
||||
'canUnlinkStory' => common::hasPriv('execution', 'unlinkStory'),
|
||||
'canViewStory' => common::hasPriv('execution', 'storyView'),
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -65,7 +65,14 @@
|
||||
<td class='text-left nobr' title="<?php echo $story->title?>">
|
||||
<?php
|
||||
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
|
||||
echo html::a($storyLink, $story->title, '', "class='iframe' data-width='80%'");
|
||||
if(common::hasPriv('execution', 'storyView'))
|
||||
{
|
||||
echo html::a($storyLink, $story->title, '', "class='iframe' data-width='80%'");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<a>' . $story->title . '</a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class='text-left' title='<?php echo $products[$story->product]->name?>'><?php echo html::a($this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch"), $products[$story->product]->name);?></td>
|
||||
|
||||
@@ -225,7 +225,6 @@
|
||||
<tbody id='storyTableList' class='sortable'>
|
||||
<?php foreach($stories as $key => $story):?>
|
||||
<?php
|
||||
$storyLink = $this->createLink('execution', 'storyView', "storyID=$story->id&version=$story->version¶m=$execution->id");
|
||||
$totalEstimate += $story->estimate;
|
||||
?>
|
||||
<tr id="story<?php echo $story->id;?>" data-id='<?php echo $story->id;?>' data-order='<?php echo $story->order ?>' data-estimate='<?php echo $story->estimate?>' data-cases='<?php echo zget($storyCases, $story->id, 0)?>'>
|
||||
|
||||
@@ -84,7 +84,16 @@ $account = $this->app->user->account;
|
||||
<?php if(!empty($stories[$col])):?>
|
||||
<?php foreach($stories[$col] as $story):?>
|
||||
<div class='board-item' data-id='<?php echo $story->id?>' id='story-<?php echo $story->id?>' data-type='story'>
|
||||
<?php echo html::a($this->createLink('execution', 'storyView', "story=$story->id", '', true), "#{$story->id} {$story->title}", '', 'class="title kanbaniframe" title="' . $story->title . '"');?>
|
||||
<?php
|
||||
if(common::hasPriv('execution', 'storyView'))
|
||||
{
|
||||
echo html::a($this->createLink('execution', 'storyView', "story=$story->id", '', true), "#{$story->id} {$story->title}", '', 'class="title kanbaniframe" title="' . $story->title . '"');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<a title='" . $story->title . "'>" . "#" . $story->id . $story->title . "</a>";
|
||||
}
|
||||
?>
|
||||
<div class='info'>
|
||||
<span class='label-pri label-pri-<?php echo $story->pri?>' title='<?php echo $lang->story->pri?>'><?php echo zget($lang->story->priList, $story->pri);?></span>
|
||||
<span class='status status-story status-<?php echo $story->status;?>' title='<?php echo $lang->story->status?>'><span class="label label-dot"></span> <?php echo $lang->story->statusList[$story->status];?></span>
|
||||
|
||||
@@ -184,7 +184,7 @@ function setPreview()
|
||||
}
|
||||
else
|
||||
{
|
||||
storyLink = createLink('story', 'view', "storyID=" + $('#story').val());
|
||||
storyLink = createLink('execution', 'storyView', "storyID=" + $('#story').val());
|
||||
var concat = storyLink.indexOf('?') < 0 ? '?' : '&';
|
||||
|
||||
if(storyLink.indexOf("onlybody=yes") < 0) storyLink = storyLink + concat + 'onlybody=yes';
|
||||
|
||||
@@ -104,7 +104,9 @@
|
||||
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
|
||||
<div class='input-group <?php if(empty($stories)) echo "hidden";?>'>
|
||||
<?php echo html::select('story', $stories, $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
|
||||
<?php if(common::hasPriv('execution', 'storyView')):?>
|
||||
<span class='input-group-btn' id='preview'><a href='#' class='btn iframe'><?php echo $lang->preview;?></a></span>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -515,6 +515,9 @@ class upgradeModel extends model
|
||||
$this->replaceSetLanePriv();
|
||||
$this->updateProjectData();
|
||||
break;
|
||||
case '17_1':
|
||||
$this->addStoryViewPriv();
|
||||
break;
|
||||
}
|
||||
|
||||
$this->deletePatch();
|
||||
@@ -6437,4 +6440,29 @@ class upgradeModel extends model
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert story view of execution.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function addStoryViewPriv()
|
||||
{
|
||||
$groupIdList = $this->dao->select('`group`')->from(TABLE_GROUPPRIV)
|
||||
->where('module')->eq('story')
|
||||
->andWhere('method')->eq('view')
|
||||
->fetchPairs('group');
|
||||
|
||||
foreach($groupIdList as $groupID)
|
||||
{
|
||||
$this->dao->replace(TABLE_GROUPPRIV)
|
||||
->set('`group`')->eq($groupID)
|
||||
->set('module')->eq('execution')
|
||||
->set('method')->eq('storyView')
|
||||
->exec();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user