Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Custom Field Type $value customization

Sebastiano Costa July 31, 2015

Hi everybody,

I've developed a custom field type which extends a simple GenericTextCFType, the point is that this custom field open a popup(very similar to UserPicker) and let you choose a Client with name/surname/etc...

Now the point is that this process store the Client id (and that's right) but when i open the issue to visualize the value, I'll see the id and not the name.

in .vm files the id is stored as $value (i think this is because it is standard)

Now, the point is:

"How can I intercept this $value in order to pass it to the class and elaborate it to return the name?"

 

Hope to find a solution

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Sebastiano Costa August 4, 2015

Ok, found a solution. I had to Ovveride following method

@Override

	public String getValueFromIssue(CustomField field, Issue issue) {
		//Here is where i get the value (the id)
		String internalValue= super.getValueFromIssue(field, issue); 

		/*
		* Here it goes the code to elaborate the value
		*/

		return elaboratedValue;
	}
TAGS
AUG Leaders

Atlassian Community Events