I have the following question regarding webhooks and issue moves:
When I move an issue in JIRA does that trigger the jira:issue_updated event or does it fire a jira:issue_deleted event followed by a jira:issue_created event?
Essentially, is a move considered to be an update to an existing issues or is it more of a copy operation.
Community moderators have prevented the ability to post new answers.
Answer: It fires the jira:issue_updated event and tells you how the key changed.
In order to work this out I just used the webhook-inspector Atlassian Connect plugin and I did the following:
The output of that command from the webhook inspector is here:
╭─rmassaioli at roberts-mac-pro in ~/Code/shipit/ping-me-project/webhook-inspector on master✔ using ‹ruby-1.9.2› 14-10-21 - 10:28:46 [0] ╰─± node app.js Watching atlassian-connect.json for changes Initialized memory storage adapter Add-on server running at http://localhost:3000 Registering add-on... GET /atlassian-connect.json 200 5ms - 4.73kb Registered with host jira:034b10ce-1410-4f35-bcb9-0adb831f8ba3 at http://localhost:2990/jira Saved tenant details for jira:034b10ce-1410-4f35-bcb9-0adb831f8ba3 to database { key: 'webhook-inspector', clientKey: 'jira:034b10ce-1410-4f35-bcb9-0adb831f8ba3', publicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCtpXd+b8om94pKYbytrNA8Upv+nw8RomxF7XdAdoxoOHbUPBv5YSN2L3MJkDd4pl3tfbOvonCqWX8IYQR4qfvvB3m/syH8F+PKRZRYFZ7tX5mu/23oOu8jCW2RhLvp05sxF2k59AkVfmwhUXa2aILR1gRY1+AAN9CITxsoaFVVxQIDAQAB', sharedSecret: '4d07f97c-072a-4707-b009-68cc64e9df30', serverVersion: '6328', pluginsVersion: '1.1.7', baseUrl: 'http://localhost:2990/jira', productType: 'jira', description: 'Atlassian JIRA at http://Roberts-Mac-Pro.local:2990/jira', eventType: 'installed' } POST /installed?user_key=admin 204 15ms jira:issue_created { webhookEvent: 'jira:issue_created', user: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, issue: { id: '10100', self: 'http://localhost:2990/jira/rest/api/2/issue/10100', key: 'TP-1', fields: { versions: [ [length]: 0 ], duedate: null, aggregatetimeestimate: null, issuetype: { self: 'http://localhost:2990/jira/rest/api/2/issuetype/1', id: '1', description: 'A problem which impairs or prevents the functions of the product.', iconUrl: 'http://localhost:2990/jira/images/icons/issuetypes/bug.png', name: 'Bug', subtask: false }, timetracking: {}, lastViewed: null, watches: { self: 'http://localhost:2990/jira/rest/api/2/issue/TP-1/watchers', watchCount: 0, isWatching: false }, summary: 'Test Issue To Be Deleted', timeoriginalestimate: null, worklog: { startAt: 0, maxResults: 20, total: 0, worklogs: [ [length]: 0 ] }, creator: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, created: '2014-10-21T10:30:07.073+1100', labels: [ [length]: 0 ], priority: { self: 'http://localhost:2990/jira/rest/api/2/priority/3', iconUrl: 'http://localhost:2990/jira/images/icons/priorities/major.png', name: 'Major', id: '3' }, subtasks: [ [length]: 0 ], reporter: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, progress: { progress: 0, total: 0 }, fixVersions: [ [length]: 0 ], attachment: [ [length]: 0 ], timeestimate: null, resolutiondate: null, project: { self: 'http://localhost:2990/jira/rest/api/2/project/10100', id: '10100', key: 'TP', name: 'Test Project', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/projectavatar?size=medium&pid=10100&avatarId=10011', '16x16': 'http://localhost:2990/jira/secure/projectavatar?size=xsmall&pid=10100&avatarId=10011', '48x48': 'http://localhost:2990/jira/secure/projectavatar?pid=10100&avatarId=10011', '24x24': 'http://localhost:2990/jira/secure/projectavatar?size=small&pid=10100&avatarId=10011' } }, workratio: -1, assignee: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, components: [ [length]: 0 ], updated: '2014-10-21T10:30:07.073+1100', issuelinks: [ [length]: 0 ], description: 'Test issue to be deleted.', aggregatetimeoriginalestimate: null, comment: { startAt: 0, maxResults: 0, total: 0, comments: [ [length]: 0 ] }, votes: { self: 'http://localhost:2990/jira/rest/api/2/issue/TP-1/votes', votes: 0, hasVoted: false }, environment: null, resolution: null, aggregatetimespent: null, status: { self: 'http://localhost:2990/jira/rest/api/2/status/10002', description: '', iconUrl: 'http://localhost:2990/jira/images/icons/statuses/open.png', name: 'To Do', id: '10002', statusCategory: { self: 'http://localhost:2990/jira/rest/api/2/statuscategory/1', id: 1, key: 'undefined', colorName: 'medium-gray', name: 'No Category' } }, aggregateprogress: { progress: 0, total: 0 }, timespent: null } }, timestamp: 1413847807231 } POST /jira-issue_created?user_id=admin&user_key=admin 204 16ms jira:issue_created { webhookEvent: 'jira:issue_created', user: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, issue: { id: '10101', self: 'http://localhost:2990/jira/rest/api/2/issue/10101', key: 'TP-2', fields: { versions: [ [length]: 0 ], duedate: null, aggregatetimeestimate: null, issuetype: { self: 'http://localhost:2990/jira/rest/api/2/issuetype/1', id: '1', description: 'A problem which impairs or prevents the functions of the product.', iconUrl: 'http://localhost:2990/jira/images/icons/issuetypes/bug.png', name: 'Bug', subtask: false }, timetracking: {}, lastViewed: null, watches: { self: 'http://localhost:2990/jira/rest/api/2/issue/TP-2/watchers', watchCount: 0, isWatching: false }, summary: 'Test issue to be moved.', timeoriginalestimate: null, worklog: { startAt: 0, maxResults: 20, total: 0, worklogs: [ [length]: 0 ] }, creator: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, created: '2014-10-21T10:30:19.609+1100', labels: [ [length]: 0 ], priority: { self: 'http://localhost:2990/jira/rest/api/2/priority/3', iconUrl: 'http://localhost:2990/jira/images/icons/priorities/major.png', name: 'Major', id: '3' }, subtasks: [ [length]: 0 ], reporter: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, progress: { progress: 0, total: 0 }, fixVersions: [ [length]: 0 ], attachment: [ [length]: 0 ], timeestimate: null, resolutiondate: null, project: { self: 'http://localhost:2990/jira/rest/api/2/project/10100', id: '10100', key: 'TP', name: 'Test Project', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/projectavatar?size=medium&pid=10100&avatarId=10011', '16x16': 'http://localhost:2990/jira/secure/projectavatar?size=xsmall&pid=10100&avatarId=10011', '48x48': 'http://localhost:2990/jira/secure/projectavatar?pid=10100&avatarId=10011', '24x24': 'http://localhost:2990/jira/secure/projectavatar?size=small&pid=10100&avatarId=10011' } }, workratio: -1, assignee: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, components: [ [length]: 0 ], updated: '2014-10-21T10:30:19.609+1100', issuelinks: [ [length]: 0 ], description: 'Test issue to be moved.', aggregatetimeoriginalestimate: null, comment: { startAt: 0, maxResults: 0, total: 0, comments: [ [length]: 0 ] }, votes: { self: 'http://localhost:2990/jira/rest/api/2/issue/TP-2/votes', votes: 0, hasVoted: false }, environment: null, resolution: null, aggregatetimespent: null, status: { self: 'http://localhost:2990/jira/rest/api/2/status/10002', description: '', iconUrl: 'http://localhost:2990/jira/images/icons/statuses/open.png', name: 'To Do', id: '10002', statusCategory: { self: 'http://localhost:2990/jira/rest/api/2/statuscategory/1', id: 1, key: 'undefined', colorName: 'medium-gray', name: 'No Category' } }, aggregateprogress: { progress: 0, total: 0 }, timespent: null } }, timestamp: 1413847819624 } POST /jira-issue_created?user_id=admin&user_key=admin 204 10ms jira:issue_updated { webhookEvent: 'jira:issue_updated', user: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, issue: { id: '10101', self: 'http://localhost:2990/jira/rest/api/2/issue/10101', key: 'DEMO-7', fields: { versions: [ [length]: 0 ], duedate: null, aggregatetimeestimate: null, issuetype: { self: 'http://localhost:2990/jira/rest/api/2/issuetype/1', id: '1', description: 'A problem which impairs or prevents the functions of the product.', iconUrl: 'http://localhost:2990/jira/images/icons/issuetypes/bug.png', name: 'Bug', subtask: false }, timetracking: {}, lastViewed: '2014-10-21T10:31:08.504+1100', watches: { self: 'http://localhost:2990/jira/rest/api/2/issue/DEMO-7/watchers', watchCount: 1, isWatching: true }, summary: 'Test issue to be moved.', timeoriginalestimate: null, worklog: { startAt: 0, maxResults: 20, total: 0, worklogs: [ [length]: 0 ] }, creator: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, created: '2014-10-21T10:30:19.609+1100', labels: [ [length]: 0 ], priority: { self: 'http://localhost:2990/jira/rest/api/2/priority/3', iconUrl: 'http://localhost:2990/jira/images/icons/priorities/major.png', name: 'Major', id: '3' }, subtasks: [ [length]: 0 ], reporter: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, progress: { progress: 0, total: 0 }, fixVersions: [ [length]: 0 ], attachment: [ [length]: 0 ], timeestimate: null, resolutiondate: null, project: { self: 'http://localhost:2990/jira/rest/api/2/project/10000', id: '10000', key: 'DEMO', name: 'Demonstration Project', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/projectavatar?size=medium&pid=10000&avatarId=10400', '16x16': 'http://localhost:2990/jira/secure/projectavatar?size=xsmall&pid=10000&avatarId=10400', '48x48': 'http://localhost:2990/jira/secure/projectavatar?pid=10000&avatarId=10400', '24x24': 'http://localhost:2990/jira/secure/projectavatar?size=small&pid=10000&avatarId=10400' } }, workratio: -1, assignee: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, components: [ [length]: 0 ], updated: '2014-10-21T10:31:08.529+1100', issuelinks: [ [length]: 0 ], description: 'Test issue to be moved.', aggregatetimeoriginalestimate: null, comment: { startAt: 0, maxResults: 0, total: 0, comments: [ [length]: 0 ] }, votes: { self: 'http://localhost:2990/jira/rest/api/2/issue/DEMO-7/votes', votes: 0, hasVoted: false }, environment: null, resolution: null, aggregatetimespent: null, status: { self: 'http://localhost:2990/jira/rest/api/2/status/10002', description: '', iconUrl: 'http://localhost:2990/jira/images/icons/statuses/open.png', name: 'To Do', id: '10002', statusCategory: { self: 'http://localhost:2990/jira/rest/api/2/statuscategory/1', id: 1, key: 'undefined', colorName: 'medium-gray', name: 'No Category' } }, aggregateprogress: { progress: 0, total: 0 }, timespent: null } }, changelog: { id: '10000', items: [ { field: 'Project', fieldtype: 'jira', from: '10100', fromString: 'Test Project', to: '10000', toString: 'Demonstration Project' }, { field: 'Key', fieldtype: 'jira', from: null, fromString: 'TP-2', to: null, toString: 'DEMO-7' }, { field: 'Workflow', fieldtype: 'jira', from: '10101', fromString: 'TP: Software Development Workflow', to: '10102', toString: 'jira' }, { field: 'status', fieldtype: 'jira', from: '10002', fromString: 'To Do', to: '1', toString: 'Open' }, [length]: 4 ] }, timestamp: 1413847868537 } POST /jira-issue_updated?user_id=admin&user_key=admin 204 9ms jira:issue_deleted { webhookEvent: 'jira:issue_deleted', user: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, issue: { id: '10100', self: 'http://localhost:2990/jira/rest/api/2/issue/10100', key: 'TP-1', fields: { versions: [ [length]: 0 ], duedate: null, aggregatetimeestimate: null, issuetype: { self: 'http://localhost:2990/jira/rest/api/2/issuetype/1', id: '1', description: 'A problem which impairs or prevents the functions of the product.', iconUrl: 'http://localhost:2990/jira/images/icons/issuetypes/bug.png', name: 'Bug', subtask: false }, timetracking: {}, lastViewed: '2014-10-21T10:31:59.434+1100', watches: { self: 'http://localhost:2990/jira/rest/api/2/issue/TP-1/watchers', watchCount: 1, isWatching: true }, summary: 'Test Issue To Be Deleted', timeoriginalestimate: null, worklog: { startAt: 0, maxResults: 20, total: 0, worklogs: [ [length]: 0 ] }, creator: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, created: '2014-10-21T10:30:07.073+1100', labels: [ [length]: 0 ], priority: { self: 'http://localhost:2990/jira/rest/api/2/priority/3', iconUrl: 'http://localhost:2990/jira/images/icons/priorities/major.png', name: 'Major', id: '3' }, subtasks: [ [length]: 0 ], reporter: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, progress: { progress: 0, total: 0 }, fixVersions: [ [length]: 0 ], attachment: [ [length]: 0 ], timeestimate: null, resolutiondate: null, project: { self: 'http://localhost:2990/jira/rest/api/2/project/10100', id: '10100', key: 'TP', name: 'Test Project', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/projectavatar?size=medium&pid=10100&avatarId=10011', '16x16': 'http://localhost:2990/jira/secure/projectavatar?size=xsmall&pid=10100&avatarId=10011', '48x48': 'http://localhost:2990/jira/secure/projectavatar?pid=10100&avatarId=10011', '24x24': 'http://localhost:2990/jira/secure/projectavatar?size=small&pid=10100&avatarId=10011' } }, workratio: -1, assignee: { self: 'http://localhost:2990/jira/rest/api/2/user?username=admin', name: 'admin', emailAddress: 'rmassaioli@atlassian.com', avatarUrls: { '32x32': 'http://localhost:2990/jira/secure/useravatar?size=medium&avatarId=10122', '16x16': 'http://localhost:2990/jira/secure/useravatar?size=xsmall&avatarId=10122', '48x48': 'http://localhost:2990/jira/secure/useravatar?avatarId=10122', '24x24': 'http://localhost:2990/jira/secure/useravatar?size=small&avatarId=10122' }, displayName: 'admin', active: true }, components: [ [length]: 0 ], updated: '2014-10-21T10:30:07.073+1100', issuelinks: [ [length]: 0 ], description: 'Test issue to be deleted.', aggregatetimeoriginalestimate: null, comment: { startAt: 0, maxResults: 0, total: 0, comments: [ [length]: 0 ] }, votes: { self: 'http://localhost:2990/jira/rest/api/2/issue/TP-1/votes', votes: 0, hasVoted: false }, environment: null, resolution: null, aggregatetimespent: null, status: { self: 'http://localhost:2990/jira/rest/api/2/status/10002', description: '', iconUrl: 'http://localhost:2990/jira/images/icons/statuses/open.png', name: 'To Do', id: '10002', statusCategory: { self: 'http://localhost:2990/jira/rest/api/2/statuscategory/1', id: 1, key: 'undefined', colorName: 'medium-gray', name: 'No Category' } }, aggregateprogress: { progress: 0, total: 0 }, timespent: null } }, timestamp: 1413847919438 } POST /jira-issue_deleted?user_id=admin&user_key=admin 204 8ms
Which clearly shows that an updated even is fired.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.