No notification when creating a ticket via REST API

Infos:

  • Used Zammad version: zammad-3.4.0-4
  • Installation method (source, package, …): docker image
  • Operating system: Ubuntu 18.04
  • Database + version: zammad-postgresql-3.4.0-4 ( 9.6.17 )
  • Elasticsearch version: zammad-elasticsearch-3.4.0-4 ( 7.6.1 )
  • Browser + version: Firefox 80.0.1 (64-bit)

Expected behavior:

  • Creating a notification in browser when creating a ticket using the REST API (no badges in left top coner and sound)

Actual behavior:

  • No notification. Ticket created successfully

Steps to reproduce the behavior:

  • CURL (just like in docs)
    curl -u user@server.ru:pass -H “Content-Type: application/json” -X POST -d ‘{“title”:“Help me!”,“group”: “Users”,“article”:{“subject”:“some subject”,“body”:“some message”,“type”:“note”,“internal”:false},“customer":"user@yandex.ru”,“note”: “some note”}’ https://server.ru/api/v1/tickets/

  • Python code:

def create_ticket_in_sd(tmpl_text, user, message_id):
    query = f"{RHOST}api/v1/tickets"
    create_json = {
        "title": tmpl_text[:30],
        "group": "Users",
        "customer": user['login'],
        "state_id": 1,
        "article": {
            "subject": tmpl_text[:30],
            "body": tmpl_text,
            "type": "note",
            "internal": False,
            "sender": "Customer",
        },
        "note": tmpl_text,
    }
    responce = requests.post(query, auth=(RUSER, RPASSWORD), json=create_json)
    try:
        if responce.status_code == 201:
            if isinstance(responce.json(), dict):
                ticket = responce.json()
                print(ticket)
                return dict(id=ticket['id'],
                     number=ticket['number'],
                     title=ticket['title'])
    except BaseException as exp:
        print('Error create ticket: ', exp)

If ticket created via email or telegram channel (bot) notification in browser work fine (add badge and play sound).

In profile
Screenshot_2020-09-24 IST ServiceDesk - Notifications

You have to create or update the ticket on behalf of the other users.
Otherwise if it’s your user doing this on the API you won’t receive an notification. Other users however should.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.