Problem Definition
When creating branches via the REST API, "Clean up branch automatically" is not enabled in the plan's Branch Details configuration. There is no other endpoint available to do this, so this option must be enabled by hand
Suggested Solution
Allow this option to be specified as an additional parameter in the API call, e.g.:
http://localhost:8085/rest/api/latest/plan/PROJ-PLAN/branch/BranchName?vcsBranch="/refs/heads/myBranch&cleanup=true
Alternatively, Change the defaults for API created branches to enable "Clean up branch automatically" by default
Workaround
None