Custom Field Renderer for External Issue ID

Christopher Parker July 9, 2012

I'd like to create a custom field that allows other developers, QA testers, etc. to specify an external issue ID that automatically creates a link that incorporates the field value. We're currently still using a separate bug tracker for our QA team, although we're migrating away from it.

I am only able to select from a limited subset of renderers for a custom field. Is there a way to create a new custom renderer that will let me build a URL based on the field's value as part of the renderer?

1 answer

1 accepted

2 votes
Answer accepted
grundic
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.
July 9, 2012

You can develop you own custom field, based on some generic custom field, for example, GenericTextCFType. Then in your view template you can make any links you want. Here how youw view.vm could be:

#if ($value)
  <a href='http://your_inner_tracker?id=$value'>Inner tracker</a>
#end

So, absolutely no Java coding is necesarry.

Hope, it helped.

Christopher Parker July 10, 2012

Thanks so much for your answer! Does this solution absolutely have to rely on modification of the Velocity template? If JIRA is upgraded, this change will be lost.

Henrik Jönsson August 15, 2012

Can you explain this a bit further? Is it possible to package this into a plugin?

JamesT
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.
May 10, 2016

I know this is old, but could someone elaborate on this?  I know how to change the renderer, but my only options are Default Text and Wiki Style.  Where does this Velocity code get saved?

grundic
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.
May 10, 2016

@James Tuttle, sorry can't understand you. You would like to know where to place velocity template?

Anyway, there is my old project, very simple one. Maybe it could help you somehow: https://github.com/grundic/jira-color-custom-field

Suggest an answer

Log in or Sign up to answer