Find Questions…

Close ×
First time here? Check out the FAQ!

How can I set a numerical value for a select list?

Mark McD asked this question · 670 karma ·

I've got a select list set up as a custom field in Jira and wish to use it in Greenhopper's statistical burndown charts.

The specific field that I'm implementing is a "T-Shirt Size" field for story estimation. I have started to follow the steps here but now need to attach numbers so I can use it for calculations / charts.

How can I set up a mapping between a textual label and a numerical value in a Jira custom field?

1653 views

One Answer:

Nic Brough · 120,424 karma ·

You'll need some code to do that. There is no "mapping" function - the options on a select list are served up as strings to the things that ask the field for values.

So if you want to put numbers into a list, you need to write a field plugin that will present the data as numbers to the rest of the code, but handle like it's a select list. (I don't think this is a trick you can do with javascript or anything quick and easy on t the front end)

A lighter option though - set up a standard select list with your values, then set up a numeric field as well. Call them something similar, and don't put the numeric field on any edit/transition screens, and don't put the select list on display screens. Then write a small listener or postfunction that will read the select list and populate the numeric in the background (script runner plugin would make that a doddle)

Mark McD · 670 karma ·

For prosperity's sake, I'll include my specific solution: I ended up taking the two list approach you suggested and set up a filter subscription on the mismatching issues ("Inconsistent Story Points / T-Shirt Size") that ran frequently so I could manually update the issues. It's not fully automatic but it is good enough for my needs.

Looking for something else?

Find Questions…

or Browse other questions tagged:

or Ask a Question