Conversation
|
@JoanJaraBosch Please resolve the conflicts let me know when the PR is ready for review ✌️ |
|
hi @Valentin-v-Todorov conflicts resolved |
|
Hello @JoanJaraBosch Thanks for implementing the archive functionality. The core features should working as expected, but there are some issues that need to be addressed before we can merge: 🔴 : There is a bug in unarchive command. I think that currently creates a new task instead of restoring the original. Instead of storage.add_task(...), directly restore the task object to preserve its original ID and metadata. The archived field was added to Task model but isn't being used. Since you're using separate storage (archived.json), please remove the archived field from the Task model to avoid confusion 🟡 : 🟢 : ✓ tix archive command properly soft-deletes tasks Once these issues are resolved, ping me to review. The core functionality looks good - we just need to clean up the code quality issues. Overall good job ! ✌️ |
|
hello @Valentin-v-Todorov I am a bit sleepy, but I think it is ok now. If not tell me |
|
Thank you @JoanJaraBosch for working on the archive functionality. I do appreciate it! While the core concept is good, there are still critical issues that will break the tool if merged. File: tix/cli.py File: tix/models.py Remove all duplicate command implementations. Each command should appear only once. The ArchiveStorage class looks good and the archive concept is solid. However, the code duplication and broken implementations will cause the tool to fail completely. Please fix these issues and push an updated version. Once cleaned up, this will be a valuable addition to TIX. |
|
Hi @Valentin-v-Todorov tell me if it is okay now |
|
Hey @JoanJaraBosch, thanks for the continued work on this. I can see you've made progress, but there are still some critical issues that will break the tool if merged. File: tix/cli.py: Line 1 has a broken import - from tix.utils import get_date but later at line 12 you import it again. You need to remove the duplicate import on line 1 and keep only the one at line 12. Lines 414-435 have duplicate code for handling attachments and due dates in the edit command. The attachment handling code appears twice with the second block starting at line 464. You need to remove one of these duplicate blocks completely. Lines 536-551 in the priority command have the same logic written twice - setting old_priority, updating the task, and printing the result. Remove the duplicate lines 546-551. Lines 638-680 in the move command contain duplicate implementations. The logic for moving tasks is written twice with slightly different approaches. Keep only one implementation and remove the other. Line 27 creates a global cli variable with cli = click.Group() but then line 31 redefines it as a function with the @click.group() decorator. This will cause a conflict. Remove line 27 completely. The unarchive command at lines 1179-1198 looks correct now and properly uses storage.save_tasks() to restore tasks, which is good. File: tix/models.py: Lines 16-17 have links field defined twice. Remove the duplicate on line 17. File: tix/storage/context_storage.py: This stub implementation is acceptable but very minimal. It won't actually persist context data. For now this is fine since it prevents import errors, but the functionality is limited. The archive functionality itself (ArchiveStorage class and the three archive commands) looks solid now. Once you clean up the duplicate code in cli.py and the duplicate field in models.py, this should be ready to merge. Please fix these issues and push an update. |
PR Checklist
What does this PR do?
Related Issue
Closes #65
Type of change