Error edit my own custom Fields! Jira delete the Values when edit the Issue! why?

Christian Schulze January 28, 2012

Hello,

I wrote a plugin with two custom-fields, which where configure like this:

        <customfield-type key="externalURL" name="ExternalURL" class="PATH_TO_MYFIELDS.ExternalURLField">
		<description>
			ExternalURL Field.
		</description>
		<resource type="velocity" name="view"
			location="templates/views/j2j-view-url.vm" />
		<resource type="velocity" name="edit"
   			location="templates/plugins/fields/edit/edit-readonly.vm" />
		<resource type="velocity" name="xml"
			location="templates/plugins/fields/xml/xml-basictext.vm" />
	</customfield-type>

I set this CustomField inside the code of my plugin, the user not to have rights to do this. But I set the value, and the I edit the Issue the normal way that jira provides, and then the Value is gone, jira delete it in the DB, I think because it is not in the html-form. When I use for Edit the edit-basictext.vm it works and the value is not deleted. Ok so i make my own template and use the edit-basictext.vm script and set the input Field to disabled. But that didn't work?

What is that, why did Jira delete CustomFiled Values by editing the Issue?

regards Chris

1 answer

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 28, 2012

Is your custom field available on the edit screen? If so, do you have something like this? the header and footer?

#customControlHeader ($action $customField.id $customField.name $fieldLayoutItem.required $displayParameters $auiparams)
...
#customControlFooter ($action $customField.id $fieldLayoutItem.fieldDescription $displayParameters $auiparams)

Suggest an answer

Log in or Sign up to answer