Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
webhooks/jira: Remove support for a set of deprecated payloads.
Niloth P98d5bcc5c6f8
diff --git a/static/images/integrations/jira/001.png b/static/images/integrations/jira/001.pngindex 382b75c4aa1..a28fabff890 100644Binary files a/static/images/integrations/jira/001.png and b/static/images/integrations/jira/001.png differdiff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.pyindex 411f0962848..157964b4640 100644--- a/zerver/lib/integrations.py+++ b/zerver/lib/integrations.py@@ -752,7 +752,7 @@ INCOMING_WEBHOOK_INTEGRATIONS: list[IncomingWebhookIntegration] = [IncomingWebhookIntegration("jira",["project-management"],- [WebhookScreenshotConfig("created_v1.json")],+ [WebhookScreenshotConfig("created_assignee_v2.json")],),IncomingWebhookIntegration("jotform", ["productivity"], [WebhookScreenshotConfig("screenshot_response.multipart")]diff --git a/zerver/webhooks/jira/fixtures/change_status_v1.json b/zerver/webhooks/jira/fixtures/change_status_v1.jsondeleted file mode 100644index 7646cece0dc..00000000000--- a/zerver/webhooks/jira/fixtures/change_status_v1.json+++ /dev/null@@ -1,154 +0,0 @@-{- "transition": {- "workflowId": 10200,- "workflowName": "TestProj Workflow",- "transitionId": 3,- "transitionName": "Reopen Issue",- "from_status": "To Do",- "to_status": "In Progress"- },- "comment": "",- "user": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "issue": {- "id": "10200",- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10200",- "key": "TEST-1",- "fields": {- "summary": "Fix That",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "https://zulipp.atlassian.net/rest/api/2/issuetype/1",- "id": "1",- "description": "A problem which impairs or prevents the functions of the product.",- "iconUrl": "https://zulipp.atlassian.net/images/icons/issuetypes/bug.png",- "name": "Bug",- "subtask": false- },- "timespent": null,- "reporter": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2013-05-23T11:04:49.965-0400",- "updated": "2013-05-23T11:07:13.541-0400",- "priority": {- "self": "https://zulipp.atlassian.net/rest/api/2/priority/3",- "iconUrl": "https://zulipp.atlassian.net/images/icons/priorities/major.png",- "name": "Major",- "id": "3"- },- "description": null,- "customfield_10001": null,- "customfield_10002": null,- "customfield_10003": null,- "issuelinks": [],- "customfield_10000": "1_*:*_1_*:*_19188_*|*_5_*:*_2_*:*_86333_*|*_4_*:*_2_*:*_9853",- "subtasks": [],- "customfield_10008": null,- "customfield_10007": null,- "status": {- "self": "https://zulipp.atlassian.net/rest/api/2/status/5",- "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.",- "iconUrl": "https://zulipp.atlassian.net/images/icons/statuses/resolved.png",- "name": "Resolved",- "id": "5"- },- "customfield_10006": "5",- "labels": [],- "workratio": -1,- "project": {- "self": "https://zulipp.atlassian.net/rest/api/2/project/TEST",- "id": "10000",- "key": "TEST",- "name": "TestProj",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/projectavatar?size=xsmall&pid=10000&avatarId=10011",- "24x24": "https://zulipp.atlassian.net/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "32x32": "https://zulipp.atlassian.net/secure/projectavatar?size=medium&pid=10000&avatarId=10011",- "48x48": "https://zulipp.atlassian.net/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "environment": null,- "customfield_10014": null,- "customfield_10015": null,- "lastViewed": "2013-05-23T11:07:38.760-0400",- "aggregateprogress": {- "progress": 0,- "total": 0- },- "customfield_10012": null,- "components": [],- "customfield_10013": null,- "comment": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "comments": []- },- "timeoriginalestimate": null,- "customfield_10017": null,- "customfield_10016": null,- "customfield_10019": null,- "customfield_10018": null,- "votes": {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/TEST-1/votes",- "votes": 0,- "hasVoted": false- },- "fixVersions": [],- "resolution": {- "self": "https://zulipp.atlassian.net/rest/api/2/resolution/1",- "id": "1",- "description": "A fix for this issue is checked into the tree and tested.",- "name": "Fixed"- },- "resolutiondate": "2013-05-23T11:07:13.474-0400",- "aggregatetimeoriginalestimate": null,- "duedate": null,- "customfield_10020": null,- "customfield_10021": "Not Started",- "watches": {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/TEST-1/watchers",- "watchCount": 1,- "isWatching": true- },- "worklog": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "worklogs": []- },- "attachment": [],- "aggregatetimeestimate": null,- "versions": [],- "timeestimate": null,- "aggregatetimespent": null- }- },- "timestamp": 1369321658777-}diff --git a/zerver/webhooks/jira/fixtures/commented_markup_v1.json b/zerver/webhooks/jira/fixtures/commented_markup_v1.jsondeleted file mode 100644index b5bc23950a4..00000000000--- a/zerver/webhooks/jira/fixtures/commented_markup_v1.json+++ /dev/null@@ -1,275 +0,0 @@-{- "webhookEvent": "jira:issue_updated",- "user": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "issue": {- "id": "10100",- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10100",- "key": "TEST-7",- "fields": {- "summary": "Testing of rich text",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "https://zulipp.atlassian.net/rest/api/2/issuetype/2",- "id": "2",- "description": "A new feature of the product, which has yet to be developed.",- "iconUrl": "https://zulipp.atlassian.net/images/icons/issuetypes/newfeature.png",- "name": "New Feature",- "subtask": false- },- "timespent": null,- "reporter": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2013-10-01T16:08:48.446-0400",- "updated": "2013-10-01T16:16:47.821-0400",- "priority": {- "self": "https://zulipp.atlassian.net/rest/api/2/priority/3",- "iconUrl": "https://zulipp.atlassian.net/images/icons/priorities/major.png",- "name": "Major",- "id": "3"- },- "description": "h1. So this is a heading\r\n\r\nAnd some *bold* **and _bold_?\r\n\r\n{quote}\r\nsome stuff goes here\r\n{quote}",- "customfield_10001": null,- "customfield_10002": null,- "customfield_10003": null,- "issuelinks": [],- "customfield_10000": null,- "subtasks": [],- "customfield_10008": null,- "customfield_10007": null,- "status": {- "self": "https://zulipp.atlassian.net/rest/api/2/status/10001",- "description": "",- "iconUrl": "https://zulipp.atlassian.net/images/icons/statuses/open.png",- "name": "To Do",- "id": "10001"- },- "customfield_10006": "7",- "labels": [],- "workratio": -1,- "project": {- "self": "https://zulipp.atlassian.net/rest/api/2/project/10000",- "id": "10000",- "key": "TEST",- "name": "TestProject",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/projectavatar?size=xsmall&pid=10000&avatarId=10011",- "24x24": "https://zulipp.atlassian.net/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "32x32": "https://zulipp.atlassian.net/secure/projectavatar?size=medium&pid=10000&avatarId=10011",- "48x48": "https://zulipp.atlassian.net/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "environment": null,- "customfield_10014": null,- "customfield_10015": null,- "lastViewed": "2013-10-01T16:16:48.075-0400",- "aggregateprogress": {- "progress": 0,- "total": 0- },- "customfield_10012": null,- "components": [],- "customfield_10013": null,- "comment": {- "startAt": 0,- "maxResults": 3,- "total": 3,- "comments": [- {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10100/comment/10000",- "id": "10000",- "author": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "body": "Commenting that *this is important* and also _please italicize me_\r\n\r\nh2. Heading this all the way\r\n\r\nsome quote:\r\n\r\n{quote}\r\noh say can you see...\r\n{quote}",- "updateAuthor": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2013-10-01T16:11:07.615-0400",- "updated": "2013-10-01T16:11:07.615-0400"- },- {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10100/comment/10001",- "id": "10001",- "author": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "body": "*Rich Text* comment, with _italicized_ text,\r\n\r\nand including some\r\n\r\n{quote}\r\nquotations by yours truly\r\n{quote}",- "updateAuthor": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2013-10-01T16:16:47.821-0400",- "updated": "2013-10-01T16:16:47.821-0400"- },- {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10100/comment/10002",- "id": "10002",- "author": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "body": "This is a comment that likes to *exercise* a lot of _different_ {{conventions}} that {{jira uses}}.\r\n\r\n{noformat}\r\nthis code is not highlighted, but monospaced\r\n{noformat}\r\n\r\n{code:python}\r\ndef python():\r\n print \"likes to be formatted\"\r\n{code}\r\n\r\n[http://www.google.com] is a bare link, and [Google|http://www.google.com] is given a title.\r\n\r\nThanks!\r\n\r\n{quote}\r\nSomeone said somewhere\r\n{quote}",- "updateAuthor": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2013-10-01T17:03:00.964-0400",- "updated": "2013-10-01T17:03:00.964-0400"- }- ]- },- "timeoriginalestimate": null,- "customfield_10017": null,- "customfield_10016": null,- "customfield_10019": null,- "customfield_10018": null,- "votes": {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/TEST-7/votes",- "votes": 0,- "hasVoted": false- },- "fixVersions": [],- "resolution": null,- "resolutiondate": null,- "aggregatetimeoriginalestimate": null,- "duedate": null,- "customfield_10020": null,- "customfield_10021": "Not Started",- "watches": {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/TEST-7/watchers",- "watchCount": 1,- "isWatching": true- },- "worklog": {- "startAt": 0,- "maxResults": 20,- "total": 0,- "worklogs": []- },- "assignee": null,- "attachment": [],- "aggregatetimeestimate": null,- "versions": [],- "timeestimate": null,- "aggregatetimespent": null- }- },- "comment": {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10100/comment/10002",- "id": "10002",- "author": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "body": "This is a comment that likes to *exercise* a lot of _different_ {{conventions}} that {{jira uses}}.\r\n\r\n{noformat}\r\nthis code is not highlighted, but monospaced\r\n{noformat}\r\n\r\n{code:python}\r\ndef python():\r\n print \"likes to be formatted\"\r\n{code}\r\n\r\n[http://www.google.com] is a bare link, and [Google|http://www.google.com] is given a title.\r\n\r\nThanks!\r\n\r\n{quote}\r\nSomeone said somewhere\r\n{quote}",- "updateAuthor": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2013-10-01T17:03:00.964-0400",- "updated": "2013-10-01T17:03:00.964-0400"- },- "timestamp": 1380661380969-}diff --git a/zerver/webhooks/jira/fixtures/commented_v1.json b/zerver/webhooks/jira/fixtures/commented_v1.jsondeleted file mode 100644index 9e5fa82733a..00000000000--- a/zerver/webhooks/jira/fixtures/commented_v1.json+++ /dev/null@@ -1,189 +0,0 @@-{- "webhookEvent": "jira:issue_updated",- "timestamp": 1364403934253,- "user": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "issue": {- "id": "10400",- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400",- "key": "BUG-15",- "fields": {- "summary": "New bug with hook",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "http://lfranchi.com:8080/rest/api/2/issuetype/1",- "id": "1",- "description": "A problem which impairs or prevents the functions of the product.",- "iconUrl": "http://lfranchi.com:8080/images/icons/bug.gif",- "name": "Bug",- "subtask": false- },- "votes": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/votes",- "votes": 0,- "hasVoted": false- },- "resolution": null,- "fixVersions": [],- "resolutiondate": null,- "timespent": null,- "reporter": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "aggregatetimeoriginalestimate": null,- "created": "2013-03-27T16:53:58.301+0000",- "updated": "2013-03-27T16:57:45.287+0000",- "description": "Fix me please",- "priority": {- "self": "http://lfranchi.com:8080/rest/api/2/priority/3",- "iconUrl": "http://lfranchi.com:8080/images/icons/priority_major.gif",- "name": "Major",- "id": "3"- },- "duedate": null,- "issuelinks": [],- "watches": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/watchers",- "watchCount": 1,- "isWatching": true- },- "worklog": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "worklogs": []- },- "customfield_10000": null,- "subtasks": [],- "status": {- "self": "http://lfranchi.com:8080/rest/api/2/status/1",- "description": "The issue is open and ready for the assignee to start work on it.",- "iconUrl": "http://lfranchi.com:8080/images/icons/status_open.gif",- "name": "Open",- "id": "1"- },- "labels": [],- "workratio": -1,- "assignee": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "attachment": [],- "aggregatetimeestimate": null,- "project": {- "self": "http://lfranchi.com:8080/rest/api/2/project/BUG",- "id": "10000",- "key": "BUG",- "name": "buggery-test",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "48x48": "http://lfranchi.com:8080/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "versions": [],- "environment": null,- "timeestimate": null,- "aggregateprogress": {- "progress": 0,- "total": 0- },- "lastViewed": "2013-03-27T16:57:45.258+0000",- "components": [],- "comment": {- "startAt": 0,- "maxResults": 1,- "total": 1,- "comments": [- {- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400/comment/10400",- "id": "10400",- "author": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "body": "Adding a comment. Oh, what a comment it is!",- "updateAuthor": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "created": "2013-03-27T17:05:34.250+0000",- "updated": "2013-03-27T17:05:34.250+0000"- }- ]- },- "timeoriginalestimate": null,- "aggregatetimespent": null- }- },- "comment": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400/comment/10400",- "id": "10400",- "author": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "body": "Adding a comment. Oh, what a comment it is!",- "updateAuthor": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "created": "2013-03-27T17:05:34.250+0000",- "updated": "2013-03-27T17:05:34.250+0000"- }-}diff --git a/zerver/webhooks/jira/fixtures/created_assignee_v1.json b/zerver/webhooks/jira/fixtures/created_assignee_v1.jsondeleted file mode 100644index 5314c89c1d8..00000000000--- a/zerver/webhooks/jira/fixtures/created_assignee_v1.json+++ /dev/null@@ -1,154 +0,0 @@-{- "webhookEvent": "jira:issue_created",- "user": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "issue": {- "id": "10003",- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10003",- "key": "TEST-4",- "fields": {- "summary": "Test Created Assignee",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "https://zulipp.atlassian.net/rest/api/2/issuetype/2",- "id": "2",- "description": "A new feature of the product, which has yet to be developed.",- "iconUrl": "https://zulipp.atlassian.net/images/icons/issuetypes/newfeature.png",- "name": "New Feature",- "subtask": false- },- "timespent": null,- "reporter": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2013-09-06T11:20:24.101-0400",- "updated": "2013-09-06T11:20:24.101-0400",- "priority": {- "self": "https://zulipp.atlassian.net/rest/api/2/priority/3",- "iconUrl": "https://zulipp.atlassian.net/images/icons/priorities/major.png",- "name": "Major",- "id": "3"- },- "description": "This is the description, so descriptive it is",- "customfield_10001": null,- "customfield_10002": null,- "customfield_10003": null,- "issuelinks": [],- "customfield_10000": null,- "subtasks": [],- "customfield_10008": null,- "customfield_10007": null,- "status": {- "self": "https://zulipp.atlassian.net/rest/api/2/status/10001",- "description": "",- "iconUrl": "https://zulipp.atlassian.net/images/icons/statuses/open.png",- "name": "To Do",- "id": "10001"- },- "customfield_10006": "4",- "labels": [],- "workratio": -1,- "project": {- "self": "https://zulipp.atlassian.net/rest/api/2/project/10000",- "id": "10000",- "key": "TEST",- "name": "TestProject",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/projectavatar?size=xsmall&pid=10000&avatarId=10011",- "24x24": "https://zulipp.atlassian.net/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "32x32": "https://zulipp.atlassian.net/secure/projectavatar?size=medium&pid=10000&avatarId=10011",- "48x48": "https://zulipp.atlassian.net/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "environment": null,- "customfield_10014": null,- "customfield_10015": null,- "lastViewed": null,- "aggregateprogress": {- "progress": 0,- "total": 0- },- "customfield_10012": null,- "components": [],- "customfield_10013": null,- "comment": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "comments": []- },- "timeoriginalestimate": null,- "customfield_10017": null,- "customfield_10016": null,- "customfield_10019": null,- "customfield_10018": null,- "votes": {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/TEST-4/votes",- "votes": 0,- "hasVoted": false- },- "fixVersions": [],- "resolution": null,- "resolutiondate": null,- "aggregatetimeoriginalestimate": null,- "duedate": null,- "customfield_10020": null,- "customfield_10021": "Not Started",- "watches": {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/TEST-4/watchers",- "watchCount": 0,- "isWatching": false- },- "worklog": {- "startAt": 0,- "maxResults": 20,- "total": 0,- "worklogs": []- },- "assignee": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "attachment": [],- "aggregatetimeestimate": null,- "versions": [],- "timeestimate": null,- "aggregatetimespent": null- }- },- "timestamp": 1378480824183-}diff --git a/zerver/webhooks/jira/fixtures/created_v1.json b/zerver/webhooks/jira/fixtures/created_v1.jsondeleted file mode 100644index 9c7e9b18984..00000000000--- a/zerver/webhooks/jira/fixtures/created_v1.json+++ /dev/null@@ -1,120 +0,0 @@-{- "webhookEvent": "jira:issue_created",- "timestamp": 1364403238369,- "user": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "issue": {- "id": "10400",- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400",- "key": "BUG-15",- "fields": {- "summary": "New bug with hook",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "http://lfranchi.com:8080/rest/api/2/issuetype/1",- "id": "1",- "description": "A problem which impairs or prevents the functions of the product.",- "iconUrl": "http://lfranchi.com:8080/images/icons/bug.gif",- "name": "Bug",- "subtask": false- },- "votes": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/votes",- "votes": 0,- "hasVoted": false- },- "resolution": null,- "fixVersions": [],- "resolutiondate": null,- "timespent": null,- "reporter": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "aggregatetimeoriginalestimate": null,- "created": "2013-03-27T16:53:58.301+0000",- "updated": "2013-03-27T16:53:58.301+0000",- "description": "Fix me please",- "priority": {- "self": "http://lfranchi.com:8080/rest/api/2/priority/3",- "iconUrl": "http://lfranchi.com:8080/images/icons/priority_major.gif",- "name": "Major",- "id": "3"- },- "duedate": null,- "issuelinks": [],- "watches": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/watchers",- "watchCount": 0,- "isWatching": false- },- "worklog": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "worklogs": []- },- "customfield_10000": null,- "subtasks": [],- "status": {- "self": "http://lfranchi.com:8080/rest/api/2/status/1",- "description": "The issue is open and ready for the assignee to start work on it.",- "iconUrl": "http://lfranchi.com:8080/images/icons/status_open.gif",- "name": "Open",- "id": "1"- },- "labels": [],- "workratio": -1,- "assignee": null,- "attachment": [],- "aggregatetimeestimate": null,- "project": {- "self": "http://lfranchi.com:8080/rest/api/2/project/BUG",- "id": "10000",- "key": "BUG",- "name": "buggery-test",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "48x48": "http://lfranchi.com:8080/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "versions": [],- "environment": null,- "timeestimate": null,- "aggregateprogress": {- "progress": 0,- "total": 0- },- "lastViewed": null,- "components": [],- "comment": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "comments": []- },- "timeoriginalestimate": null,- "aggregatetimespent": null- }- }-}diff --git a/zerver/webhooks/jira/fixtures/created_with_unicode_v1.json b/zerver/webhooks/jira/fixtures/created_with_unicode_v1.jsondeleted file mode 100644index 432a8a2d51a..00000000000--- a/zerver/webhooks/jira/fixtures/created_with_unicode_v1.json+++ /dev/null@@ -1,120 +0,0 @@-{- "webhookEvent": "jira:issue_created",- "timestamp": 1364403238369,- "user": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchià",- "active": true- },- "issue": {- "id": "10400",- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400",- "key": "BUG-15",- "fields": {- "summary": "New bug with à hook",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "http://lfranchi.com:8080/rest/api/2/issuetype/1",- "id": "1",- "description": "A problem which impairs or prevents the functions of the product.",- "iconUrl": "http://lfranchi.com:8080/images/icons/bug.gif",- "name": "Bug",- "subtask": false- },- "votes": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/votes",- "votes": 0,- "hasVoted": false- },- "resolution": null,- "fixVersions": [],- "resolutiondate": null,- "timespent": null,- "reporter": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "aggregatetimeoriginalestimate": null,- "created": "2013-03-27T16:53:58.301+0000",- "updated": "2013-03-27T16:53:58.301+0000",- "description": "Fix me please",- "priority": {- "self": "http://lfranchi.com:8080/rest/api/2/priority/3",- "iconUrl": "http://lfranchi.com:8080/images/icons/priority_major.gif",- "name": "Major",- "id": "3"- },- "duedate": null,- "issuelinks": [],- "watches": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/watchers",- "watchCount": 0,- "isWatching": false- },- "worklog": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "worklogs": []- },- "customfield_10000": null,- "subtasks": [],- "status": {- "self": "http://lfranchi.com:8080/rest/api/2/status/1",- "description": "The issue is open and ready for the assignee to start work on it.",- "iconUrl": "http://lfranchi.com:8080/images/icons/status_open.gif",- "name": "Open",- "id": "1"- },- "labels": [],- "workratio": -1,- "assignee": null,- "attachment": [],- "aggregatetimeestimate": null,- "project": {- "self": "http://lfranchi.com:8080/rest/api/2/project/BUG",- "id": "10000",- "key": "BUG",- "name": "buggery-test",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "48x48": "http://lfranchi.com:8080/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "versions": [],- "environment": null,- "timeestimate": null,- "aggregateprogress": {- "progress": 0,- "total": 0- },- "lastViewed": null,- "components": [],- "comment": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "comments": []- },- "timeoriginalestimate": null,- "aggregatetimespent": null- }- }-}diff --git a/zerver/webhooks/jira/fixtures/deleted_v1.json b/zerver/webhooks/jira/fixtures/deleted_v1.jsondeleted file mode 100644index 42479c64fc9..00000000000--- a/zerver/webhooks/jira/fixtures/deleted_v1.json+++ /dev/null@@ -1,160 +0,0 @@-{- "webhookEvent": "jira:issue_deleted",- "timestamp": 1364403969102,- "user": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "issue": {- "id": "10400",- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400",- "key": "BUG-15",- "fields": {- "summary": "New bug with hook",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "http://lfranchi.com:8080/rest/api/2/issuetype/1",- "id": "1",- "description": "A problem which impairs or prevents the functions of the product.",- "iconUrl": "http://lfranchi.com:8080/images/icons/bug.gif",- "name": "Bug",- "subtask": false- },- "votes": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/votes",- "votes": 0,- "hasVoted": false- },- "resolution": null,- "fixVersions": [],- "resolutiondate": null,- "timespent": null,- "reporter": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "aggregatetimeoriginalestimate": null,- "created": "2013-03-27T16:53:58.301+0000",- "updated": "2013-03-27T17:05:34.250+0000",- "description": "Fix me please",- "priority": {- "self": "http://lfranchi.com:8080/rest/api/2/priority/3",- "iconUrl": "http://lfranchi.com:8080/images/icons/priority_major.gif",- "name": "Major",- "id": "3"- },- "duedate": null,- "issuelinks": [],- "watches": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/watchers",- "watchCount": 1,- "isWatching": true- },- "worklog": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "worklogs": []- },- "customfield_10000": null,- "subtasks": [],- "status": {- "self": "http://lfranchi.com:8080/rest/api/2/status/1",- "description": "The issue is open and ready for the assignee to start work on it.",- "iconUrl": "http://lfranchi.com:8080/images/icons/status_open.gif",- "name": "Open",- "id": "1"- },- "labels": [],- "workratio": -1,- "assignee": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "attachment": [],- "aggregatetimeestimate": null,- "project": {- "self": "http://lfranchi.com:8080/rest/api/2/project/BUG",- "id": "10000",- "key": "BUG",- "name": "buggery-test",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "48x48": "http://lfranchi.com:8080/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "versions": [],- "environment": null,- "timeestimate": null,- "aggregateprogress": {- "progress": 0,- "total": 0- },- "lastViewed": "2013-03-27T17:06:09.088+0000",- "components": [],- "comment": {- "startAt": 0,- "maxResults": 1,- "total": 1,- "comments": [- {- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400/comment/10400",- "id": "10400",- "author": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "body": "Adding a comment. Oh, what a comment it is!",- "updateAuthor": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "created": "2013-03-27T17:05:34.250+0000",- "updated": "2013-03-27T17:05:34.250+0000"- }- ]- },- "timeoriginalestimate": null,- "aggregatetimespent": null- }- }-}diff --git a/zerver/webhooks/jira/fixtures/reassigned_v1.json b/zerver/webhooks/jira/fixtures/reassigned_v1.jsondeleted file mode 100644index cde2352d177..00000000000--- a/zerver/webhooks/jira/fixtures/reassigned_v1.json+++ /dev/null@@ -1,143 +0,0 @@-{- "webhookEvent": "jira:issue_updated",- "timestamp": 1364403465325,- "user": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "issue": {- "id": "10400",- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400",- "key": "BUG-15",- "fields": {- "summary": "New bug with hook",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "http://lfranchi.com:8080/rest/api/2/issuetype/1",- "id": "1",- "description": "A problem which impairs or prevents the functions of the product.",- "iconUrl": "http://lfranchi.com:8080/images/icons/bug.gif",- "name": "Bug",- "subtask": false- },- "votes": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/votes",- "votes": 0,- "hasVoted": false- },- "resolution": null,- "fixVersions": [],- "resolutiondate": null,- "timespent": null,- "reporter": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "aggregatetimeoriginalestimate": null,- "created": "2013-03-27T16:53:58.301+0000",- "updated": "2013-03-27T16:57:45.287+0000",- "description": "Fix me please",- "priority": {- "self": "http://lfranchi.com:8080/rest/api/2/priority/3",- "iconUrl": "http://lfranchi.com:8080/images/icons/priority_major.gif",- "name": "Major",- "id": "3"- },- "duedate": null,- "issuelinks": [],- "watches": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/watchers",- "watchCount": 1,- "isWatching": true- },- "worklog": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "worklogs": []- },- "customfield_10000": null,- "subtasks": [],- "status": {- "self": "http://lfranchi.com:8080/rest/api/2/status/1",- "description": "The issue is open and ready for the assignee to start work on it.",- "iconUrl": "http://lfranchi.com:8080/images/icons/status_open.gif",- "name": "Open",- "id": "1"- },- "labels": [],- "workratio": -1,- "assignee": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "attachment": [],- "aggregatetimeestimate": null,- "project": {- "self": "http://lfranchi.com:8080/rest/api/2/project/BUG",- "id": "10000",- "key": "BUG",- "name": "buggery-test",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "48x48": "http://lfranchi.com:8080/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "versions": [],- "environment": null,- "timeestimate": null,- "aggregateprogress": {- "progress": 0,- "total": 0- },- "lastViewed": "2013-03-27T16:57:45.258+0000",- "components": [],- "comment": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "comments": []- },- "timeoriginalestimate": null,- "aggregatetimespent": null- }- },- "changelog": {- "id": "10600",- "items": [- {- "field": "assignee",- "fieldtype": "jira",- "from": null,- "fromString": null,- "to": "lfranchi",- "toString": "Leo Franchi"- }- ]- }-}diff --git a/zerver/webhooks/jira/fixtures/unknown_v1.json b/zerver/webhooks/jira/fixtures/unknown_v1.jsondeleted file mode 100644index dc3cd839980..00000000000--- a/zerver/webhooks/jira/fixtures/unknown_v1.json+++ /dev/null@@ -1,189 +0,0 @@-{- "webhookEvent": "jira:issue_unknown",- "timestamp": 1364403934253,- "user": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "issue": {- "id": "10400",- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400",- "key": "BUG-15",- "fields": {- "summary": "New bug with hook",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "http://lfranchi.com:8080/rest/api/2/issuetype/1",- "id": "1",- "description": "A problem which impairs or prevents the functions of the product.",- "iconUrl": "http://lfranchi.com:8080/images/icons/bug.gif",- "name": "Bug",- "subtask": false- },- "votes": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/votes",- "votes": 0,- "hasVoted": false- },- "resolution": null,- "fixVersions": [],- "resolutiondate": null,- "timespent": null,- "reporter": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "aggregatetimeoriginalestimate": null,- "created": "2013-03-27T16:53:58.301+0000",- "updated": "2013-03-27T16:57:45.287+0000",- "description": "Fix me please",- "priority": {- "self": "http://lfranchi.com:8080/rest/api/2/priority/3",- "iconUrl": "http://lfranchi.com:8080/images/icons/priority_major.gif",- "name": "Major",- "id": "3"- },- "duedate": null,- "issuelinks": [],- "watches": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-15/watchers",- "watchCount": 1,- "isWatching": true- },- "worklog": {- "startAt": 0,- "maxResults": 0,- "total": 0,- "worklogs": []- },- "customfield_10000": null,- "subtasks": [],- "status": {- "self": "http://lfranchi.com:8080/rest/api/2/status/1",- "description": "The issue is open and ready for the assignee to start work on it.",- "iconUrl": "http://lfranchi.com:8080/images/icons/status_open.gif",- "name": "Open",- "id": "1"- },- "labels": [],- "workratio": -1,- "assignee": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "attachment": [],- "aggregatetimeestimate": null,- "project": {- "self": "http://lfranchi.com:8080/rest/api/2/project/BUG",- "id": "10000",- "key": "BUG",- "name": "buggery-test",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "48x48": "http://lfranchi.com:8080/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "versions": [],- "environment": null,- "timeestimate": null,- "aggregateprogress": {- "progress": 0,- "total": 0- },- "lastViewed": "2013-03-27T16:57:45.258+0000",- "components": [],- "comment": {- "startAt": 0,- "maxResults": 1,- "total": 1,- "comments": [- {- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400/comment/10400",- "id": "10400",- "author": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "body": "Adding a comment. Oh, what a comment it is!",- "updateAuthor": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "created": "2013-03-27T17:05:34.250+0000",- "updated": "2013-03-27T17:05:34.250+0000"- }- ]- },- "timeoriginalestimate": null,- "aggregatetimespent": null- }- },- "comment": {- "self": "http://lfranchi.com:8080/rest/api/2/issue/10400/comment/10400",- "id": "10400",- "author": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "body": "Adding a comment. Oh, what a comment it is!",- "updateAuthor": {- "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi",- "name": "lfranchi",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "http://lfranchi.com:8080/secure/useravatar?size=small&avatarId=10122",- "48x48": "http://lfranchi.com:8080/secure/useravatar?avatarId=10122"- },- "displayName": "Leo Franchi",- "active": true- },- "created": "2013-03-27T17:05:34.250+0000",- "updated": "2013-03-27T17:05:34.250+0000"- }-}diff --git a/zerver/webhooks/jira/fixtures/updated_priority_v1.json b/zerver/webhooks/jira/fixtures/updated_priority_v1.jsondeleted file mode 100644index 8263065d4ae..00000000000--- a/zerver/webhooks/jira/fixtures/updated_priority_v1.json+++ /dev/null@@ -1,221 +0,0 @@-{- "webhookEvent": "jira:issue_updated",- "user": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "issue": {- "id": "10000",- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10000",- "key": "TEST-1",- "fields": {- "summary": "Fix That",- "progress": {- "progress": 0,- "total": 0- },- "timetracking": {},- "issuetype": {- "self": "https://zulipp.atlassian.net/rest/api/2/issuetype/2",- "id": "2",- "description": "A new feature of the product, which has yet to be developed.",- "iconUrl": "https://zulipp.atlassian.net/images/icons/issuetypes/newfeature.png",- "name": "New Feature",- "subtask": false- },- "timespent": null,- "reporter": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2013-09-06T11:07:19.972-0400",- "updated": "2014-02-26T14:57:13.139-0500",- "priority": {- "self": "https://zulipp.atlassian.net/rest/api/2/priority/3",- "iconUrl": "https://zulipp.atlassian.net/images/icons/priorities/major.png",- "name": "Major",- "id": "3"- },- "description": "Please",- "customfield_10001": null,- "customfield_10002": null,- "customfield_10003": null,- "issuelinks": [],- "customfield_10000": null,- "subtasks": [],- "customfield_10008": null,- "customfield_10007": null,- "status": {- "self": "https://zulipp.atlassian.net/rest/api/2/status/10001",- "description": "",- "iconUrl": "https://zulipp.atlassian.net/images/icons/statuses/open.png",- "name": "To Do",- "id": "10001",- "statusCategory": {- "self": "https://zulipp.atlassian.net/rest/api/2/statuscategory/2",- "id": 2,- "key": "new",- "colorName": "blue-gray",- "name": "New"- }- },- "customfield_10006": "1",- "labels": [],- "workratio": -1,- "project": {- "self": "https://zulipp.atlassian.net/rest/api/2/project/10000",- "id": "10000",- "key": "TEST",- "name": "TestProject",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/projectavatar?size=xsmall&pid=10000&avatarId=10011",- "24x24": "https://zulipp.atlassian.net/secure/projectavatar?size=small&pid=10000&avatarId=10011",- "32x32": "https://zulipp.atlassian.net/secure/projectavatar?size=medium&pid=10000&avatarId=10011",- "48x48": "https://zulipp.atlassian.net/secure/projectavatar?pid=10000&avatarId=10011"- }- },- "environment": null,- "customfield_10014": null,- "customfield_10015": null,- "lastViewed": "2014-02-26T14:56:59.145-0500",- "aggregateprogress": {- "progress": 0,- "total": 0- },- "customfield_10012": null,- "components": [],- "customfield_10013": null,- "comment": {- "startAt": 0,- "maxResults": 1,- "total": 1,- "comments": [- {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/10000/comment/10100",- "id": "10100",- "author": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "body": "test",- "updateAuthor": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "created": "2014-02-26T14:55:10.416-0500",- "updated": "2014-02-26T14:55:10.416-0500"- }- ]- },- "timeoriginalestimate": null,- "customfield_10017": null,- "customfield_10016": null,- "customfield_10019": null,- "customfield_10018": null,- "votes": {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/TEST-1/votes",- "votes": 0,- "hasVoted": false- },- "fixVersions": [],- "resolution": null,- "resolutiondate": null,- "creator": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "aggregatetimeoriginalestimate": null,- "duedate": null,- "customfield_10020": null,- "customfield_10021": "Not Started",- "watches": {- "self": "https://zulipp.atlassian.net/rest/api/2/issue/TEST-1/watchers",- "watchCount": 1,- "isWatching": true- },- "worklog": {- "startAt": 0,- "maxResults": 20,- "total": 0,- "worklogs": []- },- "assignee": {- "self": "https://zulipp.atlassian.net/rest/api/2/user?username=leo",- "name": "leo",- "emailAddress": "[email protected]",- "avatarUrls": {- "16x16": "https://zulipp.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122",- "24x24": "https://zulipp.atlassian.net/secure/useravatar?size=small&avatarId=10122",- "32x32": "https://zulipp.atlassian.net/secure/useravatar?size=medium&avatarId=10122",- "48x48": "https://zulipp.atlassian.net/secure/useravatar?avatarId=10122"- },- "displayName": "Leonardo Franchi [Administrator]",- "active": true- },- "attachment": [],- "aggregatetimeestimate": null,- "versions": [],- "timeestimate": null,- "aggregatetimespent": null- }- },- "changelog": {- "id": "10102",- "items": [- {- "field": "priority",- "fieldtype": "jira",- "from": "2",- "fromString": "Critical",- "to": "3",- "toString": "Major"- }- ]- },- "timestamp": 1393444633145-}diff --git a/zerver/webhooks/jira/tests.py b/zerver/webhooks/jira/tests.pyindex 80b7c2582a3..2f08de1fcc4 100644--- a/zerver/webhooks/jira/tests.py+++ b/zerver/webhooks/jira/tests.py@@ -1,5 +1,4 @@from unittest.mock import patch-from urllib.parse import quote, unquotefrom zerver.lib.test_classes import WebhookTestCase@@ -36,7 +35,6 @@ Leo Franchi created [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/* **Priority**: Major* **Assignee**: no one""".strip()- self.check_webhook("created_v1", expected_topic_name, expected_message)self.check_webhook("created_v2", expected_topic_name, expected_message)def test_ignored_events(self) -> None:@@ -59,59 +57,6 @@ Leo Franchi created [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/self.assertFalse(m.called)self.assert_json_success(result)- def test_created_with_channel_with_spaces_escaped(self) -> None:- self.channel_name = quote("jira alerts")- self.url = self.build_webhook_url()- self.subscribe(self.test_user, unquote(self.channel_name))-- payload = self.get_body("created_v1")- result = self.client_post(self.url, payload, content_type="application/json")-- self.assert_json_success(result)-- expected_topic_name = "BUG-15: New bug with hook"- expected_message = """-Leo Franchi created [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/BUG-15):--* **Priority**: Major-* **Assignee**: no one-""".strip()- msg = self.get_last_message()- self.assertEqual(msg.content, expected_message)- self.assertEqual(msg.topic_name(), expected_topic_name)-- def test_created_with_channel_with_spaces_double_escaped(self) -> None:- self.channel_name = quote(quote("jira alerts"))- self.url = self.build_webhook_url()- self.subscribe(self.test_user, unquote(unquote(self.channel_name)))-- payload = self.get_body("created_v1")- result = self.client_post(self.url, payload, content_type="application/json")-- self.assert_json_success(result)-- expected_topic_name = "BUG-15: New bug with hook"- expected_message = """-Leo Franchi created [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/BUG-15):--* **Priority**: Major-* **Assignee**: no one-""".strip()- msg = self.get_last_message()- self.assertEqual(msg.content, expected_message)- self.assertEqual(msg.topic_name(), expected_topic_name)-- def test_created_with_topic_with_spaces_double_escaped(self) -> None:- self.url = self.build_webhook_url(topic=quote(quote("alerts test")))- expected_topic_name = "alerts test"- expected_message = """-Leo Franchi created [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/BUG-15):--* **Priority**: Major-* **Assignee**: no one-""".strip()- self.check_webhook("created_v1", expected_topic_name, expected_message)-def test_created_with_unicode(self) -> None:expected_topic_name = "BUG-15: New bug with à hook"expected_message = """@@ -120,7 +65,6 @@ Leo Franchià created [BUG-15: New bug with à hook](http://lfranchi.com:8080/br* **Priority**: Major* **Assignee**: no one""".strip()- self.check_webhook("created_with_unicode_v1", expected_topic_name, expected_message)self.check_webhook("created_with_unicode_v2", expected_topic_name, expected_message)def test_created_assignee(self) -> None:@@ -131,7 +75,6 @@ Leonardo Franchi [Administrator] created [TEST-4: Test Created Assignee](https:/* **Priority**: Major* **Assignee**: Leonardo Franchi [Administrator]""".strip()- self.check_webhook("created_assignee_v1", expected_topic_name, expected_message)self.check_webhook("created_assignee_v2", expected_topic_name, expected_message)def test_commented(self) -> None:@@ -143,7 +86,6 @@ Leo Franchi commented on [BUG-15: New bug with hook](http://lfranchi.com:8080/brAdding a comment. Oh, what a comment it is!```""".strip()- self.check_webhook("commented_v1", expected_topic_name, expected_message)self.check_webhook("commented_v2", expected_topic_name, expected_message)def test_commented_with_two_full_links(self) -> None:@@ -179,13 +121,11 @@ Adding a comment. Oh, what a comment it is!expected_topic_name = "TEST-7: Testing of rich text"expected_message = """Leonardo Franchi [Administrator] commented on [TEST-7: Testing of rich text](https://zulipp.atlassian.net/browse/TEST-7):\n\n``` quote\nThis is a comment that likes to **exercise** a lot of _different_ `conventions` that `jira uses`.\r\n\r\n~~~\n\r\nthis code is not highlighted, but monospaced\r\n\n~~~\r\n\r\n~~~\n\r\ndef python():\r\n print "likes to be formatted"\r\n\n~~~\r\n\r\n[http://www.google.com](http://www.google.com) is a bare link, and [Google](http://www.google.com) is given a title.\r\n\r\nThanks!\r\n\r\n~~~ quote\n\r\nSomeone said somewhere\r\n\n~~~\n```"""- self.check_webhook("commented_markup_v1", expected_topic_name, expected_message)self.check_webhook("commented_markup_v2", expected_topic_name, expected_message)def test_deleted(self) -> None:expected_topic_name = "BUG-15: New bug with hook"expected_message = "Leo Franchi deleted [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/BUG-15)."- self.check_webhook("deleted_v1", expected_topic_name, expected_message)self.check_webhook("deleted_v2", expected_topic_name, expected_message)def test_reassigned(self) -> None:@@ -193,7 +133,6 @@ Adding a comment. Oh, what a comment it is!expected_message = """Leo Franchi updated [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/BUG-15) (assigned to **Othello, the Moor of Venice**):* Changed assignee to **Othello, the Moor of Venice**"""- self.check_webhook("reassigned_v1", expected_topic_name, expected_message)self.check_webhook("reassigned_v2", expected_topic_name, expected_message)def test_priority_updated(self) -> None:@@ -201,7 +140,6 @@ Adding a comment. Oh, what a comment it is!expected_message = """Leonardo Franchi [Administrator] updated [TEST-1: Fix That](https://zulipp.atlassian.net/browse/TEST-1) (assigned to **[email protected]**):* Changed priority from **Critical** to **Major**"""- self.check_webhook("updated_priority_v1", expected_topic_name, expected_message)self.check_webhook("updated_priority_v2", expected_topic_name, expected_message)def test_status_changed(self) -> None:@@ -209,7 +147,6 @@ Adding a comment. Oh, what a comment it is!expected_message = """Leonardo Franchi [Administrator] updated [TEST-1: Fix That](https://zulipp.atlassian.net/browse/TEST-1):* Changed status from **To Do** to **In Progress**"""- self.check_webhook("change_status_v1", expected_topic_name, expected_message)self.check_webhook("change_status_v2", expected_topic_name, expected_message)def test_comment_event_comment_created(self) -> None:diff --git a/zerver/webhooks/jira/view.py b/zerver/webhooks/jira/view.pyindex 97d531ee1c6..691395caff5 100644--- a/zerver/webhooks/jira/view.py+++ b/zerver/webhooks/jira/view.py@@ -171,23 +171,6 @@ def get_issue_topic(payload: WildValue) -> str:return f"{get_issue_id(payload)}: {get_issue_title(payload)}"-def get_sub_event_for_update_issue(payload: WildValue) -> str:- sub_event = payload.get("issue_event_type_name", "").tame(check_string)- if sub_event == "":- if payload.get("comment"):- return "issue_commented"- elif payload.get("transition"):- return "issue_transited"- return sub_event---def get_event_type(payload: WildValue) -> str | None:- event = payload.get("webhookEvent").tame(check_none_or(check_string))- if event is None and payload.get("transition"):- event = "jira:issue_updated"- return event--def add_change_info(content: str, field: str | None, from_field: str | None, to_field: str | None) -> str:@@ -216,7 +199,7 @@ def handle_updated_issue_event(payload: WildValue, user_profile: UserProfile) ->else:assignee_blurb = ""- sub_event = get_sub_event_for_update_issue(payload)+ sub_event = payload.get("issue_event_type_name").tame(check_string)if "comment" in sub_event:if sub_event == "issue_commented":verb = "commented on"@@ -261,14 +244,6 @@ def handle_updated_issue_event(payload: WildValue, user_profile: UserProfile) ->content, field, from_field_string, target_field_string)- elif sub_event == "issue_transited":- from_field_string = get_in(payload, ["transition", "from_status"]).tame(check_string)- target_field_string = "**{}**".format(- get_in(payload, ["transition", "to_status"]).tame(check_string)- )- if target_field_string or from_field_string:- content = add_change_info(content, "status", from_field_string, target_field_string)-return content@@ -356,7 +331,7 @@ def api_jira_webhook(*,payload: JsonBodyPayload[WildValue],) -> HttpResponse:- event = get_event_type(payload)+ event = payload.get("webhookEvent").tame(check_none_or(check_string))if event in IGNORED_EVENTS:return json_success(request)