• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Question Setting Date Time Picker Jira field values with jira-python

Bargavikalla

New Pleskian
I am using the jira-python api library to create issues in JIRA. I created a custom due date field for my issues (customfield_10300 in code below). This custom field is a Date Time picker.

Problem: The code below tries to creates an issue but returns an error because the syntax for setting the Date Time picker (customfield_10300) value is incorrect. Does anyone know how I would do this? JIRA Training

from jira import JIRA
jira = JIRA(options,basic_auth=('auth_email','auth_pw'))

issue_dict = {
'project': {'key': 'AT'},
'summary': 'Update test',
'description': 'Not important',
'issuetype': {'name': 'Bug'},
"customfield_10300" : '10/22/2017 10:00:00 AM', #Problem: Date Time Picker Field, not working
}
new_issue = jira.create_issue(fields=issue_dict)
P.S. In Jira the field is a "Dates" field, located next to Created and Updated. I assume the syntax for modifying their values would be the same.
 
Back
Top