Title: Set miletone to an issue · Issue #612 · python-gitlab/python-gitlab · GitHub
Open Graph Title: Set miletone to an issue · Issue #612 · python-gitlab/python-gitlab
X Title: Set miletone to an issue · Issue #612 · python-gitlab/python-gitlab
Description: I'm not able to set the milestone to an issue: >>> import gitlab >>> gitlab.__version__ '1.3.0' >>> gl = gitlab.Gitlab('https://dev.domain.tld', 'xxx') >>> p = gl.projects.get(30) >>> i = p.issues.get(9364) >>> i.save() >>> i.milestone =...
Open Graph Description: I'm not able to set the milestone to an issue: >>> import gitlab >>> gitlab.__version__ '1.3.0' >>> gl = gitlab.Gitlab('https://dev.domain.tld', 'xxx') >>> p = gl.projects.get(30) >>> i = p.issues....
X Description: I'm not able to set the milestone to an issue: >>> import gitlab >>> gitlab.__version__ '1.3.0' >>> gl = gitlab.Gitlab('https://dev.domain.tld', '...
Opengraph URL: https://github.com/python-gitlab/python-gitlab/issues/612
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Set miletone to an issue","articleBody":"I'm not able to set the milestone to an issue:\r\n```\r\n\u003e\u003e\u003e import gitlab\r\n\u003e\u003e\u003e gitlab.__version__\r\n'1.3.0'\r\n\u003e\u003e\u003e gl = gitlab.Gitlab('https://dev.domain.tld', 'xxx')\r\n\u003e\u003e\u003e p = gl.projects.get(30)\r\n\u003e\u003e\u003e i = p.issues.get(9364)\r\n\u003e\u003e\u003e i.save()\r\n\u003e\u003e\u003e i.milestone = 1812\r\n\u003e\u003e\u003e i.save()\r\nTraceback (most recent call last):\r\n File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\r\n File \"/usr/lib/python2.7/dist-packages/gitlab/mixins.py\", line 312, in save\r\n server_data = self.manager.update(obj_id, updated_data, **kwargs)\r\n File \"/usr/lib/python2.7/dist-packages/gitlab/exceptions.py\", line 253, in wrapped_f\r\n raise error(e.error_message, e.response_code, e.response_body)\r\ngitlab.exceptions.GitlabUpdateError: 400: {\"error\":\"title, description, assignee_ids, assignee_id, milestone_id, discussion_locked, labels, created_at, due_date, confidential, state_event are missing, at least one parameter must be provided\"}\r\n```\r\n\r\n1812 is the milestone iid.\r\nI also tried with:\r\n\r\n```\r\n\u003e\u003e\u003e m = p.milestones.get(1812)\r\n\u003e\u003e\u003e m\r\n\u003cProjectMilestone id:1812\u003e\r\n\u003e\u003e\u003e i.milestone = m\r\n\u003e\u003e\u003e i.save()\r\nTraceback (most recent call last):\r\n File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\r\n File \"/usr/lib/python2.7/dist-packages/gitlab/mixins.py\", line 312, in save\r\n server_data = self.manager.update(obj_id, updated_data, **kwargs)\r\n File \"/usr/lib/python2.7/dist-packages/gitlab/exceptions.py\", line 251, in wrapped_f\r\n return f(*args, **kwargs)\r\n File \"/usr/lib/python2.7/dist-packages/gitlab/mixins.py\", line 227, in update\r\n return self.gitlab.http_put(path, post_data=data, **kwargs)\r\n File \"/usr/lib/python2.7/dist-packages/gitlab/__init__.py\", line 827, in http_put\r\n post_data=post_data, **kwargs)\r\n File \"/usr/lib/python2.7/dist-packages/gitlab/__init__.py\", line 685, in http_request\r\n prepped = self.session.prepare_request(req)\r\n File \"/usr/lib/python2.7/dist-packages/requests/sessions.py\", line 407, in prepare_request\r\n hooks=merge_hooks(request.hooks, self.hooks),\r\n File \"/usr/lib/python2.7/dist-packages/requests/models.py\", line 305, in prepare\r\n self.prepare_body(data, files, json)\r\n File \"/usr/lib/python2.7/dist-packages/requests/models.py\", line 445, in prepare_body\r\n body = complexjson.dumps(json)\r\n File \"/usr/lib/python2.7/json/__init__.py\", line 244, in dumps\r\n return _default_encoder.encode(obj)\r\n File \"/usr/lib/python2.7/json/encoder.py\", line 207, in encode\r\n chunks = self.iterencode(o, _one_shot=True)\r\n File \"/usr/lib/python2.7/json/encoder.py\", line 270, in iterencode\r\n return _iterencode(o, 0)\r\n File \"/usr/lib/python2.7/json/encoder.py\", line 184, in default\r\n raise TypeError(repr(o) + \" is not JSON serializable\")\r\nTypeError: \u003cProjectMilestone id:1812\u003e is not JSON serializable\r\n```\r\n\r\n - python-gitlab version: 1.3.0\r\n - API version you are using (v3/v4): V4\r\n - Gitlab server version (or gitlab.com): 11.3.4\r\n","author":{"url":"https://github.com/yann-l","@type":"Person","name":"yann-l"},"datePublished":"2018-10-13T20:00:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/612/python-gitlab/issues/612"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:66dae9c9-9459-7cc5-784f-a83f5fe1bdff |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EAEC:1FE9E1:558F2B:785199:6977901C |
| html-safe-nonce | 9550a9e37b62c56a8f3bcd4e643c79f4d2b5ccb83ee12adc7ff03b314a9fc22a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUVDOjFGRTlFMTo1NThGMkI6Nzg1MTk5OjY5Nzc5MDFDIiwidmlzaXRvcl9pZCI6IjYzMDAxODMyOTgwMDU1MDQwMjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 75ebd82327cb61c6e7feee72d4b1fd2a8aeb21ca7c31d242c379aaca7aa41c62 |
| hovercard-subject-tag | issue:369835966 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-gitlab/python-gitlab/612/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7cec6c0070ee4b4bbc7bcaff17bce799641834b9d78ba86d7c1b2f02fc0060b1/python-gitlab/python-gitlab/issues/612 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7cec6c0070ee4b4bbc7bcaff17bce799641834b9d78ba86d7c1b2f02fc0060b1/python-gitlab/python-gitlab/issues/612 |
| og:image:alt | I'm not able to set the milestone to an issue: >>> import gitlab >>> gitlab.__version__ '1.3.0' >>> gl = gitlab.Gitlab('https://dev.domain.tld', 'xxx') >>> p = gl.projects.get(30) >>> i = p.issues.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yann-l |
| hostname | github.com |
| expected-hostname | github.com |
| None | fd37f8e74ecc49b700617ea694fa6d7b395b6c9a4b79c59b3014da220462ac69 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-gitlab/python-gitlab git https://github.com/python-gitlab/python-gitlab.git |
| octolytics-dimension-user_id | 28886265 |
| octolytics-dimension-user_login | python-gitlab |
| octolytics-dimension-repository_id | 8077625 |
| octolytics-dimension-repository_nwo | python-gitlab/python-gitlab |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 8077625 |
| octolytics-dimension-repository_network_root_nwo | python-gitlab/python-gitlab |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | acb9f387e67b45e2eeb6a57ef561ec67eb21d805 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width