CustomField
A Custom field extension is a Java
class
, that must be
annotated
as
@CustomField and
@Component
.
In order to be automatically detected and deployed by the
Component Scan during
Codebeamer startup, the
package
of your extension class must be a sub-package of
com.intland.codebeamer.
The
@CustomField annotation
has the following attributes:
• type—The mapped
Codebeamer field type.
• of—An optional field type qualifier. For example, this could be a Wikitext representation of a checklist.
If the
JIRA custom field
has a primitive type, such as
string, that is compatible with the mapped
Codebeamer field type, such as
Text, then an empty class with only the annotations is already sufficient.
package com.intland.codebeamer.controller.jira;
import org.springframework.stereotype.Component;
import com.intland.codebeamer.controller.jira.CustomField;
@Component("ru.andreymarkelov.atlas.plugins.colorfields:picker-color-custom-field")
@CustomField(type = "Color")
public class ColorPickerField {
}
With more complex field types, you may also need to add support for specific aspects of custom field schema and value handling. For example you may need to do the following:
• Convert JIRA custom fields values into appropriate Codebeamer field values and vice versa.
• Convert JIRA custom field change log entries into appropriate Codebeamer history entries.
package com.intland.codebeamer.controller.jira;
import org.springframework.stereotype.Component;
import com.intland.codebeamer.controller.jira.CustomField;
@Component("com.okapya.jira.checklist:checklist")
@CustomField(type="WikiText", of="Checklist")
public class ChecklistForJiraField {
...
}
All methods of @CustomField extensions must be the following:
Context specific information that is required by a method must be declared as
parameters.
Only the parameter type is relevant, not the parameter name or position.