Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata on AbstractDataItems #112

Open
co-stig opened this issue Jan 30, 2025 · 0 comments
Open

Metadata on AbstractDataItems #112

co-stig opened this issue Jan 30, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@co-stig
Copy link
Contributor

co-stig commented Jan 30, 2025

Metadata can be a JSON object, which we might want to attach to any data item object.

Example use cases:

  • Integration with external systems like GitHub, e.g. storing repo name on a backlog and issue ID on a workitem
  • Taking notes on workitems
  • Recording pomodoro interruptions
  • Grouping workitems by priority or importance
  • Scheduling workitems
  • More powerful tags

The simplest way would be to use PATCH semantics, i.e. using null values to delete keys. This means a single PatchMetadata strategy should be sufficient:

CreateWorkitem("66071b8e-ae7a-4e33-a51f-170881aa67e4", "3269262a-3f60-4f48-92fd-19949515945e", "Do something")
PatchMetadata("workitem", "66071b8e-ae7a-4e33-a51f-170881aa67e4", "{\"github-id\": \"101\"}")
PatchMetadata("workitem", "66071b8e-ae7a-4e33-a51f-170881aa67e4", "{\"notes\": \"See https://example.com\"}")
PatchMetadata("workitem", "66071b8e-ae7a-4e33-a51f-170881aa67e4", "{\"notes\": null}")
PatchMetadata("workitem", "66071b8e-ae7a-4e33-a51f-170881aa67e4", "{\"github-id\": null}")

The size of such JSONs shouldn't grow too much to stay efficient. For example, we probably shouldn't use it for implementing habit trackers, for example.

@co-stig co-stig added the enhancement New feature or request label Jan 30, 2025
@co-stig co-stig modified the milestone: v0.10.0 Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant