It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

Philip Schlesinger Apr 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

0 votes
Philip Schlesinger Apr 28, 2015

Bump

0 votes
Philip Schlesinger Apr 29, 2015

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

0 votes
Philip Schlesinger Apr 29, 2015

@Jamie Echlin [Adaptavist] ?

0 votes
JamieA Apr 30, 2015

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

0 votes
Philip Schlesinger May 01, 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 May 01, 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 01, 2015

Apologies. Just trying to learn.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Off-topic

Disney Live Action Reboots: Are you for or against?

Happy Friday Everyone! Today marks the international release of Disney's live action version of the animated classic Aladdin. I know that this movie was met with some controversy of over cast...

212 views 22 10
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you