Forums » Development »
Change format of Custom Field
Added by Arin Lipman over 12 years ago
Hey Y'all,
I've built a custom field plugin for my organization, but we had already created (and have used) a custom field. It appears that I can't change the format in the custom fields edit screen. Is it possible to manually change it somewhere? The format created in my plugin is the same type, but has a different presentation (it turns the value into a link to another internal system), so I'm not worried about any data conversion.
Thanks!
Arin
Replies (1)
RE: Change format of Custom Field
-
Added by Arin Lipman over 12 years ago
I was able to resolve this issue, but now I'm realizing that I can't see the values from my custom field in the issue query. Am I missing a function in my class?
Here is the code for the class:
class FooCustomFieldFormat < Redmine::CustomFieldFormat
include ActionView::Helpers::TextHelper
include ActionView::Helpers::TagHelper
def format_as_foo(value)
ActionController::Base.helpers.link_to(value, "http://foo?case="+ value, :target => 'blank')
end
def escape_html?
false
end
def edit_as
"integer"
end
end