Skip to main content
summaryrefslogtreecommitdiffstats
blob: 86416a7d0df97f2acecd3b5775d0c5161564f800 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
/*******************************************************************************
 * Copyright (c) 2004, 2007 Mylyn project committers and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/

package org.eclipse.mylyn.internal.bugzilla.core;

import org.eclipse.mylyn.tasks.core.data.TaskAttribute;

/**
 * @author Rob Elves
 */
public enum BugzillaAttribute {

	STATUS_WHITEBOARD("Status Whiteboard:", "status_whiteboard", TaskAttribute.TYPE_LONG_RICH_TEXT, false, false),

	ACTUAL_TIME("Worked:", "actual_time", TaskAttribute.TYPE_SHORT_TEXT, true, true),

	ADD_COMMENT("Additional Comments:", "comment", TaskAttribute.TYPE_LONG_TEXT, true, false),

	ASSIGNED_TO("Assigned to:", "assigned_to", TaskAttribute.TYPE_PERSON, true, true),

	ASSIGNED_TO_NAME("Assigned to:", "assigned_to_name", TaskAttribute.TYPE_PERSON, true, true),

	ATTACHID("attachid", "attachid", TaskAttribute.TYPE_SHORT_TEXT, false, false),

	ATTACHMENT("attachment", "attachment", TaskAttribute.TYPE_ATTACHMENT, false, false),

	BLOCKED("Blocks:", "blocked", TaskAttribute.TYPE_TASK_DEPENDENCY, false, false),

	BUG("bug", "bug", TaskAttribute.TYPE_SHORT_TEXT, true, false),

	BUG_FILE_LOC("URL:", "bug_file_loc", TaskAttribute.TYPE_URL, false, false),

	BUG_ID("Bug:", "bug_id", TaskAttribute.TYPE_SHORT_TEXT, true, false),

	BUG_SEVERITY("Severity:", "bug_severity", TaskAttribute.TYPE_SINGLE_SELECT, false, false),

	BUG_STATUS("Status:", "bug_status", TaskAttribute.TYPE_SHORT_TEXT, true, true),

	BUG_WHEN("bug_when", "bug_when", TaskAttribute.TYPE_DATE, true, true),

	BUGZILLA("bugzilla", "bugzilla", TaskAttribute.TYPE_SHORT_TEXT, true, false),

	CC("CC:", "cc", IBugzillaConstants.EDITOR_TYPE_REMOVECC, true, true),

	REMOVECC("Remove CC", "removecc", IBugzillaConstants.EDITOR_TYPE_REMOVECC, true, true),

	CCLIST_ACCESSIBLE("CC List", "cclist_accessible", TaskAttribute.TYPE_BOOLEAN, true, false),

	CLASSIFICATION("Classification:", "classification", TaskAttribute.TYPE_SHORT_TEXT, true, false),

	CLASSIFICATION_ID("Classification ID:", "classification_id", TaskAttribute.TYPE_SHORT_TEXT, true, false),

	COMPONENT("Component:", "component", TaskAttribute.TYPE_SINGLE_SELECT, false, false),

	CREATION_TS("Opened:", "creation_ts", TaskAttribute.TYPE_DATE, true, false),

	CTYPE("Content Type", "ctype", TaskAttribute.TYPE_SHORT_TEXT, false, false),

	DATA("data", "data", TaskAttribute.TYPE_SHORT_TEXT, false, false),

	DATE("Date", "date", TaskAttribute.TYPE_DATE, false, false),

	DEADLINE("Due:", "deadline", TaskAttribute.TYPE_DATE, true, false),

	DELTA_TS("Modified:", "delta_ts", TaskAttribute.TYPE_DATE, true, false),

	DEPENDSON("Depends on (Subtasks):", "dependson", TaskAttribute.TYPE_TASK_DEPENDENCY, false, false),

	DESC("desc", "desc", TaskAttribute.TYPE_LONG_TEXT, true, true),

	EVERCONFIRMED("everconfirmed", "everconfirmed", TaskAttribute.TYPE_BOOLEAN, true, false),

	ESTIMATED_TIME("Estimated Time:", "estimated_time", TaskAttribute.TYPE_SHORT_TEXT, true, false),

	FILENAME("filename", "filename", TaskAttribute.TYPE_SHORT_TEXT, false, false),

	GROUP("Group", "group", TaskAttribute.TYPE_BOOLEAN, true, true),

	IS_OBSOLETE("Obsolete", "isobsolete", TaskAttribute.TYPE_BOOLEAN, true, false),

	IS_PATCH("Patch", "ispatch", TaskAttribute.TYPE_BOOLEAN, true, false),

	KEYWORDS("Keywords:", "keywords", IBugzillaConstants.EDITOR_TYPE_KEYWORDS, false, false),

	LONG_DESC("Description:", "long_desc", TaskAttribute.TYPE_LONG_RICH_TEXT, true, true),

