* code task #6956.
This commit is contained in:
@@ -54,3 +54,5 @@ $config->repo->rules['id']['split'] = ',';
|
||||
$config->repo->rules['mark']['consumed'] = ':';
|
||||
$config->repo->rules['mark']['left'] = ':';
|
||||
$config->repo->rules['mark']['resolvedBuild'] = '#';
|
||||
$config->repo->rules['unit']['consumed'] = 'h';
|
||||
$config->repo->rules['unit']['left'] = 'h';
|
||||
|
||||
+54
-22
@@ -15,6 +15,8 @@ function replaceExample()
|
||||
var consumedmark = $('[id*=mark][id*=consumed]').val().split(';');
|
||||
var lefts = $('[id*=task][id*=left]').val().split(';');
|
||||
var leftMarks = $('[id*=mark][id*=left]').val().split(';');
|
||||
var cunits = $('[id*=unit][id*=consumed]').val().split(';');
|
||||
var lunits = $('[id*=unit][id*=left]').val().split(';');
|
||||
|
||||
for(i in startTask)
|
||||
{
|
||||
@@ -40,14 +42,24 @@ function replaceExample()
|
||||
for(p in leftMarks)
|
||||
{
|
||||
leftMark = leftMarks[p];
|
||||
html += '<br />' + rulesExample['task']['start'].replace('%start%', start)
|
||||
.replace('%task%', task)
|
||||
.replace('%id%', id)
|
||||
.replace('%split%', split)
|
||||
.replace('%cost%', cost)
|
||||
.replace('%consumedmark%', consumed)
|
||||
.replace('%left%', left)
|
||||
.replace('%leftmark%', leftMark);
|
||||
for(q in cunits)
|
||||
{
|
||||
cunit = cunits[q];
|
||||
for(r in cunits)
|
||||
{
|
||||
lunit = lunits[q];
|
||||
html += '<br />' + rulesExample['task']['start'].replace('%start%', start)
|
||||
.replace('%task%', task)
|
||||
.replace('%id%', id)
|
||||
.replace('%split%', split)
|
||||
.replace('%cost%', cost)
|
||||
.replace('%consumedmark%', consumed)
|
||||
.replace('%left%', left)
|
||||
.replace('%leftmark%', leftMark)
|
||||
.replace('%cunit%', cunit)
|
||||
.replace('%lunit%', lunit);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,12 +88,22 @@ function replaceExample()
|
||||
for(n in consumedmark)
|
||||
{
|
||||
consumed = consumedmark[n];
|
||||
html += '<br />' + rulesExample['task']['finish'].replace('%finish%', finish)
|
||||
.replace('%task%', task)
|
||||
.replace('%id%', id)
|
||||
.replace('%split%', split)
|
||||
.replace('%cost%', cost)
|
||||
.replace('%consumedmark%', consumed)
|
||||
for(o in cunits)
|
||||
{
|
||||
cunit = cunits[o];
|
||||
for(p in cunits)
|
||||
{
|
||||
lunit = lunits[p];
|
||||
html += '<br />' + rulesExample['task']['finish'].replace('%finish%', finish)
|
||||
.replace('%task%', task)
|
||||
.replace('%id%', id)
|
||||
.replace('%split%', split)
|
||||
.replace('%cost%', cost)
|
||||
.replace('%consumedmark%', consumed)
|
||||
.replace('%cunit%', cunit)
|
||||
.replace('%lunit%', lunit);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,14 +136,24 @@ function replaceExample()
|
||||
for(p in leftMarks)
|
||||
{
|
||||
leftMark = leftMarks[p];
|
||||
html += '<br />' + rulesExample['task']['effort'].replace('%effort%', effort)
|
||||
.replace('%task%', task)
|
||||
.replace('%id%', id)
|
||||
.replace('%split%', split)
|
||||
.replace('%cost%', cost)
|
||||
.replace('%consumedmark%', consumed)
|
||||
.replace('%left%', left)
|
||||
.replace('%leftmark%', leftMark);
|
||||
for(q in cunits)
|
||||
{
|
||||
cunit = cunits[q];
|
||||
for(r in cunits)
|
||||
{
|
||||
lunit = lunits[r];
|
||||
html += '<br />' + rulesExample['task']['effort'].replace('%effort%', effort)
|
||||
.replace('%task%', task)
|
||||
.replace('%id%', id)
|
||||
.replace('%split%', split)
|
||||
.replace('%cost%', cost)
|
||||
.replace('%consumedmark%', consumed)
|
||||
.replace('%left%', left)
|
||||
.replace('%leftmark%', leftMark)
|
||||
.replace('%cunit%', cunit)
|
||||
.replace('%lunit%', lunit);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@ $lang->repo->objectRule = '对象匹配规则';
|
||||
$lang->repo->objectIdRule = '对象ID匹配规则';
|
||||
$lang->repo->actionRule = '动作匹配规则';
|
||||
$lang->repo->manHourRule = '工时匹配规则';
|
||||
$lang->repo->ruleUnit = "单位";
|
||||
$lang->repo->ruleSplit = "多关键字用';'分割,如:任务多关键字: Task;task";
|
||||
|
||||
$lang->repo->viewDiffList['inline'] = '直列';
|
||||
@@ -133,9 +134,9 @@ $lang->repo->notice->lastSyncTime = '最后更新于:';
|
||||
|
||||
$lang->repo->rules = new stdclass();
|
||||
$lang->repo->rules->exampleLabel = "注释示例";
|
||||
$lang->repo->rules->example['task']['start'] = "%start% %task% %id%1%split%2 %cost%%consumedmark%1 %left%%leftmark%3";
|
||||
$lang->repo->rules->example['task']['finish'] = "%finish% %task% %id%1%split%2 %cost%%consumedmark%10";
|
||||
$lang->repo->rules->example['task']['effort'] = "%effort% %task% %id%1%split%2 %cost%%consumedmark%1 %left%%leftmark%3";
|
||||
$lang->repo->rules->example['task']['start'] = "%start% %task% %id%1%split%2 %cost%%consumedmark%1%cunit% %left%%leftmark%3%lunit%";
|
||||
$lang->repo->rules->example['task']['finish'] = "%finish% %task% %id%1%split%2 %cost%%consumedmark%10%cunit%";
|
||||
$lang->repo->rules->example['task']['effort'] = "%effort% %task% %id%1%split%2 %cost%%consumedmark%1%cunit% %left%%leftmark%3%lunit%";
|
||||
$lang->repo->rules->example['bug']['resolve'] = "%resolve% %bug% %id%1%split%2 %resolvedBuild% %buildmark%10";
|
||||
|
||||
$lang->repo->error = new stdclass();
|
||||
|
||||
@@ -978,7 +978,7 @@ class repoModel extends model
|
||||
$tasks[$id] = $id;
|
||||
$actions['task'][$id]['action'] = 'start';
|
||||
$actions['task'][$id]['consumed'] = $matches[11][$i];
|
||||
$actions['task'][$id]['left'] = $matches[15][$i];
|
||||
$actions['task'][$id]['left'] = $matches[16][$i];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -994,7 +994,7 @@ class repoModel extends model
|
||||
$tasks[$id] = $id;
|
||||
$actions['task'][$id]['action'] = 'recordEstimate';
|
||||
$actions['task'][$id]['consumed'] = $matches[11][$i];
|
||||
$actions['task'][$id]['left'] = $matches[15][$i];
|
||||
$actions['task'][$id]['left'] = $matches[16][$i];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1098,6 +1098,8 @@ class repoModel extends model
|
||||
$buildMarks = str_replace(';', '|', preg_replace('/([^;])/', '\\\\\1', trim($rules['mark']['resolvedBuild'], ';')));
|
||||
$taskModule = str_replace(';', '|', trim($rules['module']['task'], ';'));
|
||||
$bugModule = str_replace(';', '|', trim($rules['module']['bug'], ';'));
|
||||
$costUnit = str_replace(';', '|', trim($rules['unit']['consumed'], ';'));
|
||||
$leftUnit = str_replace(';', '|', trim($rules['unit']['left'], ';'));
|
||||
$startAction = str_replace(';', '|', trim($rules['task']['start'], ';'));
|
||||
$finishAction = str_replace(';', '|', trim($rules['task']['finish'], ';'));
|
||||
$effortAction = str_replace(';', '|', trim($rules['task']['logEfforts'], ';'));
|
||||
@@ -1105,8 +1107,8 @@ class repoModel extends model
|
||||
|
||||
$taskReg = "(($taskModule) +(({$idMarks})[0-9]+(({$idSplits})[0-9]+)*))";
|
||||
$bugReg = "(($bugModule) +(({$idMarks})[0-9]+(({$idSplits})[0-9]+)*))";
|
||||
$costReg = "($costs) *(($costMarks)([0-9]+))";
|
||||
$leftReg = "($lefts) *(($leftMarks)([0-9]+))";
|
||||
$costReg = "($costs) *(($costMarks)([0-9]+)($costUnit))";
|
||||
$leftReg = "($lefts) *(($leftMarks)([0-9]+)($leftUnit))";
|
||||
$buildReg = "($builds) *(($buildMarks)([0-9]+))";
|
||||
|
||||
$startTaskReg = "({$startAction}) *{$taskReg} +$costReg +$leftReg";
|
||||
|
||||
@@ -64,12 +64,16 @@
|
||||
<?php echo html::input("rules[task][consumed]", $config->repo->rules['task']['consumed'], "class='form-control'");?>
|
||||
<span class='input-group-addon'><?php echo $lang->repo->mark?></span>
|
||||
<?php echo html::input("rules[mark][consumed]", $config->repo->rules['mark']['consumed'], "class='form-control'");?>
|
||||
<span class='input-group-addon'><?php echo $lang->repo->ruleUnit?></span>
|
||||
<?php echo html::input("rules[unit][consumed]", $config->repo->rules['unit']['consumed'], "class='form-control'");?>
|
||||
</div>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->task->left?></span>
|
||||
<?php echo html::input("rules[task][left]", $config->repo->rules['task']['left'], "class='form-control'");?>
|
||||
<span class='input-group-addon'><?php echo $lang->repo->mark?></span>
|
||||
<?php echo html::input("rules[mark][left]", $config->repo->rules['mark']['left'], "class='form-control'");?>
|
||||
<span class='input-group-addon'><?php echo $lang->repo->ruleUnit?></span>
|
||||
<?php echo html::input("rules[unit][left]", $config->repo->rules['unit']['left'], "class='form-control'");?>
|
||||
</div>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->bug->resolvedBuild?></span>
|
||||
|
||||
Reference in New Issue
Block a user