Kanban Card Annotations
Feature Request¶
- Github Issue: Add the ability to set notes in Cards from the API
Description¶
The User should be able to add or edit notes for a Kanban Card from the API. This capability should later be exposed in the UI.
Specification¶
- The Kanban Card should have a
notesfield of size8192characters that can be null. - The
notesfield should be initialized when the Kanban Card is created with the firstnon-nullvalue of the following:- The
notesfield of theKanbanCardInputprovided in the API request. - The
cardNotesDefaultfield of theItemidentified by theItemReferenceof the Kanban Card Input. - The
notesfield of theItemidentified by theItemReferenceof the Kanban Card Input.
If none of the above values arenon-null, thenotesfield should be initialized tonull.
- The
- The
notesfield should be updated when the Kanban Card is updated with the value of thenotesfield of theKanbanCardInputprovided in the API request. - A specific endpoint should be added to the Kanban Card API Endpoint to update the
notesfield of the Kanban Card without updating any other field of the Kanban Card.
Implementation¶
API Layer (HomeEndpoint.kt, Model.kt):¶
- The
KanbanCardInputdata class now includes a notes field, allowing clients to provide notes when creating a new card. - The
toEntityfunction (previously toItem) has been updated to map this new notes field to the KanbanCard.Entity.
Service Layer (KanbanCardService.kt, LifecycleImpl.kt, PrintLifecycleImpl.kt, ServiceImpl.kt):¶
- The newCard function signature in KanbanCardService has been modified to accept a KanbanCard payload directly, simplifying the creation process.
- The
LifecycleImplandPrintLifecycleImplhave been updated to correctly handle the new notes field when card states are updated. - The main
ServiceImplnow populates the notes field when creating a new card, either from the provided payload or by using the default notes from the associated item.
Business Logic (KanbanCard.kt, KanbanCardPrinter.kt):¶
- The
KanbanCardInfointerface and its implementations (KanbanCard.Entity,KanbanCardDetails) now include a notes property.
- The
KanbanCardPrinterclass has been updated to use the new notes field from the card. If the card’s notes are empty, it falls back to using the default notes from the item details, ensuring that a relevant note is always available for printing.
Persistence Layer (KanbanCardPersistence.kt):¶
- The
KANBAN_CARD_TABLEhas been updated with a new notes column, defined as a memo (long text) type. - The
KanbanCardRecordnow includes a notes property, and the persistence logic has been updated to save and retrieve this new field from the database. - Several fields have been updated to use more modern type definitions (naturalIdentifier, enumerated), improving type safety and consistency.
Database (V006__add_notes_field.sql):¶
- A new Flyway database migration has been added to create the notes column in the kanban_card table.
Other Changes¶
- The API Endpoint has been refactored to use the new
Endpoint DSLcapabilities ofcommon-module 6.0.0.
Tests:¶
- Unit and integration tests across the feature (
OrderFromCardsServiceTest.kt,KanbanCardPrinterTest.kt,KanbanUniverseTest.kt, etc.) have been updated to include the new notes field. ModuleTestupdated to new endpoint specification, KanbanCardEndpointTest checks the expected routes are there.
Copyright: © Arda Systems 2025-2026, All rights reserved