Project

General

Profile

Format custom field as a link

Added by Glailson Nogueira about 4 years ago

Hello! I'm having a issue with formatted_value. I have a plugin that stores the value of a specific cf as a json, like this: {"number"=>"15648", "url_link"=>"http://www.something.com/controller.php?action=process_work&id_process=1134717"}.

I need to show in the taks view the cf as a link, show only the number with the link view, and when editing the task, the cf shows only the number.

I've tried do to like this, but it disn't work: custom_value.value=view.link_to value["number"], value["url_link"]

Any help?


Replies (1)

RE: Format custom field as a link - Added by Glailson Nogueira about 4 years ago

Glailson Nogueira wrote:

Hello! I'm having a issue with formatted_value. I have a plugin that stores the value of a specific cf as a json, like this: {"number"=>"15648", "url_link"=>"http://www.something.com/controller.php?action=process_work&id_process=1134717"}.

I need to show in the taks view the cf as a link, show only the number with the link view, and when editing the task, the cf shows only the number.

I've tried do to like this, but it disn't work: custom_value.value=view.link_to value["number"], value["url_link"]

Any help?

FYI, I didn't use the link cf format beacause the url is not default, it changes.

    (1-1/1)