fix(kanban-group): update section name handling in status update
- Removed unused section name generation and replaced it with trimmed name input for better consistency. - Ensured that the updated name is set correctly after a successful status update, improving data integrity.
This commit is contained in:
@@ -108,9 +108,9 @@ const KanbanGroup: React.FC<KanbanGroupProps> = memo(({
|
||||
|
||||
const updateStatus = async (category = group.category_id ?? null) => {
|
||||
if (!category || !projectId || !group.id) return;
|
||||
const sectionName = getUniqueSectionName(name);
|
||||
// const sectionName = getUniqueSectionName(name);
|
||||
const body: ITaskStatusUpdateModel = {
|
||||
name: sectionName,
|
||||
name: name.trim(),
|
||||
project_id: projectId,
|
||||
category_id: category,
|
||||
};
|
||||
@@ -118,7 +118,7 @@ const KanbanGroup: React.FC<KanbanGroupProps> = memo(({
|
||||
if (res.done) {
|
||||
dispatch(fetchEnhancedKanbanGroups(projectId));
|
||||
dispatch(fetchStatuses(projectId));
|
||||
setName(sectionName);
|
||||
setName(name.trim());
|
||||
} else {
|
||||
setName(editName);
|
||||
logger.error('Error updating status', res.message);
|
||||
|
||||
Reference in New Issue
Block a user