Indefero

Indefero Commit Details


Date:2010-10-09 05:40:30 (14 years 2 months 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:b51838596248ee17b634f46943c9ec9e7d8b338d
Parents: d25bc74d717e62a537e2e15ce960300e9f25ce0f
Message:Introduce a per-project issue template to hint a reporter to provide certain information in his issue report (closes issue 540).

Changes:

File differences

src/IDF/Form/Admin/ProjectCreate.php
313313
314314
315315
316
316317
317318
318319
'labels_download_one_max' => IDF_Form_UploadConf::init_one_max,
'labels_wiki_predefined' => IDF_Form_WikiConf::init_predefined,
'labels_wiki_one_max' => IDF_Form_WikiConf::init_one_max,
'labels_issue_template' => IDF_Form_IssueTrackingConf::init_template,
'labels_issue_open' => IDF_Form_IssueTrackingConf::init_open,
'labels_issue_closed' => IDF_Form_IssueTrackingConf::init_closed,
'labels_issue_predefined' => IDF_Form_IssueTrackingConf::init_predefined,
src/IDF/Form/IssueCreate.php
4545
4646
4747
48
49
50
4851
4952
5053
......
5760
5861
5962
60
63
6164
6265
6366
or $this->user->hasPerm('IDF.project-member', $this->project)) {
$this->show_full = true;
}
$contentTemplate = $this->project->getConf()->getVal(
'labels_issue_template', IDF_Form_IssueTrackingConf::init_template
);
$this->fields['summary'] = new Pluf_Form_Field_Varchar(
array('required' => true,
'label' => __('Summary'),
$this->fields['content'] = new Pluf_Form_Field_Varchar(
array('required' => true,
'label' => __('Description'),
'initial' => '',
'initial' => $contentTemplate,
'widget' => 'Pluf_Form_Widget_TextareaInput',
'widget_attrs' => array(
'cols' => 58,
src/IDF/Form/IssueTrackingConf.php
3131
3232
3333
34
35
36
37
38
39
40
41
42
3443
3544
3645
......
6675
6776
6877
78
79
80
81
82
83
84
85
86
6987
7088
7189
......
99117
100118
101119
102
103
104120
105121
106122
* Defined as constants to easily access the value in the
* IssueUpdate/Create form in the case nothing is in the db yet.
*/
const init_template = 'Steps to reproduce the problem:
1.
2.
3.
Expected result:
Actual result:
';
const init_open = 'New = Issue has not had initial review yet
Accepted = Problem reproduced / Need acknowledged
Started = Work on this issue has begun';
public function initFields($extra=array())
{
$this->fields['labels_issue_template'] = new Pluf_Form_Field_Varchar(
array('required' => false,
'label' => __('Define an issue template to hint the reporter to provide certain information'),
'initial' => self::init_template,
'widget_attrs' => array('rows' => 7,
'cols' => 75),
'widget' => 'Pluf_Form_Widget_TextareaInput',
));
$this->fields['labels_issue_open'] = new Pluf_Form_Field_Varchar(
array('required' => true,
'label' => __('Open issue status values'),
'widget_attrs' => array('size' => 60),
));
}
}
src/IDF/Views/Project.php
277277
278278
279279
280
280
281
281282
282283
283284
......
535536
536537
537538
538
539
}
} else {
$params = array();
$keys = array('labels_issue_open', 'labels_issue_closed',
$keys = array('labels_issue_template',
'labels_issue_open', 'labels_issue_closed',
'labels_issue_predefined', 'labels_issue_one_max');
foreach ($keys as $key) {
$_val = $conf->getVal($key, false);
),
$request);
}
}
}
src/IDF/templates/idf/admin/issue-tracking.html
44
55
66
7
8
9
10
11
12
713
814
915
<form method="post" action=".">
<table class="form" summary="">
<tr>
<td colspan="2"><strong>{$form.f.labels_issue_template.labelTag}:</strong><br />
{if $form.f.labels_issue_template.errors}{$form.f.labels_issue_template.fieldErrors}{/if}
{$form.f.labels_issue_template|unsafe}
</td>
</tr>
<tr>
<td colspan="2"><strong>{$form.f.labels_issue_open.labelTag}:</strong><br />
{if $form.f.labels_issue_open.errors}{$form.f.labels_issue_open.fieldErrors}{/if}
{$form.f.labels_issue_open|unsafe}

Archive Download the corresponding diff file

Page rendered in 0.09396s using 14 queries.