Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26669

Jira integration failing to update issues

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.16
    • Templates (T)

      Steps to reproduce:

      Tested in Jira v10.3 and v10.4 self-managed setup

      1. Import latest Jira media version (24/Mar/2025)
      2. Configure action and media
      3. Trigger a problem
      4. Update the problem in Zabbix (add a comment or ack it)

      Result:
      The media fails to update the Jira issue with the following error:

      Sending failed: Failed to parse response: not well-formed JSON was received

      I've managed to make it work but I don't know if this is a proper fix (I'm not a Javascript expert). In line 456 variable "resp" might be empty, so I put the try-catch inside an if:

      if (resp != '') {
        try {
          resp = JSON.parse(resp);
        }
        catch (error) {
          throw 'Failed to parse response: not well-formed JSON was received';
        }
      }

      Also I found Jira is returning HTTP204 to the update request (the petition is ok, but empty response), so I changed line 649 from this:

      if ((this.request.getStatus() !== 200 && this.request.getStatus() !== 201)) {

      to this:

      if ((this.request.getStatus() !== 200 && this.request.getStatus() !== 201 && this.request.getStatus() !== 204)) {

      Expected:
      Jira media updates the issue and Zabbix marks the action as succesfully executed.

            drasikhov Denis Rasikhov
            tharok Juan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: