znuny / Znuny4OTRS-GIArticleSend

This package enables the standard Generic Interface ticket operations to send articles.
https://www.znuny.com/add-ons/
10 stars 7 forks source link

Failing attachement creation #4

Closed binao closed 6 years ago

binao commented 6 years ago

Hi guys, thanks for your amazing work you've done here. We are experiencing an issue during creating attachments through REST API after upgrading to OTRS 6.0.3. It returns {"faultcode":"Server","faultstring":"CreateAttachment() Got no TicketID!"}; when "ArticleSend" and "To" params are not set. It works flawlessly if GIArticleSend is not installed.

Example JSON payload:

  1. Fail: "{\"SessionID\":\"123456789...\",\"Ticket\":{\"Title\":\"Example title\",\"QueueID\":XX,\"State\":\"new\",\"PriorityID\":3,\"CustomerUser\":XXXX,\"CustomerID\":\"xxxx\"},\"Article\":{\"CommunicationChannel\":\"Email\",\"From\":\"Ondrej Bina \\u003cbina@uol.cz\\u003e\",\"Subject\":\"Example subject\",\"Body\":\"Integration test\",\"ContentType\":\"text/plain; charset=utf8\"},\"Attachment\":{\"Content\":\"aWQsS8OzZCxOw6F6ZXYgZmlybXksU3RhdixUeXAsSGxhdm7DrSBrb250YWt0\\nIChlLW1haFrdCxEZW4gdsO9cGxhdHksTXpkb3bD\\noSDDusSNZXRuw60sVsO9cGxhdG\\nbW9jIMSMU1NaCjEwMDUseHl6MTIzLFhZWiBhLnMuLEFrdGl2bsOtLE16ZHks\\nbm9ib2R5\\nemFzw61sYXQscG9sYWsK\\n\",\"ContentType\":\"application/csv\",\"Filename\":\"test.csv\"}}"

  2. Pass: "{\"SessionID\":\"123456789...\",\"Ticket\":{\"Title\":\"Example title\",\"QueueID\":XX,\"State\":\"new\",\"PriorityID\":3,\"CustomerUser\":XXXX,\"CustomerID\":\"xxxx\"},\"Article\":{\"CommunicationChannel\":\"Email\",\"From\":\"Ondrej Bina \\u003cbina@uol.cz\\u003e\",\"Subject\":\"Example subject\",\"Body\":\"Integration test\",\"ContentType\":\"text/plain; charset=utf8\",\"To\":\"Ondrej Bina \\u003bina@uol.cz\\u003e\",\"ArticleSend\":1},\"Attachment\":{\"Content\":\"aWQsS8OzZCxOw6F6ZXYgZmlybXksU3RhdixUeXAsSGxhdm7DrSBrb250YWt0\\nIChlLW1haFrdCxEZW4gdsO9cGxhdHksTXpkb3bD\\noSDDusSNZXRuw60sVsO9cGxhdG\\nbW9jIMSMU1NaCjEwMDUseHl6MTIzLFhZWiBhLnMuLEFrdGl2bsOtLE16ZHks\\nbm9ib2R5\\nemFzw61sYXQscG9sYWsK\\n\",\"ContentType\":\"application/csv\",\"Filename\":\"test.csv\"}}"

There are obviously changes in OTRS 6 API ( especially in commit https://github.com/OTRS/otrs/commit/5fdf3471d4e2e7505470e5f44eebe82911267e72) but I'm not experienced in Perl enough to localize any possible connection.

Are you experiencing same issue with latest OTRS or is it rather any problem on our side?

Thanks for your response :]

thorsteneckel commented 6 years ago

Hi @binao - Thanks :) We will have a look in the new year and come back to you.