jira-cli icon indicating copy to clipboard operation
jira-cli copied to clipboard

Not possible to add a "due date" extra field

Open zioalex opened this issue 7 years ago • 4 comments

Hi, I tried to create a new story but in my Jira I need to specify a Due Date. The I tried in different way with the extra field but I was not able to manage it. `

jira-cli new --project SYSENG --type Story "This is a test story" --description='Here the story description' --extra "Due Date: 01/Dec/18" Unknown extra fields ['Due Date: 01/Dec/18'] jira-cli new --project SYSENG --type Story "This is a test story" --description='Here the story description' --extra "Due Date" Unknown extra fields ['Due Date'] jira-cli new --project SYSENG --type Story "This is a test story" --description='Here the story description' --extra {'Due Date'} Unknown extra fields ['{Due Date}'] jira-cli new --project SYSENG --type Story "This is a test story" --description='Here the story description' --extra {'Due Date'} --protocol soap Unknown extra fields ['{Due Date}'] jira-cli new --project SYSENG --type Story "This is a test story" --description='Here the story description' --protocol soap jira-cli new --project SYSENG --type Story "This is a test story" --description='Here the story description' --protocol rest Due Date is required. jira-cli new --project SYSENG --type Story "This is a test story" --description='Here the story description' --extra 'duedate=01/Dec/18'Unknown extra fields ['duedate=01/Dec/18'] jira-cli new --project SYSENG --type Story "This is a test story" --description='Here the story description' --extra '{"duedate": "01/Dec/18"}' Unknown extra fields ['{"duedate": "01/Dec/18"}'] `

Please can you help with it.

zioalex avatar Jan 26 '17 08:01 zioalex

Looking in the code I've seen that the correct format should be extrafield="something" ' jira-cli new --project SYSENG --type Story "This is a test story" --description='Here the story description' --extra "duedate=01/Dec/18" Unknown extra fields ['duedate=01/Dec/18'] ' However it doesn't work.

zioalex avatar Jan 26 '17 08:01 zioalex

Found out the the json library was not imported. I added it and now I have problem with the date string parsing: '

jira-cli new --project SYSENG --type Story "This is a test story" --description='Here the story description' --extra "duedate='01012018'" ('ITEM: ', "duedate='01012018'") ('VALUE', 'duedate', "'01012018'") '01012018' ('EXTRAS: ', {}) ('EXTRAS:', {'duedate': "'01012018'"}) Error parsing date string: '01012018' '

zioalex avatar Jan 26 '17 08:01 zioalex

The format sent when I create a new Jira story is 01/Feb/18. But even so NADA: '

jira-cli new --project SYSENG --type Story "This is a test story" --description='description' --extra "duedate='01/Feb/18'" -v ('ADDCOMMAND:', <class 'jiracli.processor.Command'>) ('ITEM: ', "duedate='01/Feb/18'") ('VALUE', 'duedate', "'01/Feb/18'") '01/Feb/18' ('EXTRAS: ', {}) ('EXTRAS:', {'duedate': "'01/Feb/18'"}) Create the... ('SYSENG', 'Story', 'This is a test story', 'description', 'minor', None, None, None, None, {}, {'duedate': "'01/Feb/18'"}) Error parsing date string: '01/Feb/18' '

zioalex avatar Jan 26 '17 10:01 zioalex

Actually after some digging I found how the date should be formatted in jira package at client.py at line 1368 is stated: # based on REST Browser it needs: "2014-06-03T08:21:01.273+0000"

Therefore I tried with: '

jira-cli new --project SYSENG --type story "This is a test story" --description='description' --extra "duedate=2018-01-01" -v ' and it worked.

zioalex avatar Jan 26 '17 10:01 zioalex