Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Optional Select List Custom Field that always displays in Issue View: ScriptRunner Scripted Field or Custom Plugin?

Philip Schlesinger April 27, 2015

Hi all,

We want a custom field of type Select List called "Hot Potato".  The idea is:

  • An issue is found by Team A
  • The fix is to be done by Team B because the issue is Team B's bailiwick
  • Team A creates the issue in their JIRA project and Hot Potato's the issue to Team B by setting "Hot Potato" to Team B
  • The issue shows up on both Team A's and Team B's Agile boards; that way Team A follows the process of Team B fixing the issue
  • When Team B says they've resolved the issue, Team A reviews the situation and either (a) closes the ticket or (b) reopens it as unfixed

Admittedly we could move the ticket from Team A's JIRA project to Team B's JIRA project but in the past that's resulted in tickets being lost in the system because the ticket languishes on Team B's board.  

In addition, by setting this custom field, both Team A and Team B can use Quick Filters and Swimlanes to track these Hot Potato issues – both from Team A's perspective (what have we delegated to others) and Team B's perspective (what have others delegated to us)

This Hot Potato field MUST be optional because if it's required, the JIRA / Crucible integration doesn't work nicely; a required Select List prevents Crucible from creating subtasks in JIRA within Crucible reviews (it breaks the link API and generated sub-tasks end up without a parent ticket).  This is a known Crucible/JIRA integration issue.

But by making Hot Potato optional, then if the Hot Potato value is empty, the Hot Potato field is not displayed in Issue View.  This is a known JIRA limitation.

We want the Hot Potato custom Select List field to be not only displayed and changeable in Issue View if it has a value (which it does out of the box already), but also displayed and changeable in Issue View if it's empty (show "None" in this situation).

In addition, Hot Potato should be searchable like any other custom Select list field in Issue Navigator; start typing "Hot Potato =" and a suggested list of options displays below it.

Here's the question:

How do we create such a field? 

Is this something we can do in ScriptRunner?  

Or are we creating a custom plugin which extends the SelectList class, something along the lines of this: https://developer.atlassian.com/jiradev/jira-platform/fields/tutorial-custom-fields-in-JIRA or https://developer.atlassian.com/jiradev/jira-platform/fields/tutorial-creating-a-custom-field-type

Thanks in advance for your help,

 

PS: in case anyone was considering offering it as a suggestion, removing "None" from all Select Lists  is not an option.


PS#2: Could we simply modify one of the .vm files, such as:./atlassian-jira/WEB-INF/classes/templates/plugins/fields/view/view-select.vm ?

That file has the following code:

#disable_html_escaping()
#if ($value)
     $cfValueEncoder.encodeForHtml($!value.toString())

 

Could we modify it to something along the lines of...

#disable_html_escaping()
#if ($value)
     $cfValueEncoder.encodeForHtml($!value.toString())

#else

       $cfValueEncoder.encodeForHtml("None")

 

?????

 

8 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Philip Schlesinger May 1, 2015

Apologies. Just trying to learn.

0 votes
JamieA
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 1, 2015

You don't need to @mention me, that just makes me get two emails every time you do it. As I said, I don't have time to help with this one - the question is too long and involved. You could consider getting someone to do it for you.

0 votes
Philip Schlesinger May 1, 2015

@Jamie Echlin [Adaptavist] so is this editable & searchable custom field able to be created by ScriptRunner? Or must I create a custom plugin?

0 votes
JamieA
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.
April 30, 2015

Read it, sorry don't have anything to add here.

0 votes
Philip Schlesinger April 29, 2015

@Jamie Echlin [Adaptavist] ?

0 votes
Philip Schlesinger April 29, 2015

@Jamie Echlin (Adaptavist) ? @Nic Brough [Adaptavist] ?

0 votes
Philip Schlesinger April 28, 2015

Bump

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events