1
0

fix(project): duplicating a project should not create two backlog buckets

Resolves https://community.vikunja.io/t/when-duplicating-a-project-the-resulting-project-has-an-extra-bucket/1524
This commit is contained in:
kolaente
2023-08-23 16:19:42 +02:00
parent acb03c430e
commit 5e8084c194
4 changed files with 24 additions and 11 deletions

View File

@ -81,7 +81,7 @@ func (pd *ProjectDuplicate) Create(s *xorm.Session, doer web.Auth) (err error) {
pd.Project.ParentProjectID = pd.ParentProjectID
// Set the owner to the current user
pd.Project.OwnerID = doer.GetID()
if err := CreateProject(s, pd.Project, doer); err != nil {
if err := CreateProject(s, pd.Project, doer, false); err != nil {
// If there is no available unique project identifier, just reset it.
if IsErrProjectIdentifierIsNotUnique(err) {
pd.Project.Identifier = ""