update board title when duplicated (#3011)

This commit is contained in:
Scott Bishel 2022-05-03 12:44:34 -06:00 committed by GitHub
parent f2a0cffce1
commit 24ff8d5d38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,6 +141,16 @@ func (s *SQLStore) duplicateBoard(db sq.BaseRunner, boardID string, userID strin
if err != nil {
return nil, nil, err
}
// todo: server localization
if asTemplate == board.IsTemplate {
// board -> board or template -> template
board.Title += " copy"
} else if asTemplate {
// template from board
board.Title = "New board template"
}
// make new board private
board.Type = "P"
board.IsTemplate = asTemplate