diff --git a/zerver/fixtures/jira/jira_commented.json b/zerver/fixtures/jira/jira_commented.json index c5652a937d..5fe2864ff5 100644 --- a/zerver/fixtures/jira/jira_commented.json +++ b/zerver/fixtures/jira/jira_commented.json @@ -1 +1,189 @@ -{"webhookEvent":"jira:issue_updated","timestamp":1364403934253,"user":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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"}} +{ + "webhookEvent": "jira:issue_updated", + "timestamp": 1364403934253, + "user": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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" + } +} \ No newline at end of file diff --git a/zerver/fixtures/jira/jira_created.json b/zerver/fixtures/jira/jira_created.json index b4c7b1c107..b2cd2e2a78 100644 --- a/zerver/fixtures/jira/jira_created.json +++ b/zerver/fixtures/jira/jira_created.json @@ -1 +1,120 @@ -{"webhookEvent":"jira:issue_created","timestamp":1364403238369,"user":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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}}} +{ + "webhookEvent": "jira:issue_created", + "timestamp": 1364403238369, + "user": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "othello@zulip.com", + "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 + } + } +} \ No newline at end of file diff --git a/zerver/fixtures/jira/jira_deleted.json b/zerver/fixtures/jira/jira_deleted.json index 2116bd84df..abf14abfb0 100644 --- a/zerver/fixtures/jira/jira_deleted.json +++ b/zerver/fixtures/jira/jira_deleted.json @@ -1 +1,160 @@ -{"webhookEvent":"jira:issue_deleted","timestamp":1364403969102,"user":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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}}} +{ + "webhookEvent": "jira:issue_deleted", + "timestamp": 1364403969102, + "user": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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 + } + } +} \ No newline at end of file diff --git a/zerver/fixtures/jira/jira_postfunction_hook.json b/zerver/fixtures/jira/jira_postfunction_hook.json index 39ac8d0b76..7f944bfd68 100644 --- a/zerver/fixtures/jira/jira_postfunction_hook.json +++ b/zerver/fixtures/jira/jira_postfunction_hook.json @@ -1 +1,167 @@ -{"transition":{"workflowId":10200,"workflowName":"TestProj Workflow","transitionId":3,"transitionName":"Reopen Issue","from_status":"Resolved","to_status":"Reopened"},"comment":"","user":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo","name":"leo","emailAddress":"lfranchi@gmail.com","avatarUrls":{"16x16":"https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122","24x24":"https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122","32x32":"https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122","48x48":"https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122"},"displayName":"Leo Franchi [Administrator]","active":true},"issue":{"id":"10200","self":"https://lfranchi-test.atlassian.net/rest/api/2/issue/10200","key":"TEST-5","fields":{"summary":"PostTest","progress":{"progress":0,"total":0},"timetracking":{},"issuetype":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"https://lfranchi-test.atlassian.net/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"timespent":null,"reporter":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo","name":"leo","emailAddress":"lfranchi@gmail.com","avatarUrls":{"16x16":"https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122","24x24":"https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122","32x32":"https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122","48x48":"https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122"},"displayName":"Leo Franchi [Administrator]","active":true},"created":"2013-05-23T11:04:49.965-0400","updated":"2013-05-23T11:07:13.541-0400","priority":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/priority/3","iconUrl":"https://lfranchi-test.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://lfranchi-test.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://lfranchi-test.atlassian.net/images/icons/statuses/resolved.png","name":"Resolved","id":"5"},"customfield_10006":"5","labels":[],"workratio":-1,"project":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/project/TEST","id":"10000","key":"TEST","name":"TestProj","avatarUrls":{"16x16":"https://lfranchi-test.atlassian.net/secure/projectavatar?size=xsmall&pid=10000&avatarId=10011","24x24":"https://lfranchi-test.atlassian.net/secure/projectavatar?size=small&pid=10000&avatarId=10011","32x32":"https://lfranchi-test.atlassian.net/secure/projectavatar?size=medium&pid=10000&avatarId=10011","48x48":"https://lfranchi-test.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://lfranchi-test.atlassian.net/rest/api/2/issue/TEST-5/votes","votes":0,"hasVoted":false},"fixVersions":[],"resolution":{"self":"https://lfranchi-test.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://lfranchi-test.atlassian.net/rest/api/2/issue/TEST-5/watchers","watchCount":1,"isWatching":true},"worklog":{"startAt":0,"maxResults":0,"total":0,"worklogs":[]},"assignee":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo","name":"leo","emailAddress":"lfranchi@gmail.com","avatarUrls":{"16x16":"https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122","24x24":"https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122","32x32":"https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122","48x48":"https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122"},"displayName":"Leo Franchi [Administrator]","active":true},"attachment":[],"aggregatetimeestimate":null,"versions":[],"timeestimate":null,"aggregatetimespent":null}},"timestamp":1369321658777} +{ + "transition": { + "workflowId": 10200, + "workflowName": "TestProj Workflow", + "transitionId": 3, + "transitionName": "Reopen Issue", + "from_status": "Resolved", + "to_status": "Reopened" + }, + "comment": "", + "user": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo", + "name": "leo", + "emailAddress": "othello@zulip.com", + "avatarUrls": { + "16x16": "https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122", + "24x24": "https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122", + "32x32": "https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122", + "48x48": "https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122" + }, + "displayName": "Leo Franchi [Administrator]", + "active": true + }, + "issue": { + "id": "10200", + "self": "https://lfranchi-test.atlassian.net/rest/api/2/issue/10200", + "key": "TEST-5", + "fields": { + "summary": "PostTest", + "progress": { + "progress": 0, + "total": 0 + }, + "timetracking": {}, + "issuetype": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/issuetype/1", + "id": "1", + "description": "A problem which impairs or prevents the functions of the product.", + "iconUrl": "https://lfranchi-test.atlassian.net/images/icons/issuetypes/bug.png", + "name": "Bug", + "subtask": false + }, + "timespent": null, + "reporter": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo", + "name": "leo", + "emailAddress": "othello@zulip.com", + "avatarUrls": { + "16x16": "https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122", + "24x24": "https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122", + "32x32": "https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122", + "48x48": "https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122" + }, + "displayName": "Leo Franchi [Administrator]", + "active": true + }, + "created": "2013-05-23T11:04:49.965-0400", + "updated": "2013-05-23T11:07:13.541-0400", + "priority": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/priority/3", + "iconUrl": "https://lfranchi-test.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://lfranchi-test.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://lfranchi-test.atlassian.net/images/icons/statuses/resolved.png", + "name": "Resolved", + "id": "5" + }, + "customfield_10006": "5", + "labels": [], + "workratio": -1, + "project": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/project/TEST", + "id": "10000", + "key": "TEST", + "name": "TestProj", + "avatarUrls": { + "16x16": "https://lfranchi-test.atlassian.net/secure/projectavatar?size=xsmall&pid=10000&avatarId=10011", + "24x24": "https://lfranchi-test.atlassian.net/secure/projectavatar?size=small&pid=10000&avatarId=10011", + "32x32": "https://lfranchi-test.atlassian.net/secure/projectavatar?size=medium&pid=10000&avatarId=10011", + "48x48": "https://lfranchi-test.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://lfranchi-test.atlassian.net/rest/api/2/issue/TEST-5/votes", + "votes": 0, + "hasVoted": false + }, + "fixVersions": [], + "resolution": { + "self": "https://lfranchi-test.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://lfranchi-test.atlassian.net/rest/api/2/issue/TEST-5/watchers", + "watchCount": 1, + "isWatching": true + }, + "worklog": { + "startAt": 0, + "maxResults": 0, + "total": 0, + "worklogs": [] + }, + "assignee": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo", + "name": "leo", + "emailAddress": "othello@zulip.com", + "avatarUrls": { + "16x16": "https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122", + "24x24": "https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122", + "32x32": "https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122", + "48x48": "https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122" + }, + "displayName": "Leo Franchi [Administrator]", + "active": true + }, + "attachment": [], + "aggregatetimeestimate": null, + "versions": [], + "timeestimate": null, + "aggregatetimespent": null + } + }, + "timestamp": 1369321658777 +} \ No newline at end of file diff --git a/zerver/fixtures/jira/jira_postfunction_resolved.json b/zerver/fixtures/jira/jira_postfunction_resolved.json index c35f06d040..ac6bb072cf 100644 --- a/zerver/fixtures/jira/jira_postfunction_resolved.json +++ b/zerver/fixtures/jira/jira_postfunction_resolved.json @@ -1 +1,167 @@ -{"transition":{"workflowId":10202,"workflowName":"TestProj Workflow","transitionId":5,"transitionName":"Resolve Issue","from_status":"Open","to_status":"Resolved"},"comment":"","user":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo","name":"leo","emailAddress":"lfranchi@gmail.com","avatarUrls":{"16x16":"https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122","24x24":"https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122","32x32":"https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122","48x48":"https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122"},"displayName":"Leo Franchi [Administrator]","active":true},"issue":{"id":"10202","self":"https://lfranchi-test.atlassian.net/rest/api/2/issue/10202","key":"TEST-7","fields":{"summary":"Gluttony of Post Functions","progress":{"progress":0,"total":0},"timetracking":{},"issuetype":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"https://lfranchi-test.atlassian.net/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"timespent":null,"reporter":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo","name":"leo","emailAddress":"lfranchi@gmail.com","avatarUrls":{"16x16":"https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122","24x24":"https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122","32x32":"https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122","48x48":"https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122"},"displayName":"Leo Franchi [Administrator]","active":true},"created":"2013-05-23T13:43:44.587-0400","updated":"2013-05-23T13:45:46.701-0400","priority":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/priority/2","iconUrl":"https://lfranchi-test.atlassian.net/images/icons/priorities/critical.png","name":"Critical","id":"2"},"description":"Never ending","customfield_10001":null,"customfield_10002":null,"customfield_10003":null,"issuelinks":[],"customfield_10000":"3_*:*_1_*:*_54855_*|*_1_*:*_2_*:*_67260","subtasks":[],"customfield_10008":null,"customfield_10007":null,"status":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"https://lfranchi-test.atlassian.net/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10006":"7","labels":[],"workratio":-1,"project":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/project/TEST","id":"10000","key":"TEST","name":"TestProj","avatarUrls":{"16x16":"https://lfranchi-test.atlassian.net/secure/projectavatar?size=xsmall&pid=10000&avatarId=10011","24x24":"https://lfranchi-test.atlassian.net/secure/projectavatar?size=small&pid=10000&avatarId=10011","32x32":"https://lfranchi-test.atlassian.net/secure/projectavatar?size=medium&pid=10000&avatarId=10011","48x48":"https://lfranchi-test.atlassian.net/secure/projectavatar?pid=10000&avatarId=10011"}},"environment":null,"customfield_10014":null,"customfield_10015":null,"lastViewed":"2013-05-23T13:45:58.574-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://lfranchi-test.atlassian.net/rest/api/2/issue/TEST-7/votes","votes":0,"hasVoted":false},"fixVersions":[],"resolution":{"self":"https://lfranchi-test.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-23T13:45:58.582-0400","aggregatetimeoriginalestimate":null,"duedate":null,"customfield_10020":null,"customfield_10021":"Not Started","watches":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/issue/TEST-7/watchers","watchCount":1,"isWatching":true},"worklog":{"startAt":0,"maxResults":0,"total":0,"worklogs":[]},"assignee":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo","name":"leo","emailAddress":"lfranchi@gmail.com","avatarUrls":{"16x16":"https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122","24x24":"https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122","32x32":"https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122","48x48":"https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122"},"displayName":"Leo Franchi [Administrator]","active":true},"attachment":[],"aggregatetimeestimate":null,"versions":[],"timeestimate":null,"aggregatetimespent":null}},"timestamp":1369331158595} +{ + "transition": { + "workflowId": 10202, + "workflowName": "TestProj Workflow", + "transitionId": 5, + "transitionName": "Resolve Issue", + "from_status": "Open", + "to_status": "Resolved" + }, + "comment": "", + "user": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo", + "name": "leo", + "emailAddress": "othello@zulip.com", + "avatarUrls": { + "16x16": "https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122", + "24x24": "https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122", + "32x32": "https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122", + "48x48": "https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122" + }, + "displayName": "Leo Franchi [Administrator]", + "active": true + }, + "issue": { + "id": "10202", + "self": "https://lfranchi-test.atlassian.net/rest/api/2/issue/10202", + "key": "TEST-7", + "fields": { + "summary": "Gluttony of Post Functions", + "progress": { + "progress": 0, + "total": 0 + }, + "timetracking": {}, + "issuetype": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/issuetype/1", + "id": "1", + "description": "A problem which impairs or prevents the functions of the product.", + "iconUrl": "https://lfranchi-test.atlassian.net/images/icons/issuetypes/bug.png", + "name": "Bug", + "subtask": false + }, + "timespent": null, + "reporter": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo", + "name": "leo", + "emailAddress": "othello@zulip.com", + "avatarUrls": { + "16x16": "https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122", + "24x24": "https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122", + "32x32": "https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122", + "48x48": "https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122" + }, + "displayName": "Leo Franchi [Administrator]", + "active": true + }, + "created": "2013-05-23T13:43:44.587-0400", + "updated": "2013-05-23T13:45:46.701-0400", + "priority": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/priority/2", + "iconUrl": "https://lfranchi-test.atlassian.net/images/icons/priorities/critical.png", + "name": "Critical", + "id": "2" + }, + "description": "Never ending", + "customfield_10001": null, + "customfield_10002": null, + "customfield_10003": null, + "issuelinks": [], + "customfield_10000": "3_*:*_1_*:*_54855_*|*_1_*:*_2_*:*_67260", + "subtasks": [], + "customfield_10008": null, + "customfield_10007": null, + "status": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/status/1", + "description": "The issue is open and ready for the assignee to start work on it.", + "iconUrl": "https://lfranchi-test.atlassian.net/images/icons/statuses/open.png", + "name": "Open", + "id": "1" + }, + "customfield_10006": "7", + "labels": [], + "workratio": -1, + "project": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/project/TEST", + "id": "10000", + "key": "TEST", + "name": "TestProj", + "avatarUrls": { + "16x16": "https://lfranchi-test.atlassian.net/secure/projectavatar?size=xsmall&pid=10000&avatarId=10011", + "24x24": "https://lfranchi-test.atlassian.net/secure/projectavatar?size=small&pid=10000&avatarId=10011", + "32x32": "https://lfranchi-test.atlassian.net/secure/projectavatar?size=medium&pid=10000&avatarId=10011", + "48x48": "https://lfranchi-test.atlassian.net/secure/projectavatar?pid=10000&avatarId=10011" + } + }, + "environment": null, + "customfield_10014": null, + "customfield_10015": null, + "lastViewed": "2013-05-23T13:45:58.574-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://lfranchi-test.atlassian.net/rest/api/2/issue/TEST-7/votes", + "votes": 0, + "hasVoted": false + }, + "fixVersions": [], + "resolution": { + "self": "https://lfranchi-test.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-23T13:45:58.582-0400", + "aggregatetimeoriginalestimate": null, + "duedate": null, + "customfield_10020": null, + "customfield_10021": "Not Started", + "watches": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/issue/TEST-7/watchers", + "watchCount": 1, + "isWatching": true + }, + "worklog": { + "startAt": 0, + "maxResults": 0, + "total": 0, + "worklogs": [] + }, + "assignee": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo", + "name": "leo", + "emailAddress": "othello@zulip.com", + "avatarUrls": { + "16x16": "https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122", + "24x24": "https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122", + "32x32": "https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122", + "48x48": "https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122" + }, + "displayName": "Leo Franchi [Administrator]", + "active": true + }, + "attachment": [], + "aggregatetimeestimate": null, + "versions": [], + "timeestimate": null, + "aggregatetimespent": null + } + }, + "timestamp": 1369331158595 +} \ No newline at end of file diff --git a/zerver/fixtures/jira/jira_postfunction_started.json b/zerver/fixtures/jira/jira_postfunction_started.json index 0913619f3e..c278fc287f 100644 --- a/zerver/fixtures/jira/jira_postfunction_started.json +++ b/zerver/fixtures/jira/jira_postfunction_started.json @@ -1 +1,162 @@ -{"transition":{"workflowId":10202,"workflowName":"TestProj Workflow","transitionId":4,"transitionName":"Start Progress","from_status":"Open","to_status":"Underway"},"comment":"","user":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo","name":"leo","emailAddress":"lfranchi@gmail.com","avatarUrls":{"16x16":"https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122","24x24":"https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122","32x32":"https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122","48x48":"https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122"},"displayName":"Leo Franchi [Administrator]","active":true},"issue":{"id":"10202","self":"https://lfranchi-test.atlassian.net/rest/api/2/issue/10202","key":"TEST-7","fields":{"summary":"Gluttony of Post Functions","progress":{"progress":0,"total":0},"timetracking":{},"issuetype":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/issuetype/1","id":"1","description":"A problem which impairs or prevents the functions of the product.","iconUrl":"https://lfranchi-test.atlassian.net/images/icons/issuetypes/bug.png","name":"Bug","subtask":false},"timespent":null,"reporter":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo","name":"leo","emailAddress":"lfranchi@gmail.com","avatarUrls":{"16x16":"https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122","24x24":"https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122","32x32":"https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122","48x48":"https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122"},"displayName":"Leo Franchi [Administrator]","active":true},"created":"2013-05-23T13:43:44.587-0400","updated":"2013-05-23T13:43:44.587-0400","priority":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/priority/2","iconUrl":"https://lfranchi-test.atlassian.net/images/icons/priorities/critical.png","name":"Critical","id":"2"},"description":"Never ending","customfield_10001":null,"customfield_10002":null,"customfield_10003":null,"issuelinks":[],"customfield_10000":null,"subtasks":[],"customfield_10008":null,"customfield_10007":null,"status":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"https://lfranchi-test.atlassian.net/images/icons/statuses/open.png","name":"Open","id":"1"},"customfield_10006":"7","labels":[],"workratio":-1,"project":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/project/TEST","id":"10000","key":"TEST","name":"TestProj","avatarUrls":{"16x16":"https://lfranchi-test.atlassian.net/secure/projectavatar?size=xsmall&pid=10000&avatarId=10011","24x24":"https://lfranchi-test.atlassian.net/secure/projectavatar?size=small&pid=10000&avatarId=10011","32x32":"https://lfranchi-test.atlassian.net/secure/projectavatar?size=medium&pid=10000&avatarId=10011","48x48":"https://lfranchi-test.atlassian.net/secure/projectavatar?pid=10000&avatarId=10011"}},"environment":null,"customfield_10014":null,"customfield_10015":null,"lastViewed":"2013-05-23T13:44:51.790-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://lfranchi-test.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://lfranchi-test.atlassian.net/rest/api/2/issue/TEST-7/watchers","watchCount":1,"isWatching":true},"worklog":{"startAt":0,"maxResults":0,"total":0,"worklogs":[]},"assignee":{"self":"https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo","name":"leo","emailAddress":"lfranchi@gmail.com","avatarUrls":{"16x16":"https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122","24x24":"https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122","32x32":"https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122","48x48":"https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122"},"displayName":"Leo Franchi [Administrator]","active":true},"attachment":[],"aggregatetimeestimate":null,"versions":[],"timeestimate":null,"aggregatetimespent":null}},"timestamp":1369331091797} +{ + "transition": { + "workflowId": 10202, + "workflowName": "TestProj Workflow", + "transitionId": 4, + "transitionName": "Start Progress", + "from_status": "Open", + "to_status": "Underway" + }, + "comment": "", + "user": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo", + "name": "leo", + "emailAddress": "othello@zulip.com", + "avatarUrls": { + "16x16": "https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122", + "24x24": "https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122", + "32x32": "https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122", + "48x48": "https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122" + }, + "displayName": "Leo Franchi [Administrator]", + "active": true + }, + "issue": { + "id": "10202", + "self": "https://lfranchi-test.atlassian.net/rest/api/2/issue/10202", + "key": "TEST-7", + "fields": { + "summary": "Gluttony of Post Functions", + "progress": { + "progress": 0, + "total": 0 + }, + "timetracking": {}, + "issuetype": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/issuetype/1", + "id": "1", + "description": "A problem which impairs or prevents the functions of the product.", + "iconUrl": "https://lfranchi-test.atlassian.net/images/icons/issuetypes/bug.png", + "name": "Bug", + "subtask": false + }, + "timespent": null, + "reporter": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo", + "name": "leo", + "emailAddress": "othello@zulip.com", + "avatarUrls": { + "16x16": "https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122", + "24x24": "https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122", + "32x32": "https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122", + "48x48": "https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122" + }, + "displayName": "Leo Franchi [Administrator]", + "active": true + }, + "created": "2013-05-23T13:43:44.587-0400", + "updated": "2013-05-23T13:43:44.587-0400", + "priority": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/priority/2", + "iconUrl": "https://lfranchi-test.atlassian.net/images/icons/priorities/critical.png", + "name": "Critical", + "id": "2" + }, + "description": "Never ending", + "customfield_10001": null, + "customfield_10002": null, + "customfield_10003": null, + "issuelinks": [], + "customfield_10000": null, + "subtasks": [], + "customfield_10008": null, + "customfield_10007": null, + "status": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/status/1", + "description": "The issue is open and ready for the assignee to start work on it.", + "iconUrl": "https://lfranchi-test.atlassian.net/images/icons/statuses/open.png", + "name": "Open", + "id": "1" + }, + "customfield_10006": "7", + "labels": [], + "workratio": -1, + "project": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/project/TEST", + "id": "10000", + "key": "TEST", + "name": "TestProj", + "avatarUrls": { + "16x16": "https://lfranchi-test.atlassian.net/secure/projectavatar?size=xsmall&pid=10000&avatarId=10011", + "24x24": "https://lfranchi-test.atlassian.net/secure/projectavatar?size=small&pid=10000&avatarId=10011", + "32x32": "https://lfranchi-test.atlassian.net/secure/projectavatar?size=medium&pid=10000&avatarId=10011", + "48x48": "https://lfranchi-test.atlassian.net/secure/projectavatar?pid=10000&avatarId=10011" + } + }, + "environment": null, + "customfield_10014": null, + "customfield_10015": null, + "lastViewed": "2013-05-23T13:44:51.790-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://lfranchi-test.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://lfranchi-test.atlassian.net/rest/api/2/issue/TEST-7/watchers", + "watchCount": 1, + "isWatching": true + }, + "worklog": { + "startAt": 0, + "maxResults": 0, + "total": 0, + "worklogs": [] + }, + "assignee": { + "self": "https://lfranchi-test.atlassian.net/rest/api/2/user?username=leo", + "name": "leo", + "emailAddress": "othello@zulip.com", + "avatarUrls": { + "16x16": "https://lfranchi-test.atlassian.net/secure/useravatar?size=xsmall&avatarId=10122", + "24x24": "https://lfranchi-test.atlassian.net/secure/useravatar?size=small&avatarId=10122", + "32x32": "https://lfranchi-test.atlassian.net/secure/useravatar?size=medium&avatarId=10122", + "48x48": "https://lfranchi-test.atlassian.net/secure/useravatar?avatarId=10122" + }, + "displayName": "Leo Franchi [Administrator]", + "active": true + }, + "attachment": [], + "aggregatetimeestimate": null, + "versions": [], + "timeestimate": null, + "aggregatetimespent": null + } + }, + "timestamp": 1369331091797 +} \ No newline at end of file diff --git a/zerver/fixtures/jira/jira_reassigned.json b/zerver/fixtures/jira/jira_reassigned.json index 3e9383a45b..ab15805e13 100644 --- a/zerver/fixtures/jira/jira_reassigned.json +++ b/zerver/fixtures/jira/jira_reassigned.json @@ -1 +1,143 @@ -{"webhookEvent":"jira:issue_updated","timestamp":1364403465325,"user":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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"}]}} +{ + "webhookEvent": "jira:issue_updated", + "timestamp": 1364403465325, + "user": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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" + } + ] + } +} \ No newline at end of file diff --git a/zerver/fixtures/jira/jira_reopened.json b/zerver/fixtures/jira/jira_reopened.json index 6acf1e09bf..ce0f5f07f8 100644 --- a/zerver/fixtures/jira/jira_reopened.json +++ b/zerver/fixtures/jira/jira_reopened.json @@ -1 +1,297 @@ -{"webhookEvent":"jira:issue_updated","timestamp":1364418345475,"user":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"10102","self":"http://lfranchi.com:8080/rest/api/2/issue/10102","key":"BUG-7","fields":{"summary":"More cowbell polease","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-7/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":"lfranchi@gmail.com","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-26T14:07:31.484+0000","updated":"2013-03-27T21:05:45.473+0000","description":"THis is a bug","priority":{"self":"http://lfranchi.com:8080/rest/api/2/priority/1","iconUrl":"http://lfranchi.com:8080/images/icons/priority_blocker.gif","name":"Blocker","id":"1"},"duedate":null,"issuelinks":[],"watches":{"self":"http://lfranchi.com:8080/rest/api/2/issue/BUG-7/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/4","description":"This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.","iconUrl":"http://lfranchi.com:8080/images/icons/status_reopened.gif","name":"Reopened","id":"4"},"labels":[],"workratio":-1,"assignee":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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-27T21:05:45.443+0000","components":[],"comment":{"startAt":0,"maxResults":4,"total":4,"comments":[{"self":"http://lfranchi.com:8080/rest/api/2/issue/10102/comment/10103","id":"10103","author":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"No more cowbell","updateAuthor":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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-26T14:18:02.614+0000","updated":"2013-03-26T14:18:02.614+0000"},{"self":"http://lfranchi.com:8080/rest/api/2/issue/10102/comment/10403","id":"10403","author":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"re-opened yeah","updateAuthor":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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-27T21:04:30.416+0000","updated":"2013-03-27T21:04:30.416+0000"},{"self":"http://lfranchi.com:8080/rest/api/2/issue/10102/comment/10404","id":"10404","author":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"closed yeah!","updateAuthor":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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-27T21:05:16.442+0000","updated":"2013-03-27T21:05:16.442+0000"},{"self":"http://lfranchi.com:8080/rest/api/2/issue/10102/comment/10405","id":"10405","author":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"Re-opened yeah!","updateAuthor":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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-27T21:05:45.471+0000","updated":"2013-03-27T21:05:45.471+0000"}]},"timeoriginalestimate":null,"aggregatetimespent":null}},"changelog":{"id":"10606","items":[{"field":"resolution","fieldtype":"jira","from":"1","fromString":"Fixed","to":null,"toString":null},{"field":"status","fieldtype":"jira","from":"5","fromString":"Resolved","to":"4","toString":"Reopened"}]},"comment":{"self":"http://lfranchi.com:8080/rest/api/2/issue/10102/comment/10405","id":"10405","author":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"Re-opened yeah!","updateAuthor":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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-27T21:05:45.471+0000","updated":"2013-03-27T21:05:45.471+0000"}} +{ + "webhookEvent": "jira:issue_updated", + "timestamp": 1364418345475, + "user": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "10102", + "self": "http://lfranchi.com:8080/rest/api/2/issue/10102", + "key": "BUG-7", + "fields": { + "summary": "More cowbell polease", + "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-7/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": "othello@zulip.com", + "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-26T14:07:31.484+0000", + "updated": "2013-03-27T21:05:45.473+0000", + "description": "THis is a bug", + "priority": { + "self": "http://lfranchi.com:8080/rest/api/2/priority/1", + "iconUrl": "http://lfranchi.com:8080/images/icons/priority_blocker.gif", + "name": "Blocker", + "id": "1" + }, + "duedate": null, + "issuelinks": [], + "watches": { + "self": "http://lfranchi.com:8080/rest/api/2/issue/BUG-7/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/4", + "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", + "iconUrl": "http://lfranchi.com:8080/images/icons/status_reopened.gif", + "name": "Reopened", + "id": "4" + }, + "labels": [], + "workratio": -1, + "assignee": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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-27T21:05:45.443+0000", + "components": [], + "comment": { + "startAt": 0, + "maxResults": 4, + "total": 4, + "comments": [ + { + "self": "http://lfranchi.com:8080/rest/api/2/issue/10102/comment/10103", + "id": "10103", + "author": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "No more cowbell", + "updateAuthor": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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-26T14:18:02.614+0000", + "updated": "2013-03-26T14:18:02.614+0000" + }, + { + "self": "http://lfranchi.com:8080/rest/api/2/issue/10102/comment/10403", + "id": "10403", + "author": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "re-opened yeah", + "updateAuthor": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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-27T21:04:30.416+0000", + "updated": "2013-03-27T21:04:30.416+0000" + }, + { + "self": "http://lfranchi.com:8080/rest/api/2/issue/10102/comment/10404", + "id": "10404", + "author": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "closed yeah!", + "updateAuthor": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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-27T21:05:16.442+0000", + "updated": "2013-03-27T21:05:16.442+0000" + }, + { + "self": "http://lfranchi.com:8080/rest/api/2/issue/10102/comment/10405", + "id": "10405", + "author": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "Re-opened yeah!", + "updateAuthor": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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-27T21:05:45.471+0000", + "updated": "2013-03-27T21:05:45.471+0000" + } + ] + }, + "timeoriginalestimate": null, + "aggregatetimespent": null + } + }, + "changelog": { + "id": "10606", + "items": [ + { + "field": "resolution", + "fieldtype": "jira", + "from": "1", + "fromString": "Fixed", + "to": null, + "toString": null + }, + { + "field": "status", + "fieldtype": "jira", + "from": "5", + "fromString": "Resolved", + "to": "4", + "toString": "Reopened" + } + ] + }, + "comment": { + "self": "http://lfranchi.com:8080/rest/api/2/issue/10102/comment/10405", + "id": "10405", + "author": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "Re-opened yeah!", + "updateAuthor": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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-27T21:05:45.471+0000", + "updated": "2013-03-27T21:05:45.471+0000" + } +} \ No newline at end of file diff --git a/zerver/fixtures/jira/jira_resolved.json b/zerver/fixtures/jira/jira_resolved.json index c5c808a293..187896519a 100644 --- a/zerver/fixtures/jira/jira_resolved.json +++ b/zerver/fixtures/jira/jira_resolved.json @@ -1 +1,223 @@ -{"webhookEvent":"jira:issue_updated","timestamp":1364404014529,"user":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"10300","self":"http://lfranchi.com:8080/rest/api/2/issue/10300","key":"BUG-13","fields":{"summary":"Refreshing the page loses the user's current position, which is not optimal","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-13/votes","votes":0,"hasVoted":false},"resolution":{"self":"http://lfranchi.com:8080/rest/api/2/resolution/1","id":"1","description":"A fix for this issue is checked into the tree and tested.","name":"Fixed"},"fixVersions":[],"resolutiondate":"2013-03-27T17:06:54.477+0000","timespent":null,"reporter":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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-26T17:50:48.858+0000","updated":"2013-03-27T17:06:54.515+0000","description":"Definitely not optima.","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-13/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/5","description":"A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.","iconUrl":"http://lfranchi.com:8080/images/icons/status_resolved.gif","name":"Resolved","id":"5"},"labels":[],"workratio":-1,"assignee":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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:54.465+0000","components":[],"comment":{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://lfranchi.com:8080/rest/api/2/issue/10300/comment/10401","id":"10401","author":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"Fixed it, finally!","updateAuthor":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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:06:54.513+0000","updated":"2013-03-27T17:06:54.513+0000"}]},"timeoriginalestimate":null,"aggregatetimespent":null}},"changelog":{"id":"10601","items":[{"field":"status","fieldtype":"jira","from":"1","fromString":"Open","to":"5","toString":"Resolved"},{"field":"assignee","fieldtype":"jira","from":null,"fromString":null,"to":"lfranchi","toString":"Leo Franchi"},{"field":"resolution","fieldtype":"jira","from":null,"fromString":null,"to":"1","toString":"Fixed"}]},"comment":{"self":"http://lfranchi.com:8080/rest/api/2/issue/10300/comment/10401","id":"10401","author":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"Fixed it, finally!","updateAuthor":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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:06:54.513+0000","updated":"2013-03-27T17:06:54.513+0000"}} +{ + "webhookEvent": "jira:issue_updated", + "timestamp": 1364404014529, + "user": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "10300", + "self": "http://lfranchi.com:8080/rest/api/2/issue/10300", + "key": "BUG-13", + "fields": { + "summary": "Refreshing the page loses the user's current position, which is not optimal", + "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-13/votes", + "votes": 0, + "hasVoted": false + }, + "resolution": { + "self": "http://lfranchi.com:8080/rest/api/2/resolution/1", + "id": "1", + "description": "A fix for this issue is checked into the tree and tested.", + "name": "Fixed" + }, + "fixVersions": [], + "resolutiondate": "2013-03-27T17:06:54.477+0000", + "timespent": null, + "reporter": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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-26T17:50:48.858+0000", + "updated": "2013-03-27T17:06:54.515+0000", + "description": "Definitely not optima.", + "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-13/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/5", + "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", + "iconUrl": "http://lfranchi.com:8080/images/icons/status_resolved.gif", + "name": "Resolved", + "id": "5" + }, + "labels": [], + "workratio": -1, + "assignee": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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:54.465+0000", + "components": [], + "comment": { + "startAt": 0, + "maxResults": 1, + "total": 1, + "comments": [ + { + "self": "http://lfranchi.com:8080/rest/api/2/issue/10300/comment/10401", + "id": "10401", + "author": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "Fixed it, finally!", + "updateAuthor": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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:06:54.513+0000", + "updated": "2013-03-27T17:06:54.513+0000" + } + ] + }, + "timeoriginalestimate": null, + "aggregatetimespent": null + } + }, + "changelog": { + "id": "10601", + "items": [ + { + "field": "status", + "fieldtype": "jira", + "from": "1", + "fromString": "Open", + "to": "5", + "toString": "Resolved" + }, + { + "field": "assignee", + "fieldtype": "jira", + "from": null, + "fromString": null, + "to": "lfranchi", + "toString": "Leo Franchi" + }, + { + "field": "resolution", + "fieldtype": "jira", + "from": null, + "fromString": null, + "to": "1", + "toString": "Fixed" + } + ] + }, + "comment": { + "self": "http://lfranchi.com:8080/rest/api/2/issue/10300/comment/10401", + "id": "10401", + "author": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "Fixed it, finally!", + "updateAuthor": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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:06:54.513+0000", + "updated": "2013-03-27T17:06:54.513+0000" + } +} \ No newline at end of file diff --git a/zerver/fixtures/jira/jira_unknown.json b/zerver/fixtures/jira/jira_unknown.json index 9f570bfafd..b3b52b9969 100644 --- a/zerver/fixtures/jira/jira_unknown.json +++ b/zerver/fixtures/jira/jira_unknown.json @@ -1 +1,189 @@ -{"webhookEvent":"jira:issue_unknown","timestamp":1364403934253,"user":{"self":"http://lfranchi.com:8080/rest/api/2/user?username=lfranchi","name":"lfranchi","emailAddress":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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":"lfranchi@gmail.com","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"}} +{ + "webhookEvent": "jira:issue_unknown", + "timestamp": 1364403934253, + "user": { + "self": "http://lfranchi.com:8080/rest/api/2/user?username=lfranchi", + "name": "lfranchi", + "emailAddress": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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": "othello@zulip.com", + "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" + } +} \ No newline at end of file diff --git a/zerver/tests.py b/zerver/tests.py index 2ad385a4b8..6d3f35ddd3 100644 --- a/zerver/tests.py +++ b/zerver/tests.py @@ -3526,7 +3526,7 @@ class JiraHookTests(AuthedTestCase): def test_commented(self): msg = self.send_jira_message('commented') self.assertEqual(msg.subject, "BUG-15: New bug with hook") - self.assertEqual(msg.content, """Leo Franchi **updated** [BUG-15](http://lfranchi.com:8080/browse/BUG-15): + self.assertEqual(msg.content, """Leo Franchi **updated** [BUG-15](http://lfranchi.com:8080/browse/BUG-15) (assigned to @**Othello, the Moor of Venice**): Adding a comment. Oh, what a comment it is! @@ -3545,15 +3545,15 @@ Adding a comment. Oh, what a comment it is! def test_reassigned(self): msg = self.send_jira_message('reassigned') self.assertEqual(msg.subject, "BUG-15: New bug with hook") - self.assertEqual(msg.content, """Leo Franchi **updated** [BUG-15](http://lfranchi.com:8080/browse/BUG-15): + self.assertEqual(msg.content, """Leo Franchi **updated** [BUG-15](http://lfranchi.com:8080/browse/BUG-15) (assigned to @**Othello, the Moor of Venice**): -* Changed assignee from **None** to **Leo Franchi** +* Changed assignee from **None** to @**Othello, the Moor of Venice** """) def test_reopened(self): msg = self.send_jira_message('reopened') self.assertEqual(msg.subject, "BUG-7: More cowbell polease") - self.assertEqual(msg.content, """Leo Franchi **updated** [BUG-7](http://lfranchi.com:8080/browse/BUG-7): + self.assertEqual(msg.content, """Leo Franchi **updated** [BUG-7](http://lfranchi.com:8080/browse/BUG-7) (assigned to @**Othello, the Moor of Venice**): * Changed status from **Resolved** to **Reopened** @@ -3564,10 +3564,10 @@ Re-opened yeah! msg = self.send_jira_message('resolved') self.assertEqual(msg.subject, "BUG-13: Refreshing the page loses the user's current posi...") - self.assertEqual(msg.content, """Leo Franchi **updated** [BUG-13](http://lfranchi.com:8080/browse/BUG-13): + self.assertEqual(msg.content, """Leo Franchi **updated** [BUG-13](http://lfranchi.com:8080/browse/BUG-13) (assigned to @**Othello, the Moor of Venice**): * Changed status from **Open** to **Resolved** -* Changed assignee from **None** to **Leo Franchi** +* Changed assignee from **None** to @**Othello, the Moor of Venice** Fixed it, finally! """) diff --git a/zerver/views/webhooks.py b/zerver/views/webhooks.py index 1176b3fd79..54c16d1870 100644 --- a/zerver/views/webhooks.py +++ b/zerver/views/webhooks.py @@ -4,7 +4,8 @@ from __future__ import absolute_import from django.conf import settings from django.views.decorators.csrf import csrf_exempt -from zerver.models import UserProfile, get_client, MAX_SUBJECT_LENGTH +from zerver.models import UserProfile, get_client, MAX_SUBJECT_LENGTH, \ + get_user_profile_by_email from zerver.lib.actions import check_send_message from zerver.lib.response import json_success, json_error from zerver.decorator import rate_limit_user, authenticated_api_view, REQ, \ @@ -266,6 +267,15 @@ def api_jira_webhook(request, user_profile): title = get_in(payload, ['issue', 'fields', 'summary']) priority = get_in(payload, ['issue', 'fields', 'priority', 'name']) assignee = get_in(payload, ['issue', 'fields', 'assignee', 'displayName'], 'no one') + assignee_email = get_in(payload, ['issue', 'fields', 'assignee', 'emailAddress'], '') + assignee_mention = '' + if assignee_email != '': + try: + assignee_profile = get_user_profile_by_email(assignee_email) + assignee_mention = "@**%s**" % (assignee_profile.full_name,) + except UserProfile.DoesNotExist: + assignee_mention = "**%s**" % (assignee_email,) + subject = "%s: %s" % (issueId, title) if event == 'jira:issue_created': @@ -278,7 +288,11 @@ def api_jira_webhook(request, user_profile): # Reassigned, commented, reopened, and resolved events are all bundled # into this one 'updated' event type, so we try to extract the meaningful # event that happened - content = "%s **updated** %s:\n\n" % (author, issue) + if assignee_mention != '': + assignee_blurb = " (assigned to %s)" % (assignee_mention,) + else: + assignee_blurb = '' + content = "%s **updated** %s%s:\n\n" % (author, issue, assignee_blurb) changelog = get_in(payload, ['changelog',]) comment = get_in(payload, ['comment', 'body']) @@ -287,8 +301,14 @@ def api_jira_webhook(request, user_profile): items = changelog.get('items') for item in items: field = item.get('field') + + # Convert a user's target to a @-mention if possible + targetFieldString = "**%s**" % (item.get('toString'),) + if field == 'assignee' and assignee_mention != '': + targetFieldString = assignee_mention + if field in ('status', 'assignee'): - content += "* Changed %s from **%s** to **%s**\n" % (field, item.get('fromString'), item.get('toString')) + content += "* Changed %s from **%s** to %s\n" % (field, item.get('fromString'), targetFieldString) if comment != '': comment = convert_jira_markup(comment)