Feature #1358

Link_to for Custom Field

Added by Matthias Hahn about 9 years ago. Updated over 3 years ago.

Status:ClosedStart date:2008-06-03
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

90%

Category:Custom fieldsEstimated time:1.00 hour
Target version:2.5.0
Resolution:Fixed

Description

It would be nice to have a link_to field in the custom fields.

Picture_19.png - Implementation of linkable custom fields in Request Tracker (57.5 KB) Aron Burrell, 2009-03-03 22:58

linkable_custom_fields.diff Magnifier - Linkable Custom Fields patch (7.23 KB) Aron Burrell, 2009-03-04 21:15

linkable_custom_field_redmine_0.9.2_v1.0.patch Magnifier (11.2 KB) Vladimir Kovacik, 2010-03-10 10:38


Related issues

Related to Redmine - Feature #2906: Refine the custom fields display for projects New 2009-03-05
Related to Redmine - Feature #1179: Optionally allow Text and Long Text custom fields support... Closed 2008-05-05
Related to Redmine - Feature #5794: URL custom fields Closed 2010-07-01
Related to Redmine - Feature #5250: Custom Fields may allow full text transformation Closed 2010-04-06
Duplicated by Redmine - Feature #10398: Add a new custom field type with tags replacements Closed
Duplicated by Redmine - Feature #5833: Ability to specify template for a URL on a user defined c... Closed 2010-07-07
Duplicated by Redmine - Feature #2810: Custom formatting of custom fields Closed 2009-02-23

Associated revisions

Revision 12442
Added by Jean-Philippe Lang over 3 years ago

Adds support for links on values for various custom field formats (#1358).

History

#1 Updated by Jean-Philippe Lang about 9 years ago

  • Target version deleted (0.8)

What do you mean exactly ?

#2 Updated by Arthaey Angosii about 9 years ago

I would like this too, assuming I understand what the OP is asking for. What I want is to create links from bugs to test cases (source:path/to/testcase). This could also be implemented per issue #1179.

#3 Updated by Aron Burrell over 8 years ago

I'd like to bump this as a feature request. We use several systems internally to track projects/trouble tickets and being able to set links on custom fields to external sites would be handy.

For example, a custom field's configuration would have an additional line called 'URL' which allows a user to formulate a URL for a link with substitution text for the field value.

As a bonus, substitutions for project/issue/user/timetracking identifier would be cool.

Attaching a sample image from Request Tracker, which has a custom field linking system that allows me to link a ticket to a project in Redmine.

#4 Updated by Aron Burrell over 8 years ago

I have a patch that'll accomplish the job here. This is patched against svn rev 2552.

Notes: I included url value substitution and link generation in the show_value helper function which meant I also had to apply the following changes:
- h() of the custom field value is now included in show_value and removed from the views show_value is used in. If I didn't do this, the links couldn't function.
- defined show_value_plain on the custom fields helper to return plaintext values for use in the plaintext mailer view and query helper

No validation is currently being done against the URL mask in my patch, but some simple validation might be advisable.

I hope you'll include this in the next version.

#5 Updated by Aron Burrell over 8 years ago

I should also mention it'll require a db:migrate to add the url column to the custom_fields table.

#6 Updated by Lalit Roul over 7 years ago

This is also what we would like to have a custom field of URL type. In the view mode this field should appear as a link in the issue page. For example we would also like to have a issue linked to a customer case which is stored in a CRM whenever applicable.

+1 for us.

#7 Updated by Aitor Martínez over 7 years ago

Hello.

What about applying "Linkable Custom Fields patch" of this task to the trunk?
It seems to work fine.

Greetings.

Lalit Roul wrote:

This is also what we would like to have a custom field of URL type. In the view mode this field should appear as a link in the issue page. For example we would also like to have a issue linked to a customer case which is stored in a CRM whenever applicable.

+1 for us.

#8 Updated by Vladimir Kovacik over 7 years ago

Since patch linkable_custom_fields.diff cannot be applied on Redmine 0.9.2 (due to refactored 0.9.x code) I have updated and extended the original patch.
I would like to thank Aron for the original patch. It helped to get an overview which parts are affected.
I have tested Redmine 0.9.2 code but it may happened that I used some other patches meantime.

#9 Updated by Bogdan Matu over 7 years ago

++1 For the trunk merge....

^^ does that patch work for the 0.9.3 or the upcoming 0.9.4 ? I tried applying it in 9.3 and i got a couple errors.

#10 Updated by Chris Rowe about 7 years ago

+1 for us. We use http://sourcerepo.com/ for our Redmine hosting so getting this into an actual release that they could install would be great. Thanks for all the work.

#11 Updated by Jean-Baptiste Barth about 7 years ago

Can you try the patch I proposed in #5794 ?
Tell me if it works and fits your needs.

#12 Updated by Chris Rowe about 7 years ago

Unfortunately we are not in control of our hosting so I can not test it but it sounds like just what we would like. I like the full format option because it should enables links to tickets and commits as well.

#13 Updated by Brian Lacy over 6 years ago

We're just getting started with Redmine, and I've added a Custom Field on Issues called "URL" -- intended primarily for test cases. As a web developer, being able to link to a page where an issue is occurring or which is the starting point for a new feature would be a huge help -- but unfortunately, there's no way to auto-highlight that URL.

Can you folks please resurrect this issue and add a new custom field type "URL"? Would be very handy!

Thanks!

#14 Updated by Andriy Lesyuk over 5 years ago

Just published my plugin which adds "Link" type: http://projects.andriylesyuk.com/projects/redmine-fields
Also there is Eric's plugin which adds "URL" custom field type: https://github.com/edavis10/redmine_url_custom_field

#15 Updated by Daniel Felix almost 5 years ago

Well some simple type of custom field format like "link" would be quite useful. This would be quite helpful even if no id replacement would be done.

Linking to tickets and revisions is currently implemented.

#16 Updated by Diego Álvarez about 4 years ago

+1

#17 Updated by Jean-Philippe Lang almost 4 years ago

  • Related to Feature #5250: Custom Fields may allow full text transformation added

#18 Updated by Jean-Philippe Lang almost 4 years ago

  • Target version set to 2.5.0

#19 Updated by Jean-Philippe Lang over 3 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

2.5.0 adds a "Link" custom field format but also adds the ability for other custom field formats to render values as a http link to a configurable URL with the following substitution available:

  • %value% => the custom field value
  • %id% => id of the customized object
  • %project_id% => id of the project of the customized object if defined
  • %project_identifier% => identifier of the project of the customized object if defined
  • %m1%, %m2%... => capture groups matches of the custom field regexp if defined

#20 Updated by Toshi MARUYAMA over 2 years ago

  • Duplicated by Feature #5833: Ability to specify template for a URL on a user defined column added

#21 Updated by Go MAEDA 6 months ago

  • Duplicated by Feature #2810: Custom formatting of custom fields added

Also available in: Atom PDF