How to make your SIL Custom Fields work with the JIRA Search Engine

  • Font size: Larger Smaller
  • Subscribe to this entry
  • Print
How to make your SIL Custom Fields work with the JIRA Search Engine

In a previous post, we covered how to use "calculated custom fields" to display information not available by default in JIRA. See my post about how to Improve JIRA dashboards by showing the last issue comment. I hope you've been exploring all the possibilities offered by wonderful (and free!) Kepler Custom Fields plugin. Today I want to bring forth an important detail when using these custom fields.

The Situation

You created this awesome scripted custom field that displays the number of business days an issue has been opened. Yet, when you use that field in search, it gives funky results, and the sort order does not work.

The Cause

The reason behind this behavior is quite simple. All JIRA fields have a Search Template which tells JIRA how it should treat the field during search. When you create "regular" custom fields, the Search template is set by default. In the case of a SIL script field, the output could be pretty much anything: A String, a Number, a User, etc...

The Solution

We need to tell JIRA which Search Template to use. To do so, simply go in the JIRA Administration, in the Custom Fields section, locate you custom field and click on its Edit link. There you'll be able to choose the proper Search Template:

b2ap3_thumbnail_jira-edit-custom-field-details-search-template.png

 

I leave it up to you to determine which Search Template is appropriate.

Enjoy using scripting fields!

 

 

in JIRA Hits: 4724 0 Comments

Comments

  • No comments made yet. Be the first to submit a comment

Leave your comment

Guest
Guest Friday, 24 November 2017