{"action":"opened","issue":{"url":"https://api.github.com/repos/jenkinsci/jira-steps-plugin/issues/3","repository_url":"https://api.github.com/repos/jenkinsci/jira-steps-plugin","labels_url":"https://api.github.com/repos/jenkinsci/jira-steps-plugin/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/jira-steps-plugin/issues/3/comments","events_url":"https://api.github.com/repos/jenkinsci/jira-steps-plugin/issues/3/events","html_url":"https://github.com/jenkinsci/jira-steps-plugin/issues/3","id":211569268,"number":3,"title":"Error editing issue with existing fix version","user":{"login":"nrayapati","id":4974191,"avatar_url":"https://avatars3.githubusercontent.com/u/4974191?v=3","gravatar_id":"","url":"https://api.github.com/users/nrayapati","html_url":"https://github.com/nrayapati","followers_url":"https://api.github.com/users/nrayapati/followers","following_url":"https://api.github.com/users/nrayapati/following{/other_user}","gists_url":"https://api.github.com/users/nrayapati/gists{/gist_id}","starred_url":"https://api.github.com/users/nrayapati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrayapati/subscriptions","organizations_url":"https://api.github.com/users/nrayapati/orgs","repos_url":"https://api.github.com/users/nrayapati/repos","events_url":"https://api.github.com/users/nrayapati/events{/privacy}","received_events_url":"https://api.github.com/users/nrayapati/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-03T01:25:42Z","updated_at":"2017-03-03T01:25:42Z","closed_at":null,"body":"There are few issues with `jiraEditIssue` step in the below example: \r\n\r\n```groovy\r\nnode {\r\n  stage('Edit Issues') {\r\n    def searchResults = jiraJqlSearch jql: \"project = TEST AND issuekey = 'TEST-1'\"\r\n    def issues = searchResults.data.issues\r\n    for (i = 0; i <issues.size(); i++) {\r\n      def result = jiraGetIssue idOrKey: issues[i].key\r\n      def newVersion = jiraNewVersion version: [name: \"new-fix-version-1.0\",\r\n                                                project: \"TEST\"]\r\n      def fixVersions = result.data.fields.fixVersions << newVersion.data\r\n      def testIssue = [fields: [summary: \"Test Issue summary\",\r\n                                description: \"Test description\",\r\n                                project: [id : 10000],\r\n                                issuetype: [id : 10000],\r\n                                fixVersions: fixVersions]]\r\n      response = jiraEditIssue idOrKey: issues[i].key, issue: testIssue\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nError while executing above:\r\n```groovy\r\nError Message: {\"errorMessages\":[],\"errors\":{\"fixVersions\":\"expected 'id' property to be a string\"}}\r\n```\r\n\r\n1. Need to fix above error.\r\n2. `testIssue` variable above really doesn't require other fields than just fixversions.\r\n3. meta is being appended every time we update the same issue. \r\n4. Also documentation needs an update."}}
{"actor":{"display_login":"nrayapati"}}