1

Using the Active Collab API, can a comment be created on behalf of another user? Like it's possible with everything else by setting created_by_id.

Using:

POST http://AC-SERVER/api/v1/comments/discussion/30 HTTP/1.1
{"body":"TEST","created_by_id":5,"updated_by_id":5}

the creator isn't set correctly (with every other datatype, it works well):

{"single":
  {"id":81,
   "class":"Comment",
   "url_path":"\/comments\/81",
   "attachments":[],
   "is_trashed":false,
   "trashed_on":null,
   "trashed_by_id":0,
   "parent_type":"Discussion",
   "parent_id":30,
   "body":"TEST",
   "body_formatted":"TEST",
   "body_plain_text":"TEST",
   "created_on":1474039019,
   "created_by_id":1,
   "updated_on":1474039019,
   "updated_by_id":5
  }
 }

See "created_by_id":1.

Ilija
  • 4,105
  • 4
  • 32
  • 46
Sascha
  • 2,193
  • 3
  • 24
  • 38
  • API does not allow that for comments. It always posts them as the person who's token was used. Can you please tell me why you need to change the user? – Ilija Sep 16 '16 at 21:43
  • @Ilija I'd like to import OTRS-Tickets into AC's discussions. OTRS-Articles should become AC-comments and should keep the creator. – Sascha Sep 18 '16 at 07:06
  • Thanks, we'll consider option to change author via API in the future. – Ilija Sep 20 '16 at 13:25
  • Hi Ilija, no other workaround possible? It's important for me to get OTRS-Tickets/Articles into AC, because in OTRS a lot of pre-work is done what cannot be transferred into AC (1st Level Support like you're doing with Groove) – Sascha Sep 21 '16 at 04:59
  • Not at the moment. System will use the user who makes the request as author of the comment, always. – Ilija Sep 22 '16 at 17:14
  • @Ilija Maybe we could patch a .php-File on the server until an official API-change might be released? Could you tell me where the created_by_id-value is overwritten? I know this isn't a nice solution, but we have to get Tickets with multiple OTRS-Articles into AC. – Sascha Sep 26 '16 at 06:41
  • @Ilija Could you please give me a hint regarding my question? Thanks. – Sascha Oct 13 '16 at 11:00

0 Answers0