Indefero

Indefero Commit Details


Date:2010-10-31 18:18:35 (14 years 1 month ago)
Author:Thomas Keller
Branch:develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:8993d2988b9c2ea5a01b03f841a29bc530d5cf20
Parents: e776fc0713ae42c888dca99de2f61a90b34a23b5
Message:Pick initial issue type and priority from the particular first item of the predefined issue labels list (thanks Jakub Vitak, closes issue 556)

Changes:

File differences

src/IDF/Form/IssueCreate.php
108108
109109
110110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
111136
112137
113138
114139
115
140
116141
117142
118
143
119144
120145
121146
'size' => 15,
),
));
/*
* get predefined tags for issues from current project
*
* first Type:<...> and Priority:<...> will be used
*
*/
$predefined = preg_split("/[\r\n]+/", $extra['project']->getConf()->getVal(
'labels_issue_predefined'
));
$predefined_type = 'Type:Defect';
foreach ($predefined as $tag) {
if (strpos($tag, 'Type:') === 0) {
$predefined_type = $tag;
break;
}
}
$predefined_priority = 'Priority:Medium';
foreach ($predefined as $tag) {
if (strpos($tag, 'Priority:') === 0) {
$predefined_priority = $tag;
break;
}
}
for ($i=1;$i<7;$i++) {
$initial = '';
switch ($i) {
case 1:
$initial = 'Type:Defect';
$initial = $predefined_type;
break;
case 2:
$initial = 'Priority:Medium';
$initial = $predefined_priority;
break;
}
$this->fields['label'.$i] = new Pluf_Form_Field_Varchar(
src/IDF/Form/IssueTrackingConf.php
105105
106106
107107
108
108109
109110
110111
array('required' => true,
'label' => __('Predefined issue labels'),
'initial' => self::init_predefined,
'help_text' => __('The first "Type:" and "Priority:" entries found in this list are automatically chosen as defaults for new issues.'),
'widget_attrs' => array('rows' => 7,
'cols' => 75),
'widget' => 'Pluf_Form_Widget_TextareaInput',
src/IDF/templates/idf/admin/issue-tracking.html
2424
2525
2626
27
27
28
2829
2930
3031
<tr>
<td colspan="2"><strong>{$form.f.labels_issue_predefined.labelTag}:</strong><br />
{if $form.f.labels_issue_predefined.errors}{$form.f.labels_issue_predefined.fieldErrors}{/if}
{$form.f.labels_issue_predefined|unsafe}
{$form.f.labels_issue_predefined|unsafe}<br />
<span class="helptext">{$form.f.labels_issue_predefined.help_text}</span>
</td>
</tr>
<tr>

Archive Download the corresponding diff file

Page rendered in 0.08163s using 14 queries.