Bug 513495

Summary: Cannot modify task dependency type or lag
Product: [Applications] calligraplan Reporter: Fabian Kislat <fabian.kislat>
Component: usabilityAssignee: Dag Andersen <dag.andersen>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Fabian Kislat 2025-12-17 17:20:23 UTC
SUMMARY
After editing the type or lag of a task dependency, the change is never applied.

STEPS TO REPRODUCE
1. Create two tasks.
2. Create a dependency between the tasks using the "Link" button.
3. Click "OK" to close the dependency editor.
4. Click "Link" again to reopen the dependency editor.
5. Change the dependency type and lag of the previously created dependency.
6. Close the editor with "OK".
7. Reopen the dependency editor to check the dependency type and lag.

OBSERVED RESULT
The dependency type and lag remain the same as those selected when initially creating the link.

EXPECTED RESULT
The dependency type and lag are changed to the values selected in step 5.

SOFTWARE/OS VERSIONS
All, running a version cloned from git a few days ago.

ADDITIONAL INFORMATION
I think I tracked down the problem in the source code. The logic in lines 409 and 412 of calligraplan/src/libs/ui/RelationEditorDialog.cpp is incorrect. As it is, a ModifyRelationTypeCmd or ModifyRelationLagCmd are created when there is no change instead of when there is one. Solution: change == to != in both if-statement. Applying this change fixed it for me.
See: https://github.com/KDE/calligraplan/blob/8bf7f73431fdd8640ab92b7081c9c8496e10ebcc/src/libs/ui/RelationEditorDialog.cpp#L409
Comment 1 Albert Astals Cid 2025-12-17 22:13:50 UTC
Git commit 6962c1ee06a18b64cc32bb5742fcf42fef69025c by Albert Astals Cid, on behalf of Fabian Kislat.
Committed on 17/12/2025 at 22:13.
Pushed by aacid into branch 'master'.

Allow deleting links between tasks. Ensure changes to link type and lag are applied.
Related: bug 513499

M  +4    -4    src/libs/ui/RelationEditorDialog.cpp

https://invent.kde.org/office/calligraplan/-/commit/6962c1ee06a18b64cc32bb5742fcf42fef69025c