<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE entitymodel PUBLIC "-//OFBiz//DTD Entity Model//EN" "http://www.ofbiz.org/dtds/entitymodel.dtd"> <entitymodel> <title>Entity Model for You External Entity</title> <description>...</description> <version>1.0</version> <entity entity-name="Product" table-name="XXX_Product" package-name=""> <field name="id" type="numeric"/> <field name="name" type="short-varchar" /> <field name="description" type="short-varchar" /> <field name="version" type="short-varchar" /> ... <prim-key field="id" /> </entity> </entitymodel>
<!-- Entity Product for Software Product description --> <entity-group group="default" entity="Product"/>
<atlassian-plugin key="your.company.plugin.key" name="Your Plugin"> ... <customfield-type key="yourCustomfieldTypeKey" name="yourCustomfieldTypeName" class="com.atlassian.jira.issue.customfields.impl.ExternalCFType"> <description>Your Customfield Description.</description> <resource type="velocity" name="edit" location="templates/plugins/customfields/edit/edit-external.vm" /> <resource type="velocity" name="view" location="templates/plugins/customfields/edit/view-external.vm" /> <resource type="i18n" name="i18n" location="your.company.package.yourcustomfield" /> <param name="entityName" value="Product" /> <param name="entityValue" value="name" /> </customfield-type> ... </atlassian-plugin>
Now, you declare through JIRA Administration interface a new CutosmField using the yourCustomfieldTypeName.
When in the Edit mode, you will have to enter the ID attribute.
When in the View mode, Customfield will display Name attribute, as it is defined in the customfield-type module.