Title: Unlink epic from an issue · python-gitlab/python-gitlab · Discussion #3186 · GitHub
Open Graph Title: Unlink epic from an issue · python-gitlab/python-gitlab · Discussion #3186
X Title: Unlink epic from an issue · python-gitlab/python-gitlab · Discussion #3186
Description: Unlink epic from an issue
Open Graph Description: Hi, I was active on the gitlab-forum where someone asked how to unlink an epic from an issue. I wanted to help him out and wanted to say "just use python-gitlab instead of using raw api calls", but...
X Description: Hi, I was active on the gitlab-forum where someone asked how to unlink an epic from an issue. I wanted to help him out and wanted to say "just use python-gitlab instead of using raw api calls&...
Opengraph URL: https://github.com/python-gitlab/python-gitlab/discussions/3186
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Unlink epic from an issue","text":"Hi,
\nI was active on the gitlab-forum where someone asked how to unlink an epic from an issue.
\nI wanted to help him out and wanted to say \"just use python-gitlab instead of using raw api calls\", but I couldn't manage it either. The gitlabs docs (https://docs.gitlab.com/api/issues/#edit-an-issue) isn't specific about how to do it, either.
\n\nID of the epic to add the issue to. Valid values are greater than or equal to 0. Premium and Ultimate only.
\n
\nWhat I have tried so far:
\nissue = project.issues.get(1)\nissue.epic = None\nissue.epic_iid = None\nissue.save()
\nBut it doesn't change anything. So any idea? or maybe the REST-API doesn't support this? If I look inside gitlab-ui and network monitor from the browser, it uses GraphQL.
","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"I noticed I was in the wrong spot.
\nhttps://python-gitlab.readthedocs.io/en/stable/gl_objects/epics.html#epics-issues
\nfrom gitlab import Gitlab\n\ngl = Gitlab(\n url=\"<url>\",\n private_token=\"<token>\"\n)\n\ngroup = gl.groups.get(group_id)\nepic = group.epics.get(epic_id)\n\nfor issue in epic.issues.list(get_all=True):\n issue.delete()
\nworks flawless!
","upvoteCount":1,"url":"https://github.com/python-gitlab/python-gitlab/discussions/3186#discussioncomment-13025310"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:0c729443-8ae9-5d26-d128-e641c3e14b85 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | B1CC:635C3:130BFEC:19ED07E:6972A57F |
| html-safe-nonce | 14e6a755133d4e3905d63282662172c20f7bd0afeae41d8f7947ac2761e2c46a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUNDOjYzNUMzOjEzMEJGRUM6MTlFRDA3RTo2OTcyQTU3RiIsInZpc2l0b3JfaWQiOiI2MDYzODk2ODAxNzkyMTQwNjcxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 03cc1be275097dd8f17bf77d1820200dafba1e1d7d01db87c645d83a106cbfa5 |
| hovercard-subject-tag | discussion:8263370 |
| github-keyboard-shortcuts | repository,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/Voltron::DiscussionsFragmentsController/show/python-gitlab/python-gitlab/3186/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/a9db4b7e108d287701d1043d12d6a7e827d24047d3972d795ad4c01184ae842a/python-gitlab/python-gitlab/discussions/3186 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a9db4b7e108d287701d1043d12d6a7e827d24047d3972d795ad4c01184ae842a/python-gitlab/python-gitlab/discussions/3186 |
| og:image:alt | Hi, I was active on the gitlab-forum where someone asked how to unlink an epic from an issue. I wanted to help him out and wanted to say "just use python-gitlab instead of using raw api calls", but... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | ae357919e9cc5fb635a01c9a2cc530478d3ac85f55090215eb70e1beca3385ac |
| 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 | 625f1bd9f76a617a9c0729e2de91edb56b6ce42f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width