Details
-
Bug
-
Resolution: Won't Fix
-
Medium
-
None
-
None
-
None
-
Severity 2 - Major
Description
Summary
The end_date and start_date parameter for the cURL export command on HipChat Server is incorrect (reversed).
Environment
- HipChat Server 1.3.7
- HipChat Server 2.0.6
Steps to Reproduce
- Log in as an admin in the HipChat Server terminal / SSH Console
- Run the following command to trigger a chat history export starting from July 19, 2016 until July 22, 2016:
admin@danial:~$curl -X POST -H "content-type: application/json" -d '{"user_id":1, "passphrase":"hipchat", "include_attachments":true, "include_oto":true, "end_date": "2016-07-22T15:56:07+00:00", "start_date": "2016-07-19T15:56:07+00:00"}' localhost:7777/export/group/1
Expected Results
The export should be triggered successfully and you should be able to check for the status when it gets completed
Actual Results
You will receive the following error on your terminal / SSH console:
admin@danial:~$curl -X POST -H "content-type: application/json" -d '{"user_id":1, "passphrase":"hipchat", "include_attachments":true, "include_oto":true, "end_date": "2016-07-22T15:56:07+00:00", "start_date": "2016-07-19T15:56:07+00:00"}' localhost:7777/export/group/1 { "error": "wrong date range provided, start_date is older than end_date"
Workaround
Reverse the end_date and start_date and the export should trigger correctly:
admin@danial:~$ curl -X POST -H "content-type: application/json" -d '{"user_id":1, "passphrase":"hipchat", "include_attachments":true, "include_oto":true, "end_date": "2016-07-19T15:56:07+00:00", "start_date": "2016-07-22T15:56:07+00:00"}' localhost:7777/export/group/1 { "created_at": "2016-10-27T09:08:45Z 696179", "end_date": "2016-07-19T15:56:07+00:00", "errors": [], "found_job": true, "group_id": 1, "include_attachments": true, "include_emoticons": false, "include_messages": true, "include_oto": true, "job_id": "d6482228-2b07-4648-bcf7-c2fed9b8f777", "start_date": "2016-07-22T15:56:07+00:00", "status": "pending", "user_id": 1
admin@danial:~$ hipchat export -c
The export job completed successfully.
The export file can be downloaded from: https://danial206.lightning.hcsinf.com/files/1/1/Xps8siQfyVMEOMX/hipchat-2016-10-27_09-08-45.tar.gz.aes
Completed