Overwrite existing parent on --add-sub-issue
A sub-issue can have only one parent, so when --add-sub-issue is given a candidate that already belongs to another parent the addSubIssue mutation 422s with "Sub issue may only have one parent". Pass replaceParent: true on this path so the take-over is silent.
This commit is contained in:
parent
6106bd3076
commit
dbe8e34121
2 changed files with 3 additions and 3 deletions
|
|
@ -1039,7 +1039,7 @@ func Test_editRun(t *testing.T) {
|
|||
httpmock.GraphQLMutation(`{ "data": { "addSubIssue": { "issue": { "id": "100" } } } }`,
|
||||
func(inputs map[string]interface{}) {
|
||||
assert.Equal(t, "100", inputs["issueId"])
|
||||
assert.Equal(t, false, inputs["replaceParent"])
|
||||
assert.Equal(t, true, inputs["replaceParent"])
|
||||
}),
|
||||
)
|
||||
reg.Register(
|
||||
|
|
@ -1049,7 +1049,7 @@ func Test_editRun(t *testing.T) {
|
|||
httpmock.GraphQLMutation(`{ "data": { "addSubIssue": { "issue": { "id": "100" } } } }`,
|
||||
func(inputs map[string]interface{}) {
|
||||
assert.Equal(t, "100", inputs["issueId"])
|
||||
assert.Equal(t, false, inputs["replaceParent"])
|
||||
assert.Equal(t, true, inputs["replaceParent"])
|
||||
}),
|
||||
)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue