-
Root Cause
BranchService.createBranch()persists the branch entity to the DB but does not callSztabinaClientto create the corresponding git ref. The Sztabina client likely already has or needs acreateBranch(projectName, branchName, parentBranchName)endpoint.Fix
Backend —
BranchServiceImpl.createBranch()After persisting the branch to the DB, call Sztabina to create the git ref:
sztabinaClient.createBranch( project.getName(), branch.getName(), branch.getParent().getName() );Sztabina — if endpoint does not exist
Add a
POST /repos/{name}/branchesendpoint that creates a git branch from a given parent ref using JGit or native git.Error handling
If Sztabina branch creation fails, roll back the DB record and surface a clear error to the user. Do not leave a DB branch record without a corresponding git branch.
Related
- SZ-136 — PR creation form error message misleading when no commits exist
- SZ-121 — Visual branch display (BranchTreeView parentId bug)
Notes
This defect applies to LOCAL (Sztabina-hosted) projects only. EXTERNAL projects manage their own git branches independently.
-
rksuma@Ramakrishnans-MacBook-Pro sztab % git status On branch release/1.10.0 Your branch is up to date with 'origin/release/1.10.0'. nothing to commit, working tree clean rksuma@Ramakrishnans-MacBook-Pro sztab % git checkout -b fix/SZ-128-Branch-creation-via-UI-does-not-create-git-branch Switched to a new branch 'fix/SZ-128-Branch-creation-via-UI-does-not-create-git-branch' rksuma@Ramakrishnans-MacBook-Pro sztab %
| Type |
Bug
|
| Priority |
Major
|
| Assignee | |
| Version |
1.10.0
|
| Sprints |
n/a
|
| Customer |
n/a
|
Issue Votes (0)
Summary
Creating a branch via the Sztab UI creates a database record only. The corresponding git branch is not created in Sztabina. This breaks the PR creation flow — the PR form queries Sztabina for branches and finds none, showing "No branches found. Check git repository configuration." Users have no indication that a manual git push is required.
Severity
Blocker
Estimated Fix Time
3 hours
Steps to Reproduce
Expected Behavior
When a user creates a branch via the Sztab UI, Sztab should:
This is the standard behavior in GitHub, GitLab, and Gitea — "Create Branch" means the branch exists in git immediately.
Actual Behavior
Branch creation only creates a DB record. Sztabina has no corresponding git branch. The branch is not pushable via
git checkout <branch>on a fresh clone. PR creation form cannot find the branch.