You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2024-03-21 12:06:06

SomeDude
Member
Registered: 2023-11-22
Posts: 62

How to change the Person writing Followups with API Import

Hello,

I am currently Importing our old Tickets to GLPI via API and I have the Problem hat the Ticket and the Follow ups are written by me.

What Code do I have to add to change the writer of those Messages for example in here

´´´
def zammad_ticket_message_to_glpi_followup(ticket_message_body: str, base_ticket_id: int) -> typing.Dict:
    return {
        "itemtype": "Ticket",
        'items_id': base_ticket_id,
        'content': ticket_message_body,
        'is_private': 0,
        "requesttypes_id": 1,
        "sourceitems_id": 0,
        "sourceof_items_id": 0
    }
´´´

Offline

#2 2024-03-21 12:39:37

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,821
Website

Re: How to change the Person writing Followups with API Import

You need to specify the "users_id" field and set it to the ID of the user you want to show as the writer.
For tickets, the field it "users_id_recipient".


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

Board footer

Powered by FluxBB