Hello Folks,
I am using a Python API to do some automation in JIRA Cloud Instance. Now, where I am stuck is I am unable to add story points to a particular story. Below is my code snippet:
from jira import JIRA
user = '************'
apikey = '*******************'
server = 'https://*****.***.com/jira/'
# Creating connection with the JIRA
jira_server = {'server': server, 'verify': False}
jira = JIRA(options=jira_server, basic_auth=(user, apikey))
issue_dict = {
'project': {'key': 'CC'},
'issuetype': {'name': 'Story'},
'summary': "This is a test user story",
'customfield_10204': <sprint_id>
}
jira.create_issue(fields=issue_dict)
The issue created is CC-12093 with id 705378
Now, I need to assign story point to this particular user-story
issue = jira.issue("CC-12093")
issue.update(
fields={"custom_field_10208":8})
But I am getting the below error:
response text = {"errorMessages":[],"errors":{"custom_field_10208":"Field 'custom_field_10208' cannot be set.
It is not on the appropriate screen, or unknown."}}
Hello, @Bittu Bhowmick (US) ! Welcome to the Atlassian Community!
I have a couple of guesses, based on what you've shown.
The first thing you should probably check is whether the Story Points field is available on the Edit action for an issue (Edit screen has Story Points field or default screen has Story Points field).
The second thing you should probably check is what sort of input is the Story Points field? Is it a number? Or is it a dropdown?
Hope this helps
Thanks for the reply. I would like to inform you that the story point is in edit action for an issue and it is of type number.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Those were the "obvious suspects". I have no other ideas, sorry.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So my question now would be how do I make my code work to add the story points for user story and estimated time for sub-task?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you asked your question in the Atlassian Developer community forums? That's a little more specialized and may give you the answers you seek. This community is more general purpose.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.