psaavedra / redmine-cmd

A Remote console for Redmine based on the REST/API (time tracking)
MIT License
7 stars 0 forks source link

redmine-cmd prints an error message when creating a task #9

Open AnxoBel opened 9 years ago

AnxoBel commented 9 years ago

If an user is not an admin, it fails:

Available users:>
DEBUG 2015-02-04 15:12:17,665 GET: https://..../users.json?key=...&offset=0&limit=50
DEBUG 2015-02-04 15:12:17,694 Thread running ... 
DEBUG 2015-02-04 15:12:17,737 resp: {'status': '403', 'content-length': '1', 'x-powered-by': 'Phusion Passenger (mod_rails/mod_rack) 2.2.9', 'set-cookie': '_redmine_default=; path=/; HttpOnly', 'server': 'Apache/2.2.14 (Debian)', 'x-runtime': '5', 'cache-control': 'no-cache', 'date': 'Wed, 04 Feb 2015 14:11:17 GMT', 'content-type': 'application/json; charset=utf-8'}
DEBUG 2015-02-04 15:12:17,738 content:  
ERROR 2015-02-04 15:12:17,742 Exception: Expecting value: line 1 column 2 (char 1)
Default - ...: 41
Select user (set -1 to cancel):
psaavedra commented 9 years ago

The problem here is that your are attempting to get the user list with a regular user (non-admin powers!), so the requests returns a 403 (forbidden). At th moment, I haven't any chance to get if you are regular user or not so I can not avoid this error now.

Anyway, the creation actions is not killed by this exception. The error is captured and the user selected is assigned to your Id.

By the way, if you know the Id. of the person which you want assign the ticket, you can do a explicit assignation using his Id.