{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/gerrit-trigger-plugin/issues/195","labels_url":"https://api.github.com/repos/jenkinsci/gerrit-trigger-plugin/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/gerrit-trigger-plugin/issues/195/comments","events_url":"https://api.github.com/repos/jenkinsci/gerrit-trigger-plugin/issues/195/events","html_url":"https://github.com/jenkinsci/gerrit-trigger-plugin/pull/195","id":53657527,"number":195,"title":"[JENKINS-26323] Fix \"Build Current Patches Only\" by scanning for event","user":{"login":"HedAurabesh","id":2064408,"avatar_url":"https://avatars.githubusercontent.com/u/2064408?v=3","gravatar_id":"","url":"https://api.github.com/users/HedAurabesh","html_url":"https://github.com/HedAurabesh","followers_url":"https://api.github.com/users/HedAurabesh/followers","following_url":"https://api.github.com/users/HedAurabesh/following{/other_user}","gists_url":"https://api.github.com/users/HedAurabesh/gists{/gist_id}","starred_url":"https://api.github.com/users/HedAurabesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HedAurabesh/subscriptions","organizations_url":"https://api.github.com/users/HedAurabesh/orgs","repos_url":"https://api.github.com/users/HedAurabesh/repos","events_url":"https://api.github.com/users/HedAurabesh/events{/privacy}","received_events_url":"https://api.github.com/users/HedAurabesh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-07T17:24:01Z","updated_at":"2015-01-08T01:46:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/gerrit-trigger-plugin/pulls/195","html_url":"https://github.com/jenkinsci/gerrit-trigger-plugin/pull/195","diff_url":"https://github.com/jenkinsci/gerrit-trigger-plugin/pull/195.diff","patch_url":"https://github.com/jenkinsci/gerrit-trigger-plugin/pull/195.patch"},"body":"The \"Build Current Patches Only\" feature currently identifies previous\r\nbuilds based on their parameters as they were present when the build was\r\nfirst scheduled.\r\n\r\nIf you use a plugin that alters the parameters after the job has started,\r\nthe cancelling of previous builds does not work, since the\r\nGerritTrigger#cancelJob() method does not find the job anymore.\r\n\r\nThis is easily and trivially fixed, by not scanning for the parameters, but\r\ninstead for the GerritEvent that is stored in the GerritCause used to start\r\na build.\r\n\r\nThe only downside to this is, that the current patch-set scans for identity,\r\nbut not equality of the two events. After a Jenkins restart, they might not\r\nbe identical anymore, since Jenkins reschedules queued builds and can't\r\nunify the two events via Stapler; as they are stored in separate files.\r\n\r\nIt'd be trivially easy to alter this to Event.equals(otherEvent), in case\r\nthis degradation is not wanted.\r\n\r\n[EDIT]\r\nDuplicate of pull request #194. That one was aborted, since it targeted an outdated release tag."},"comment":{"url":"https://api.github.com/repos/jenkinsci/gerrit-trigger-plugin/issues/comments/69124194","html_url":"https://github.com/jenkinsci/gerrit-trigger-plugin/pull/195#issuecomment-69124194","issue_url":"https://api.github.com/repos/jenkinsci/gerrit-trigger-plugin/issues/195","id":69124194,"user":{"login":"rinrinne","id":44791,"avatar_url":"https://avatars.githubusercontent.com/u/44791?v=3","gravatar_id":"","url":"https://api.github.com/users/rinrinne","html_url":"https://github.com/rinrinne","followers_url":"https://api.github.com/users/rinrinne/followers","following_url":"https://api.github.com/users/rinrinne/following{/other_user}","gists_url":"https://api.github.com/users/rinrinne/gists{/gist_id}","starred_url":"https://api.github.com/users/rinrinne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rinrinne/subscriptions","organizations_url":"https://api.github.com/users/rinrinne/orgs","repos_url":"https://api.github.com/users/rinrinne/repos","events_url":"https://api.github.com/users/rinrinne/events{/privacy}","received_events_url":"https://api.github.com/users/rinrinne/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T01:46:31Z","updated_at":"2015-01-08T01:46:31Z","body":"Did you test with manual trigger?"}}