Indefero

Indefero Git Source Tree

Root/src/IDF/Form/IssueTrackingConf.php

1<?php
2/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3/*
4# ***** BEGIN LICENSE BLOCK *****
5# This file is part of InDefero, an open source project management application.
6# Copyright (C) 2008-2011 Céondo Ltd and contributors.
7#
8# InDefero is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# InDefero is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21#
22# ***** END LICENSE BLOCK ***** */
23
24
25/**
26 * Configuration of the labels etc.
27 */
28class IDF_Form_IssueTrackingConf extends Pluf_Form
29{
30 /**
31 * Defined as constants to easily access the value in the
32 * IssueUpdate/Create form in the case nothing is in the db yet.
33 */
34 const init_template = 'Steps to reproduce the problem:
351.
362.
373.
38
39Expected result:
40
41Actual result:
42';
43 const init_open = 'New = Issue has not had initial review yet
44Accepted = Problem reproduced / Need acknowledged
45Started = Work on this issue has begun';
46 const init_closed = 'Fixed = Developer made requested changes, QA should verify
47Verified = QA has verified that the fix worked
48Invalid = This was not a valid issue report
49Duplicate = This report duplicates an existing issue
50WontFix = We decided to not take action on this issue';
51 const init_predefined = 'Type:Defect = Report of a software defect
52Type:Enhancement = Request for enhancement
53Type:Task = Work item that doesn\'t change the code or docs
54Type:Patch = Source code patch for review
55Type:Other = Some other kind of issue
56Priority:Critical = Must resolve in the specified milestone
57Priority:High = Strongly want to resolve in the specified milestone
58Priority:Medium = Normal priority
59Priority:Low = Might slip to later milestone
60OpSys:All = Affects all operating systems
61OpSys:Windows = Affects Windows users
62OpSys:Linux = Affects Linux users
63OpSys:OSX = Affects Mac OS X users
64Milestone:Release1.0 = All essential functionality working
65Component:UI = Issue relates to program UI
66Component:Logic = Issue relates to application logic
67Component:Persistence = Issue relates to data storage components
68Component:Scripts = Utility and installation scripts
69Component:Docs = Issue relates to end-user documentation
70Security = Security risk to users
71Performance = Performance issue
72Usability = Affects program usability
73Maintainability = Hinders future changes';
74 const init_one_max = 'Type, Priority, Milestone';
75 // ATTENTION: if you change something here, change the values below as well!
76 const init_relations = 'is related to
77blocks, is blocked by
78duplicates, is duplicated by';
79
80 // These are actually all noop's, but we have no other chance to
81 // tell IDF's translation mechanism to mark the strings as translatable
82 // FIXME: IDF should get a internal translation system for strings like
83 // that, that can also be easily expanded by users
84 private function noop()
85 {
86 __('is related to');
87 __('blocks');
88 __('is blocked by');
89 __('duplicates');
90 __('is duplicated by');
91 }
92
93 public function initFields($extra=array())
94 {
95 $this->fields['labels_issue_template'] = new Pluf_Form_Field_Varchar(
96 array('required' => false,
97 'label' => __('Define an issue template to hint the reporter to provide certain information'),
98 'initial' => self::init_template,
99 'widget_attrs' => array('rows' => 7,
100 'cols' => 75),
101 'widget' => 'Pluf_Form_Widget_TextareaInput',
102 ));
103
104 $this->fields['labels_issue_open'] = new Pluf_Form_Field_Varchar(
105 array('required' => true,
106 'label' => __('Open issue status values'),
107 'initial' => self::init_open,
108 'widget' => 'Pluf_Form_Widget_TextareaInput',
109 'widget_attrs' => array('rows' => 5,
110 'cols' => 75),
111 ));
112 $this->fields['labels_issue_closed'] = new Pluf_Form_Field_Varchar(
113 array('required' => true,
114 'label' => __('Closed issue status values'),
115 'initial' => self::init_closed,
116 'widget_attrs' => array('rows' => 7,
117 'cols' => 75),
118 'widget' => 'Pluf_Form_Widget_TextareaInput',
119 ));
120
121 $this->fields['labels_issue_predefined'] = new Pluf_Form_Field_Varchar(
122 array('required' => true,
123 'label' => __('Predefined issue labels'),
124 'initial' => self::init_predefined,
125 'help_text' => __('The first "Type:" and "Priority:" entries found in this list are automatically chosen as defaults for new issues.'),
126 'widget_attrs' => array('rows' => 7,
127 'cols' => 75),
128 'widget' => 'Pluf_Form_Widget_TextareaInput',
129 ));
130
131 $this->fields['labels_issue_one_max'] = new Pluf_Form_Field_Varchar(
132 array('required' => false,
133 'label' => __('Each issue may have at most one label with each of these classes.'),
134 'initial' => self::init_one_max,
135 'widget_attrs' => array('size' => 60),
136 ));
137
138 $this->fields['issue_relations'] = new Pluf_Form_Field_Varchar(
139 array('required' => true,
140 'label' => __('Issue relations'),
141 'initial' => self::init_relations,
142 'help_text' => __('You can define bidirectional relations like "is related to" or "blocks, is blocked by". For standard relations pre-configured translations exist, new relations should however be defined in a language that is understood by all project members.'),
143 'widget_attrs' => array('rows' => 7,
144 'cols' => 75),
145 'widget' => 'Pluf_Form_Widget_TextareaInput',
146 ));
147 }
148}
149
150
151

Archive Download this file