	LONGDESCLENGTH("Number of comments", "longdesclength", TaskAttribute.TYPE_SHORT_TEXT, true, false),

	NEWCC("Add CC:", "newcc", TaskAttribute.TYPE_PERSON, true, false),

	OP_SYS("OS:", "op_sys", TaskAttribute.TYPE_SINGLE_SELECT, false, false),

	PRIORITY("Priority:", "priority", TaskAttribute.TYPE_SINGLE_SELECT, false, false),

	PRODUCT("Product:", "product", TaskAttribute.TYPE_SHORT_TEXT, false, true),

	REP_PLATFORM("Platform:", "rep_platform", TaskAttribute.TYPE_SINGLE_SELECT, false, false),

	REPORTER("Reporter:", "reporter", TaskAttribute.TYPE_PERSON, true, true),

	REPORTER_NAME("Reporter:", "reporter_name", TaskAttribute.TYPE_PERSON, true, true),

	REPORTER_ACCESSIBLE("Reporter", "reporter_accessible", TaskAttribute.TYPE_BOOLEAN, true, false),

	RESOLUTION("Resolution:", "resolution", TaskAttribute.TYPE_SHORT_TEXT, false, true),

	REMAINING_TIME("Remaining:", "remaining_time", TaskAttribute.TYPE_SHORT_TEXT, true, false),

	SET_DEFAULT_ASSIGNEE("Reassign to default assignee", "set_default_assignee", TaskAttribute.TYPE_OPERATION, false,
			false),

	SHORT_DESC("Summary:", "short_desc", TaskAttribute.TYPE_SHORT_TEXT, true, false),

	SIZE("Size:", "size", TaskAttribute.TYPE_SHORT_TEXT, false, false),

	TARGET_MILESTONE("Target milestone:", "target_milestone", TaskAttribute.TYPE_SINGLE_SELECT, false, false),

	THETEXT("thetext", "thetext", TaskAttribute.TYPE_SHORT_TEXT, false, true),

	TYPE("type", "type", TaskAttribute.TYPE_SHORT_TEXT, false, false),

	UNKNOWN("UNKNOWN", "UNKNOWN", TaskAttribute.TYPE_SHORT_TEXT, false, false),

	VERSION("Version:", "version", TaskAttribute.TYPE_SINGLE_SELECT, false, false),

	INSTALL_VERSION("version of bugzilla installed", "install_version", null, true, false),

	VOTES("Votes:", "votes", IBugzillaConstants.EDITOR_TYPE_VOTES, false, true),

	WORK_TIME("Add:", "work_time", TaskAttribute.TYPE_SHORT_TEXT, true, false),

	WHO("who", "who", TaskAttribute.TYPE_PERSON, false, false),

	WHO_NAME("who_name", "who_name", TaskAttribute.TYPE_SHORT_TEXT, true, true),

	QA_CONTACT("QA Contact", "qa_contact", TaskAttribute.TYPE_PERSON, true, false),

	QA_CONTACT_NAME("QA Contact", "qa_contact_name", TaskAttribute.TYPE_SHORT_TEXT, true, true),

	ADDSELFCC("Add self to CC", "addselfcc", TaskAttribute.TYPE_BOOLEAN, false, false),

	STATUS_OPEN("open status values", "status_open", null, true, true),

	NEW_COMMENT("new comment", "new_comment", TaskAttribute.TYPE_LONG_RICH_TEXT, true, false),

	// Used by search engine
	LI("used by search engine", "li", null, true, false),

	ID("used by search engine", "id", null, true, false),

	SHORT_SHORT_DESC("used by search engine", "short_short_desc", null, false, false),

	SEQ("used by search engine", "seq", null, false, false),

	RESULT("used by search engine", "result", null, false, false),

	RDF("used by search engine", "rdf", null, false, false),

	INSTALLATION("used by search engine", "installation", null, false, false),

	BUGS("used by search engine", "bugs", null, false, false);

	private final boolean isHidden;

	private final boolean isReadOnly;

	private final String keyString;

	private final String prettyName;

	private final String type;

	public static final BugzillaAttribute[] EXTENDED_ATTRIBUTES = { DELTA_TS, BUG_SEVERITY, PRODUCT };

	BugzillaAttribute(String prettyName, String idKey, String type, boolean hidden, boolean readonly) {
		this.prettyName = prettyName;
		this.keyString = idKey;
		this.type = type;
		this.isHidden = hidden;
		this.isReadOnly = readonly;
	}

	public String getKey() {
		return keyString;
	}

	public boolean isHidden() {
		return isHidden;
	}

	public boolean isReadOnly() {
		return isReadOnly;
	}

	public String toString() {
		return prettyName;
	}

	public String getKind() {
		return isHidden() ? null : TaskAttribute.KIND_DEFAULT;
	}

	public String getType() {
		return type;
	}

}

Back to the top