xmatters / xm-labs-statuspage

Atlassian StatusPage integration to xMatters
MIT License
4 stars 5 forks source link

callback.eventProperties.number #1

Open CBeaumont opened 6 years ago

CBeaumont commented 6 years ago

I was just helping a client with this StatusPage integration which was relatively easy to set up (which is great) the only issue I experienced was that the StatusPage.io script was trying to create, update and resolve incidents on status page using “callback.eventProperties.number” but no such property existed. I changed this to be “callback.eventIdentifier” instead and everything started to work correctly. Is it possible to get the script on github updated to use that by default ? or is there a reason why eventProperties.number should be used out of the box?

xMTinkerer commented 6 years ago

In the demo flow we show that the Incident ID in StatusPage matches the Incident ID in ServiceNow. The "usage" section of the shared library specifically calls this out:

    // If the user responded with 'create statuspage.io incident', then create a new StatusPage Incident using the
    // callback.eventProperties.number value as the Incident Number and add a message of "A new issue has been detected."
    if( callback.response.toLowerCase() == 'create statuspage.io incident' ) {
        var statusPageData = StatusPage.createStatusPageIncident( callback.eventProperties.number, "A new issue has been detected.");
    }

I could add a note to the README.md page that also calls this out.