Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@jeremyzz22

This comment has been minimized.

Copy link

jeremyzz22 commented Nov 30, 2017

Greetings!

May I ask what one does wrong when I receive the following error;

ERROR -
2017-11-30 11:18:02,320 - ERROR - Failed to process row: ['Organisation', 'Test name', 'test.email.adress]
Traceback (most recent call last):
File "bulk_customer_import2.py", line 205, in main
add_customer_to_servicedesk(args.servicedesk_id, customer)
File "bulk_customer_import2.py", line 137, in add_customer_to_servicedesk
logger.info("{} was added to service desk {}".format(customer["fullName"]))
KeyError: 'fullName'
2017-11-30 11:18:02,321 - INFO - The following rows not processed
['Organisation', 'Test name', 'test.email.adress]

Friendly Regards,
Jeremy

@iokiwi

This comment has been minimized.

Copy link
Owner Author

iokiwi commented Mar 15, 2018

2017-11-30 11:18:02,321 - INFO - The following rows not processed ['Organisation', 'Test name', 'test.email.adress]
Cant process this row because test.email.adresss is not a vailid email address format.

The other errors are a result of the fact that test.email.adress is not valid. Jira returned an error and my script has little - to not exception handling :D

@gerryamurphy

This comment has been minimized.

Copy link

gerryamurphy commented Jun 26, 2018

Thanks for this.

@hooliowobbits

This comment has been minimized.

Copy link

hooliowobbits commented Sep 20, 2018

Hi mate, thx for your efforts, it's very much appreciated. i am currently facing the following error, not sure what to do:

2018-09-20 14:58:27,436 - INFO - Initializing session
2018-09-20 14:58:29,006 - ERROR - {"errorMessage":"Signup is not currently available","i18nErrorMessage":{"i18nKey":"cv.signup.error.not.allowed","parameters":[]}}

customers are able to email our service desk cloud instance and get the automatic account ok, and manual signup seems to work to, although it requires email address verification. not sure where the issue is? i expect that is then causing the next error:

2018-09-20 14:58:30,234 - ERROR - {"errorMessage":"This request is invalid. The following users could not be found: xxx@xxx.org.au.","i18nErrorMessage":{"i18nKey":"sd.rest.error.bad.request.users.not.found","parameters":[" xxx@xxx.org.au"]}}
2018-09-20 14:58:30,234 - INFO - The following rows not processed

@hooliowobbits

This comment has been minimized.

Copy link

hooliowobbits commented Sep 20, 2018

as a followup, i was able to successfully use the curl method discussed at https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-customer-post

curl --request POST \
--url 'https://XXX.atlassian.net/rest/servicedeskapi/customer' \
--user 'XXX@XXX.com.au:GXXXXXXXXXXXXXXX1' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"email": "fred@example.com",
"displayName": "Fred F. User"
}'

which leads me to believe it's not actually problem with signups. not sure.

@iokiwi

This comment has been minimized.

Copy link
Owner Author

iokiwi commented Dec 13, 2018

Jesus, how do I get notifcations for this thing. Sorry @hooliowobbits :(. Did you get it sorted? Happy to help if not

@iokiwi

This comment has been minimized.

Copy link
Owner Author

iokiwi commented Dec 13, 2018

Guys, I'm gonna move this over here and might do some cleanup https://github.com/iokiwi/jsd-bulk-customer-upload

@deskenazi

This comment has been minimized.

Copy link

deskenazi commented Aug 22, 2019

Your new script at https://github.com/iokiwi/jsd-bulk-customer-upload worked flawlessly out of the box for my company. Thank you!

@sks321

This comment has been minimized.

Copy link

sks321 commented Aug 29, 2019

Thanks a lot for the script. I can create customers and organizations but after that I cant add customers within organizations.
I get this error
{"errorMessage":"This request is invalid. The following users could not be found: xxx@xxx.com","i18nErrorMessage":{"i18nKey":"sd.rest.error.bad.request.users.not.found","parameters":[" xxx@xxx.com"]}}
Can you please help with this error?

@iokiwi

This comment has been minimized.

Copy link
Owner Author

iokiwi commented Sep 3, 2019

Welcome @deskenazi @sks321 did you have any luck with that error? I can try debug that for you, where did this error occur, can you send me some logs?

@iokiwi

This comment has been minimized.

Copy link
Owner Author

iokiwi commented Sep 6, 2019

This script has moved

Redirect -> https://github.com/iokiwi/jsd-bulk-customer-upload

  • Source - Contributing
  • Issues - Please raise any issues here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.