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

How to limit story points to a dropdown value

I would like to set the story points field to only accept 1,2,3,5,8,13 via a dropdown.

Is that possible?

6 answers

1 accepted

Hi Pablo

As it turns out, GreenHopper treat the story points field as a number field. Currently this feature doesn't exist at GreenHopper configuration. You could rase a support ticket, so they can open a feature request and the more votes it get, better the chance to it be implemented in future releases.

Best Regards,

Ricardo Carracedo.

I would like to see this behavior as well.

I am also hoping to see this behavior.

Any updates on this?

No, as it's behaving as designed and intended.

The closest you will get to a workaround is a little bit of code.

  • Remove Story Points from the Edit screen
  • Add a new select list custom field with your numbers listed, place on the create and edit screen
  • Add an add-on that can enable you to write a listener that
    • Runs when issues are created, edited or transitioned
    • Reads your select list and copies the number into Story points

@Nic Brough {Adaptavist} do you have an example (groovy script) for me, to do this with script runner as an event listener? I have searched a lot, but the only examples I can find is "copy from task to sub-task" and I don't get it to work like you described above.

Are there any free add-ons that allow me to do this? The only ones that I am seeing are ScriptRunner and PowerScripts, both of which are monthly subscription based.

@Sandy ValleeI found a free workaround that is very easy to setup.

We are new to Story Points and for a few of our team members, it is difficult to remember the values off the top of their heads. So we needed a dropdown for the Story Points which allows him to quickly assign a number. So here is what I did in order to make it work for us, for free.

1) Create a new Custom Field that you will use for Story Points. I used a Select List (single choice) dropdown and added my options. I only included numbers (0, 0.5, 1, 2, 3, 5, 8, 13, 20, 40, 100) for choices and did not include any other characters. Using anything except doubles and integers will most likely not work. Take note of what you name this field as you will need it for later

2) From this same screen, you can now select the settings for your new field and select the screens that it will show up on.

3) Return to the Main screen and on the left side, navigate to Jira Settings > Add-ons > Find new add-ons. Search for Automation Lite for Jira Cloud and install it. After installing it should take you to a new page where you can press a button, Get Started.

    a) You can either automate a new project or an existing one. I started with a new project to get a better understanding of the add-on

    b) Go ahead and create a new rule. For this rule, select Field value changed. Now select your new Custom Field under the prompt, Fields to monitor for changes. You can choose a second option on the next dropdown if you would like but I left mine blank so that it will always update, no matter the edit. Press Save when you are done.

    c) Now select New action, then select Edit issue. Now on this screen, you want to set the original Story Points field. This is the field that we will be replacing with the values of our new Custom field. The new text box that appears is where we will overwrite the value of the original Story Points field. And to do that, we need to get the current value of the new dropdown. This is very simple: {{issue.Custom Field Name}}. All you need to do is replace Custom Field Name with the exact name of your new field. I.e. My new field name is Story Points - Dropdown. So in order to get the value of the dropdown and overwrite the original Story Points field, I used {{issue.Story Points - Dropdown}}. Works like a charm

    d) Now you can repeat the process but instead of selecting New action, you can select Issue created.

Hopefully this works for you as well as it does for me! I am glad that I was able to find such an easy solution that is free

unfortunately, for Jira server version, Automation for Jira - Server Lite is no more free whilst using 'Field value changed' rule...

Hi All,

I completely understand this requirement, since any Burndown Chart and Velocity calculation is useless as long as anyone can enter any value. This is why we created the brand new App "StoryPoints" for Jira Server.

It is dedicated to Fibonacci Estimation but supports any Selection Options via easy administration.

 

For details see here. 

https://marketplace.atlassian.com/apps/1220390/storypoints-for-jira?hosting=server&tab=overview

Cheers

Heiko

Our team used Scriptrunner to create a simple custom listener for the Points field.  If the entered value is not a Fibonacci number, the value is automatically updated to the next Fibonacci number in the sequence.  Pretty simple solution.

Once Scriptrunner is installed, the listener can be added under Administration > Add-ons > Scriptrunner > Listeners.

Here's the basic logic:

// Fibonacci Points Listener

import com.atlassian.jira.bc.issue.IssueService
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.IssueInputParameters
import com.atlassian.jira.event.issue.IssueEvent
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField

def fibList = [1,1] // seed the Fibonacci sequence

def fibCheck = {
  float val -> 
  if (val <= fibList[-1]) { // if points less than or equal to last number in sequence
    return fibList[-1] // round up to next Fibonacci number
  } else {
    fibList += (fibList[-1] + fibList[-2]) // append next Fibonacci number to sequence
    return fibCheck(val) // repeat check
}
}

def pointId = "customfield_10006" // Jira "custom" field ID for points

// object required to update issues
IssueService issueService = ComponentAccessor.getComponnent(IssueService)
IssueInputParameters issueInputParameters = issueService.newIssueInputParameters()

def event = event as IssueEvent
Issue issue = event.getIssue()
def user = ComponentAccessor.getJiraAuthenticationContext().loggedInUser

// get custom fields for issue
List<CustomField> allCustomFields = ComponentAccessor.getCustomFieldManager().getCustomFieldObjects(issue);
def allCustomIds = allCustomFields.collect {it.id}

if (!(pointId in allCustomIds)) { return } // no Points field

// object required to manage custom fields
def customFieldManager = ComponentAccessor.getCustomFieldManager()
CustomField points = customFieldManager.getCustomFieldObject(pointId)
def rawPointVal = issue.getCustomFieldValue(points)

if (rawPointVal == null) { return } // no Points value

float pointVal = rawPointVal as float // set raw points as float

if (pointVal == 0) { return } // accept 0 points

def fibPointVal = fibCheck(pointVal) // round to next Fibonacci number

if (fibPointVal != pointVal) {  // reset points if updated
  issueInputParameters.addCustomFieldValue(points.id, fibPointVal as String)
  def update = issueService.validateUpdate(User, issue.id, issueInputParameters)
}

return

The logic could be easily modified to support geometric series (i.e., 1, 2, 4, 8, 16, etc.).  

Thanks to Sam Orloff for the sample code.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Software

[New] Jenkins for Jira Software Cloud and a way to connect your hosted apps

Jenkins is the leading open-source automation server used by startups and enterprise teams to build, test and deploy code to production.   We are excited to announce an official integration betw...

1,223 views 1 16
Read article

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