Zen defects whether to increase the sources of legacy and custom fields
by: award-off QQ : 1033553122
Environmental Practices
Zen project management software 9.2.1, the open source Linux version 8.0
Add to the database table zt_bug custom fields
ALTER TABLE `zt_bug` ADD COLUMN isHistory VARCHAR(10) AFTER severity;
ALTER TABLE `zt_bug` ADD COLUMN channel VARCHAR(50) AFTER severity;
Modify zentaopms / module / bug / lang / zh-cn.php
Below, illustrates the new box Bug field, i.e., the following code is inserted in place
$ Lang-> bug-> source = 'Bug roots';
Below, the following code is inserted in place
$ Lang-> bug-> sourceList [ 'codeerror'] = 'product design defects';
$ Lang-> bug-> sourceList [ 'bug'] = 'a program code error';
Description: 'product design defects' and 'program code error' as defined herein for storing data corresponding to the drop-down box in the select field of the 'bug', 'productDesign', creating Bug / Bug edited and saved, will be stored to the database.
Note: I use the Zen, the language setting is Chinese, so only modify zh-cn.php, does not modify the English en.php and tw.php
修改zentaopms/module/bug/view/create.html.php
Below, the following code
<tr>
<th><?php echo $lang->bug->type;?></th>
<td>
<div class='input-group' id='bugTypeInputGroup'>
<?php
/* Remove the unused types. */
unset($lang->bug->typeList['designchange']);
unset($lang->bug->typeList['newfeature']);
unset($lang->bug->typeList['trackthings']);
echo html::select('type', $lang->bug->typeList, $type, "class='form-control'");
?>
<?php if($showOS):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->os?></span>
<?php echo html::select('os', $lang->bug->osList, $os, "class='form-control'");?>
<?php endif;?>
<?php if($showBrowser):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->browser?></span>
<?php echo html::select('browser', $lang->bug->browserList, $browser, "class='form-control'");?>
<?php endif;?>
</div>
</td>
</tr>
<?php endif;?>
Modify the following code
<tr>
<th><?php echo $lang->bug->isHistory;?></th>
<td>
<div class='input-group'>
<?php echo html::select('isHistory', $lang->bug->isHistoryList, $isHistory, "class='form-control'");?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->channel;?></span>
<div class='w-150px'><?php echo html::select('channel', $lang->bug->channelList, $channel, "class='form-control'");?></div>
<span class='input-group-addon fix-border'><?php echo $lang->bug->type;?></span>
<?php
/* Remove the unused types. */
unset($lang->bug->typeList['designchange']);
unset($lang->bug->typeList['newfeature']);
unset($lang->bug->typeList['trackthings']);
echo html::select('type', $lang->bug->typeList, $type, "class='form-control'");
?>
<?php if($showOS):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->os?></span>
<?php echo html::select('os', $lang->bug->osList, $os, "class='form-control'");?>
<?php endif;?>
<?php if($showBrowser):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->browser?></span>
<?php echo html::select('browser', $lang->bug->browserList, $browser, "class='form-control'");?>
<?php endif;?>
</div>
</td>
</tr>
Modifying Effects
As above, the following section with background color lead to "all users" button to go to the right, and we want it to remain the same, the drop-down box next to the current assignment, we supposed to?
<div class='w-150px'><?php echo html::select('channel', $lang->bug->channelList, $channel, "class='form-control'");?></div>
Solutions are as follows: the contents removed with the background color portion, can
<td>
<div class='input-group'>
<span id='assignedToBox'><?php echo html::select('assignedTo', $projectMembers, $assignedTo, "class='form-control chosen'");?></span>
<span class='input-group-btn'><?php echo html::commonButton($lang->bug->allUsers, "class='btn btn-default' onclick='loadAllUsers()' data-toggle='tooltip'");?></span>
</div>
</td>
effect
Note: After changing create.html.php found the back pages by the above manner, found the page zooming, there will be issues with the style of the disorder, the solution:
1, the above code changes reducing
2, the contents of the background color portion is inserted in place
<tr>
<th><nobr><?php echo $lang->bug->lblAssignedTo;?></nobr></th>
<td>
<div class='input-group'>
<span id='assignedToBox'><?php echo html::select('assignedTo', $projectMembers, $assignedTo, "class='form-control chosen'");?></span>
<span class='input-group-btn'><?php echo html::commonButton($lang->bug->allUsers, "class='btn btn-default' onclick='loadAllUsers()' data-toggle='tooltip'");?></span>
</div>
</td>
<?php $showDeadline = strpos(",$showFields,", ',deadline,') !== false;?>
<?php if($showDeadline):?>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->bug->deadline?></span>
<span><?php echo html::input('deadline', $deadline, "class='form-control form-date'");?></span>
</div>
</td>
<?php endif;?>
</tr>
<tr>
<th><?php echo $lang->bug->isHistory;?></th>
<td>
<div class='input-group' id='bugTypeInputGroup'>
<?php echo html::select('isHistory', $lang->bug->isHistoryList, $isHistory, "class='form-control'");?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->channel;?></span>
<?php echo html::select('channel', $lang->bug->channelList, $channel, "class='form-control'");?>
</div>
</td>
</tr>
<?php if($this->config->global->flow != 'onlyTest'):?>
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
<?php $showBrowser = strpos(",$showFields,", ',browser,') !== false;?>
<tr>
<th><?php echo $lang->bug->type;?></th>
<td>
<div class='input-group' id='bugTypeInputGroup'>
<?php
/* Remove the unused types. */
unset($lang->bug->typeList['designchange']);
unset($lang->bug->typeList['newfeature']);
unset($lang->bug->typeList['trackthings']);
echo html::select('type', $lang->bug->typeList, $type, "class='form-control'");
?>
<?php if($showOS):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->os?></span>
<?php echo html::select('os', $lang->bug->osList, $os, "class='form-control'");?>
<?php endif;?>
<?php if($showBrowser):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->browser?></span>
<?php echo html::select('browser', $lang->bug->browserList, $browser, "class='form-control'");?>
<?php endif;?>
</div>
</td>
</tr>
<?php endif;?>
Modifying Effects
Of course, such a change can be as follows
modify
<?php if($this->config->global->flow != 'onlyTest'):?>
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
<?php $showBrowser = strpos(",$showFields,", ',browser,') !== false;?>
<tr>
<th><?php echo $lang->bug->type;?></th>
<td>
<div class='input-group' id='bugTypeInputGroup'>
<?php
/* Remove the unused types. */
unset($lang->bug->typeList['designchange']);
unset($lang->bug->typeList['newfeature']);
unset($lang->bug->typeList['trackthings']);
echo html::select('type', $lang->bug->typeList, $type, "class='form-control'");
?>
<?php if($showOS):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->os?></span>
<?php echo html::select('os', $lang->bug->osList, $os, "class='form-control'");?>
<?php endif;?>
<?php if($showBrowser):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->browser?></span>
<?php echo html::select('browser', $lang->bug->browserList, $browser, "class='form-control'");?>
<?php endif;?>
</div>
</td>
</tr>
<?php endif;?>
for
<?php if($this->config->global->flow != 'onlyTest'):?>
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
<?php $showBrowser = strpos(",$showFields,", ',browser,') !== false;?>
<tr>
<th><?php echo $lang->bug->isHistory;?></th>
<td>
<div class='input-group' >
<?php echo html::select('isHistory', $lang->bug->isHistoryList, $isHistory, "class='form-control'");?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->channel;?></span>
<?php echo html::select('channel', $lang->bug->channelList, $channel, "class='form-control'");?>
</div>
</td>
<td>
<div class='input-group' id='bugTypeInputGroup'>
<span class='input-group-addon'><?php echo $lang->bug->type;?></span>
<?php
/* Remove the unused types. */
unset($lang->bug->typeList['designchange']);
unset($lang->bug->typeList['newfeature']);
unset($lang->bug->typeList['trackthings']);
echo html::select('type', $lang->bug->typeList, $type, "class='form-control'");
?>
<?php if($showOS):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->os?></span>
<?php echo html::select('os', $lang->bug->osList, $os, "class='form-control'");?>
<?php endif;?>
<?php if($showBrowser):?>
<span class='input-group-addon fix-border'><?php echo $lang->bug->browser?></span>
<?php echo html::select('browser', $lang->bug->browserList, $browser, "class='form-control'");?>
<?php endif;?>
</div>
</td>
</tr>
<?php endif;?>
Modifying Effects
Modify zentaopms / module / bug / view / edit.html.php
Below, the following code is inserted in place
js::set('isHistory' , $bug->isHistory);
js::set('channel' , $bug->channel);
Below, the following code is inserted in place
<tr>
<th><?php echo $lang->bug->isHistory;?></th>
<td><?php echo html::select('isHistory', $lang->bug->isHistoryList, $bug->isHistory, "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->bug->channel;?></th>
<td><?php echo html::select('channel', $lang->bug->channelList, $bug->channel, "class='form-control'");?></td>
</tr>
Modifying Effects
Modify zentaopms / module / bug / view / resolve.html.php
Below, the following code is inserted in place
<tr>
<th class='w-80px'><?php echo $lang->bug->isHistory;?></th>
<td class='w-p35-f'><?php echo html::select('isHistory', $lang->bug->isHistoryList, $bug->isHistory, "class='form-control' ");?></td>
</tr>
Modifying Effects
修改zentaopms/module/bug/view/view.html.php
The following code is inserted in place
<tr>
<Th> <? Php echo 'left over from history?'?> </ Th>
<td><span class='<?php echo 'isHistory' . zget($lang->bug->isHistoryList, $bug->isHistory);?>'><?php echo zget($lang->bug->isHistoryList, $bug->isHistory)?></span></td>
</tr>
<tr>
<th><?php echo $lang->bug->channel;?></th>
<td><span class='<?php echo 'channel' . zget($lang->bug->channelList, $bug->channel);?>'><?php echo zget($lang->bug->channelList, $bug->channel)?></span></td>
</tr>
Modifying Effects