You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nothing happens when I click "Merge requests" on parent plan. Error in browser console.
Reproduction
Create plan branch 1
Create plan branch 2
Open merge request from branch 1
Open merge request from branch 2
Delete plan branch 1
Cannot open merge requests for parent plan
Logs
modal.BPpzJHMj.js:300 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'name')
at rW (modal.BPpzJHMj.js:300:54011)
at dS (modal.BPpzJHMj.js:300:56680)
at Array.sW (modal.BPpzJHMj.js:300:53048)
at Array.uW (modal.BPpzJHMj.js:300:58985)
at bt (scheduler.lIypvzst.js:1:938)
at sR (modal.BPpzJHMj.js:7:3430)
at Ct (index.DQ35HaIj.js:4:2972)
at new Bi (modal.BPpzJHMj.js:7:4042)
at Array.dW (modal.BPpzJHMj.js:300:64696)
at bt (scheduler.lIypvzst.js:1:938)
Error line from decompiled code in browser:
`plan_snapshot_supplying_changes.plan` is `null`functionrW(t) {
let e = t[31].plan_snapshot_supplying_changes.plan.name + "", i;return {
c() {
i = Fe(e)
},
l(s) {
i = Oe(s, e)
},
m(s, n) {
G(s, i, n)
},
p(s, n) {
n[0] & 256 && e !== (e = s[31].plan_snapshot_supplying_changes.plan.name + "") && it(i, e)
},
### System Info
```shell
Chrome
Severity
Major
The text was updated successfully, but these errors were encountered:
Thanks @parkerabercrombie - I met with the devs and we understand the issue, and @AaronPlave is working on a code fix. To summarize, if a branched plan is/was a part of a merge request, the UI is not tolerant to that plan being deleted even though deletion is allowed, & deleting it will cause the "merge requests" modal UI to break on any other plans that would show the deleted plan as part of its merge history - even if the merge is accepted/completed.
For workarounds until the code fix can be taken, from lowest impact/risk to highest:
Avoid deleting branch plans that have been merge requested, regardless of whether they were accepted. This will stop the issue from reoccurring but doesn't fix existing plans that are in this state.
For plans that have this issue - the "merge requests" UI is inaccessible but you should still be able to start a merge request successfully by making an API call - here are the docs for doing merge requests via API
Another way to fix the UI for these plans is to remove the problematic merge request records from the merge_request table (specifically, requests where the snapshot_id_supplying_changes has a nullplan_id). However, note that this is a destructive change - the plan itself won't be modified, but you will lose the record of the past merge in the merge requests list.
Finally, if you need to get the "merge request" modal UI working again for these plans and you need to preserve their merge request history, the only option may be to perform some "database surgery" which would require direct SQL admin access. Specifically, we could insert some "fake plans"/make new branches of the plan, and then manually update the plan snapshots specified by snapshot_id_supplying_changes to point to these new plans instead of null, which would give them some data to display in the UI and fix the issue. This carries some risk (modifying production data) but we could rehearse in a local environment and give you specific instructions if needed.
Checked for duplicates
No - I haven't checked
Is this a regression?
No - This is a new bug
Version
2.11.2
Describe the bug
Nothing happens when I click "Merge requests" on parent plan. Error in browser console.
Reproduction
Logs
Severity
Major
The text was updated successfully, but these errors were encountered: