simplified card tracking

This commit is contained in:
Vivek Ganesan 2025-01-15 17:03:59 +05:30 committed by GitHub
parent 72325d5ba6
commit 4775c6b3c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

35
100.md
View File

@ -30,11 +30,10 @@ Kanban boards are a popular project management tool that enables visual organiza
["description","Board Description"], //can contain markdown too
["alt","A board to track my work"], //Human-readable plaintext summary to be shown in non-supporting clients - as per NIP-31
// List of all columns in the board below in format ["col","col-id","name","order",<<csv of card statuses that need to be displayed in the column>>]
// If the last element in the 'col' tag is not defined, it is assumed that column will display those cards (see event below) whose 's' tags EXACTLY the column name
// List of all columns in the board below in format ["col","col-id","name","order"]
["col", "col1-id", "To Do", "0"],
["col", "col2-id", "In Progress", "1"],
["col", "col3-id", "Done", "2","Done, Completed, Finished"],
["col", "col3-id", "Done", "2"],
// Clients may designate a 'maintainers' list who can add/edit cards in this board
[ "p", "82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2" ],
@ -72,10 +71,9 @@ Editing the board event is possible only by the creator of the board.
[ "p", "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52"],
[ "p", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c"],
// The list of boards this card will be a part of.
// However, the card will be displayed on a board only when this event's pubkey matches an entry in the board's maintainers list
["a", "30301:<board-1-creator-pubkey>:<board-1-d-identifier>", "<optional-relay-url>"],
["a", "30301:<board-2-creator-pubkey>:<board-2-d-identifier>", "<optional-relay-url>"],
// The board this card will be a part of.
["a", "30301:<board-creator-pubkey>:<board-d-identifier>", "<optional-relay-url>"],
],
// other fields...
}
@ -94,13 +92,28 @@ In case one wants to just track another nostr event (like a tracker card, withou
"created_at": 34324234234, //<Unix timestamp in seconds>
"kind": 30302,
"tags": [
["d", "<card-d-identifier>"],
["d", "<new-tracker-card-d-identifier>"],
["k", "1"], //this one tracks a text note
["e", "<event-id>", "<relay-url>"] // as per NIP-10
// other fields as per card event above...
],
}
```
In case of tracking a replaceable event, one can use `a` tag instead of the `e` tag above.
In case of tracking another Kanban card (30302) event, one cannot use 'a' tag as that is already used for board association. Hence, we use tags similar to git issues (NIP-34)
```javascript
{
"created_at": 34324234234, //<Unix timestamp in seconds>
"kind": 30302,
"tags": [
["d", "<new-tracker-card-d-identifier>"],
["k", "30302"], //this one tracks a text note
["refs/board", "30301:<target-board-creator-pubkey>:<target-board-d-identifier>"], // very much like git issues
["refs/card", "<tracked-card-d-identifier>"
],
}
```
The clients MAY display this tracker card like they display the tracked event, or using the 'alt' tag of the original event if not supported.
@ -112,7 +125,7 @@ In case of tracked card, its status is deemed to be the `s` tag value of the eve
This allows the automatic movement of a card (like a Git issue) across different columns as the card's status changes in the source system, without any manual updates in the board.
If the tracked event does not have an `s` tag, then tracker card event's `s` tag is the status of the card.
If the tracked event does not have an `s` tag, then tracker card event's `s` tag is shown as the status of the card.
### Event Kinds
@ -128,7 +141,7 @@ If the tracked event does not have an `s` tag, then tracker card event's `s` tag
#### Card Events (kind: 30302)
- `d`: Unique identifier for the card
- `title`: Card title
- `a`: At least one. This points to the board that this card belongs to
- `a`: This points to the board that this card belongs to
### Access Control
@ -178,6 +191,6 @@ To maintain a consistent board state:
// Subscribe to the cards of a board
{
"kinds": [30302],
"#a": ["30301:<board-creator-pubkey>:<board-d-identifier>",...]
"#a": ["30301:<board-creator-pubkey>:<board-d-identifier>"]
}
```