Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to properly import story point value using JSON import method

Jakub Stephan March 16, 2022

Hello,

 

I'm importing issues from another tracking tool.

I have some problem with migrating story points values.
I'm using team-managed project with template com.pyxis.greenhopper.jira:gh-simplified-agility-scrum.

I'm using a syntax:

 

"customFieldValues": [
{
"fieldName": "Story Points",
"fieldType": "com.atlassian.jira.plugin.system.customfieldtypes:float",
"value": 2.0
}
],

This example was found on: https://support.atlassian.com/jira-cloud-administration/docs/import-data-from-json/ 

I want to fill in this field:

Zrzut ekranu 2022-03-16 o 09.51.06.png

 

I have 4 issues to migrate and all of them have warnings:
Custom Field 'Story Points' is not associated with issue type 'Story'
Custom Field 'Story Points' is not associated with issue type 'Epic'
Custom Field 'Story Points' is not associated with issue type 'Bug'
Custom Field 'Story Points' is not associated with issue type 'Task'

From logs:

2022-03-16 08:32:15,542 WARN - Custom Field 'Story Points' is not associated with issue type 'Bug'

 

1 answer

0 votes
Piyush A (STR)
Community Champion
March 16, 2022

Seems that's a Story point Estimate not the Story point. 

The way you can consistently get the story points of an issue is to first determine what custom field story points are on for that instance.

To do this, search through the fields using this endpoint: /rest/api/3/field

This will return an array of objects.

Filter the array, looking for the object with the name 'Story points estimate' if it's a next-gen project or 'Story Points' if it's a classic project. 

It will look something like this:

{  
   "id":"customfield_10016",
   "key":"customfield_10016",
   "name":"Story point estimate",
   "custom":true,
   "orderable":true,
   "navigable":true,
   "searchable":true,
   "clauseNames":[  
      "cf[10016]",
      "Story point estimate"
   ],
   "schema":{  
      "type":"number",
      "custom":"com.atlassian.jira.plugin.system.customfieldtypes:float",
      "customId":10016
   }
},

Save the id of this object (in this case customfield_10016). Then look for that custom field every time you request an issue.

Jakub Stephan March 17, 2022

Hi,

 

I'm not using REST API yet. Im trying o import project via JSON from Jira Configuration panel.

 

Changing the field name from "Story points" to "Story point estimate".

Did not help. I do not have warnings now, but also story points are not imported.

 

Here is issue example:

{
"id": "90-102803",
"key": "CCT113-3",
"summary": "Documentation",
"description": "Lets document here whole information!",
"reporter": "jstephan",
"resolution": "",
"created": 1646390946674,
"updated": 1647425051348,
"attachments": [
{
"name": "Zrzut.png",
"attacher": "xxx",
"created": 1647247921088,
"uri": "xxx"
},
{
"name": "Raport_.pdf",
"attacher": "xxx",
"created": 1647247932293,
"uri": "xxx"
}
],
"labels": [
"Backend",
"Landing page"
],
"assignee": "xxx",
"status": "To Do",
"issueType": "Bug",
"priority": "Needs priority",
"customFieldValues": [
{
"fieldName": "Story point estimate",
"fieldType": "com.atlassian.jira.plugin.system.customfieldtypes:float",
"value": 2.0
},
{
"fieldName": "Sprint",
"fieldType": "com.pyxis.greenhopper.jira:gh-sprint",
"value": [
{
"startDate": "2022-03-01",
"endDate": "2022-04-01",
"completeDate": null,
"name": "New Sprint"
}
]
}
],
"watchers": [
"xxx1",
"xxx2"
],
"worklogs": []
},

FYI: Sprint value is importing correctly.

Is there any complete documentation for JSON import and fields which can be imported in this way ? I'm using only: https://support.atlassian.com/jira-cloud-administration/docs/import-data-from-json/ 

 

There no that much information :(

Suggest an answer

Log in or Sign up to answer