Taiga's blocked state is the card's Blocked flow field, both ways.

WeKan cards have a Blocked flow field with a reason, and the Taiga import
put is_blocked / blocked_note into a "Blocked" custom field, from before the
flow field existed. A normalized task may now carry blocked and
blocked_reason, which the shared import plan writes as the card's flow
field; the importer turns on Board Settings / Card's Blocked display for a
board with a blocked card, since flow fields are off until a board shows
them. Taiga uses it, and its export writes the card's Blocked flow field
(or the custom field of a board imported before) back to is_blocked and
blocked_note.

tests/taigaFormat.test.cjs pinned the custom field and now pins the flow
field, the board display and the export; tests/exportRoundTripFields.test.cjs
holds every format to whether it keeps Blocked.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu committed 2026-11-20 19:15:34 +02:00
1 parent 8ac7afe95f
commit ab884547f4
8 files changed
+55 -15

No files matched your search

+3 -2
View File
@@ -48,7 +48,7 @@ newest features against its parser and formatter.
- Kanban and project tools:
Planner, monday.com, Wrike, Teamwork, Businessmap,
Plane, Taiga, Focalboard, Nullboard, Kanri, Obsidian Kanban, MeisterTask,
Plane, Focalboard, Nullboard, Kanri, Obsidian Kanban, MeisterTask,
Quire, KanbanFlow, Basecamp - sub-items, dependencies, time
tracking, custom fields, comments, attachments and their newer views.
(Kanboard: its recurrence, estimate, score, reference and external links
@@ -57,7 +57,8 @@ newest features against its parser and formatter.
Asana: time tracking, html_notes, approval states and comment likes;
Zenkit: already reports what it does not read; Planka 2: custom fields and
the stopwatch; Notion: relations between rows are dependencies; ClickUp:
custom field columns both ways, and the task link.)
custom field columns both ways, and the task link; Taiga: blocked is the
card's Blocked flow field.)
- Issue trackers: Jira, GitHub, GitLab, Gitea, Forgejo, Redmine, Linear,
Pivotal - epics, sprints, versions and milestones, links between issues,
work logs, and fields added in their newest releases, checked against each
@@ -144,9 +144,10 @@ python3 api.py exportallboards taiga boards.zip
the board's Scrum estimate, in points.
- **Tags**: `tags_colors` give each label the nearest WeKan label color.
Older Taiga versions stored a tag as `[name, color]`; that color is used too.
- **Blocked** (with the blocked note), **Client requirement**, **Team
requirement**, **Due date reason** and **Iocaine** become custom fields of
those names.
- **Blocked**, with the blocked note as its reason, is the card's Blocked
flow field, and the imported board shows it (Board Settings / Card).
**Client requirement**, **Team requirement**, **Due date reason** and
**Iocaine** become custom fields of those names.
People become card members, assignees and watchers only when they are mapped
to WeKan users. The import page imports Taiga without member mapping, so
@@ -197,8 +198,10 @@ The export writes a dump with every key Taiga's exporter writes, in its order:
- Comments become history entries.
- Custom fields become custom attributes, typed number, checkbox or text.
- **Story points** become role points of one role, **Team**. The fields
Task status, Blocked, Client requirement, Team requirement, Due date reason
and Iocaine go back to Taiga's own fields.
Task status, Client requirement, Team requirement, Due date reason and
Iocaine go back to Taiga's own fields, and the card's Blocked flow field (or
a Blocked custom field of a board imported before) to `is_blocked` and
`blocked_note`.
- Scrum sprints with both a planned start and end become milestones. A closed
sprint is a closed milestone. A cancelled sprint is left out. A card's sprint
is its story's, task's or issue's milestone, and its backlog rank is the
@@ -232,7 +235,7 @@ The export writes a dump with every key Taiga's exporter writes, in its order:
| Issue | Card in the Issues swimlane, list per issue status |
| Issue type, priority, severity | `type:`, `priority:`, `severity:` labels |
| `generated_from_issue`, `generated_from_task` | Related link |
| `is_blocked`, `blocked_note` | Blocked custom field |
| `is_blocked`, `blocked_note` | The card's Blocked flow field, with its reason |
| `client_requirement`, `team_requirement` | Client requirement, Team requirement custom fields |
| `due_date_reason` | Due date reason custom field |
| `is_iocaine` | Iocaine custom field |
+6
View File
@@ -167,6 +167,12 @@ export class KanboardCreator {
boardToCreate.labels.push({ _id: Random.id(6), color: chosen, name });
}
// A blocked card's Blocked field is shown only where the board shows it
// (Board Settings / Card): on, when the import has a blocked card.
if (this._tasks(data).some(task => task && task.blocked === true)) {
boardToCreate.allowsBlockedOnCard = true;
boardToCreate.allowsBlockedOnMinicard = true;
}
const boardId = await Boards.direct.insertAsync(boardToCreate);
await Activities.direct.insertAsync({
activityType: 'importBoard',
+2
View File
@@ -171,6 +171,8 @@ async function collect(boardId, fields, format, pageCardIds, light) {
...(want('dependencies') && Array.isArray(c.cardDependencies) && c.cardDependencies.length ? {
dependencies: c.cardDependencies.filter(dep => dep && dep.cardId).map(dep => ({ cardId: dep.cardId, type: dep.type })),
} : {}),
// Blocked, with its reason, for formats with a blocked state (Taiga).
...(c.flow && c.flow.blocked ? { blocked: true, ...(c.flow.blockedReason ? { blockedReason: c.flow.blockedReason } : {}) } : {}),
// How the card repeats, for formats with a repeat rule (models/lib/recurrenceMap.js).
...(want('dates') && ['daily', 'weekly', 'monthly'].includes(c.recurrenceInterval) ? { recurrence: c.recurrenceInterval } : {}),
// Hours spent, for formats with a place for tracked time (Super Productivity).
+6
View File
@@ -15,6 +15,8 @@
// comments: [{ text, author, authorName, date }]
// watchers: [source user key] - who follows the item
// date_received - when it arrived (receivedAt)
// blocked, blocked_reason - the card's Blocked flow field
// (models/lib/cardFlow.js)
// recurrence - 'daily', 'weekly' or 'monthly'
// (models/lib/recurrenceMap.js)
// email: { direction, from: { name, address }, to: [address], cc: [address],
@@ -199,6 +201,10 @@ export function planImportedTask(task, { members = {}, allowedColors = [], board
const email = importedEmail(task.email);
if (email) card.email = email;
if (task.due_complete === true && card.dueAt) card.dueComplete = true;
// Blocked, with its reason: the card's Blocked flow field.
if (task.blocked === true) {
card.flow = { blocked: true, ...(text(task.blocked_reason).trim() ? { blockedReason: text(task.blocked_reason).trim().slice(0, 1000) } : {}) };
}
// A repeating source task repeats here too. Its last occurrence counts as
// now: from its creation date, the recurrence job would make a copy of
// every imported card at once.
+13 -4
View File
@@ -38,7 +38,7 @@
// roles), the board's Scrum estimate
// milestones -> Scrum sprints (models/lib/externalScrumPlanning.js)
// tags_colors -> label colors, the nearest WeKan label color
// is_blocked / blocked_note,
// is_blocked / blocked_note -> the card's Blocked flow field, with its reason
// client_requirement,
// team_requirement,
// due_date_reason, is_iocaine -> custom fields of those names
@@ -257,11 +257,13 @@ export function parseTaiga(input) {
if (has(value)) fields[name] = value;
}
}
if (item.is_blocked === true) fields[TAIGA_FIELDS.blocked] = str(item.blocked_note).trim() || 'Blocked';
if (str(item.due_date_reason).trim()) fields[TAIGA_FIELDS.dueReason] = item.due_date_reason.trim();
for (const [name, value] of Object.entries(extra)) if (has(value)) fields[name] = value;
return fields;
};
// Blocked, with its note: the card's Blocked flow field.
const blockedOf = item => (item.is_blocked === true
? { blocked: true, ...(str(item.blocked_note).trim() ? { blocked_reason: str(item.blocked_note).trim() } : {}) } : {});
const people = item => uniq([person(item.assigned_to), ...list(item.assigned_users).map(person)]);
const owner = (item, out) => {
const assigned = people(item);
@@ -322,6 +324,7 @@ export function parseTaiga(input) {
date_end: date(story.finish_date, `${at}/finish_date`),
date_due: date(story.due_date, `${at}/due_date`),
comments: comments(story, at),
...blockedOf(story),
custom_fields: customFields(story, {
[TAIGA_FIELDS.points]: storyPoints(story),
[TAIGA_FIELDS.client]: story.client_requirement === true ? true : undefined,
@@ -352,6 +355,7 @@ export function parseTaiga(input) {
date_end: date(item.finished_date, `${at}/finished_date`),
date_due: date(item.due_date, `${at}/due_date`),
comments: comments(item, at),
...blockedOf(item),
custom_fields: customFields(item, {
[TAIGA_FIELDS.taskStatus]: str(item.status).trim() || undefined,
[TAIGA_FIELDS.iocaine]: item.is_iocaine === true ? true : undefined,
@@ -375,7 +379,8 @@ export function parseTaiga(input) {
...(str(epic.color) ? { color: epic.color } : {}),
date_creation: date(epic.created_date, `${at}/created_date`),
comments: comments(epic, at),
custom_fields: customFields(epic, {
...blockedOf(epic),
custom_fields: customFields(epic, {
[TAIGA_FIELDS.client]: epic.client_requirement === true ? true : undefined,
[TAIGA_FIELDS.team]: epic.team_requirement === true ? true : undefined,
}),
@@ -402,7 +407,8 @@ export function parseTaiga(input) {
date_end: date(issue.finished_date, `${at}/finished_date`),
date_due: date(issue.due_date, `${at}/due_date`),
comments: comments(issue, at),
custom_fields: customFields(issue),
...blockedOf(issue),
custom_fields: customFields(issue),
}), { milestone: issue.milestone, path: at });
});
if (!columns.length) addColumn(defaultStatus);
@@ -651,6 +657,9 @@ export function formatTaiga(collected = {}, now = new Date()) {
return has(value) && typeof value !== 'object' ? String(value) : '';
};
const blocked = item => {
// The card's Blocked flow field; a board imported before it has the
// "Blocked" custom field instead.
if (item.blocked) return { blocked_note: str(item.blockedReason), is_blocked: true };
const note = fieldText(item, TAIGA_FIELDS.blocked);
return { blocked_note: note && note !== 'Blocked' && note !== 'true' ? note : '', is_blocked: Boolean(note) && note !== 'false' };
};
+5 -2
View File
@@ -5,7 +5,8 @@
// back is held to KEEPS. It is the Playwright spec
// tests/playwright/specs/export-import-round-trip.e2e.js for the fields that
// spec does not look at - start and creation dates, spent time, the due
// date's done tick, recurrence, owner, requester, custom fields and color -
// date's done tick, recurrence, owner, requester, custom fields, color and
// the Blocked flow field with its reason -
// and it found exports that did not write what their own import reads
// (Kanboard, OpenProject, ClickUp, GitLab, Asana, Deck). A format that keeps
// less fails; one that keeps more fails too, so its line is raised with it.
@@ -41,7 +42,7 @@ const KEEPS = {
redmine: ['start', 'created', 'spent', 'owner', 'requester', 'customFields'],
tasksorg: ['start', 'created', 'spent', 'recurrence', 'customFields'],
superproductivity: ['created', 'spent', 'customFields'],
taiga: ['created', 'owner', 'requester', 'customFields'],
taiga: ['created', 'owner', 'requester', 'customFields', 'blocked'],
teamwork: ['start', 'dueComplete', 'owner', 'customFields'],
quire: ['start', 'created', 'owner', 'requester', 'customFields'],
notion: ['start', 'owner', 'customFields'],
@@ -56,6 +57,7 @@ async function main() {
dueAt: '2026-12-24T12:00:00.000Z', startAt: '2026-12-01T09:00:00.000Z', createdAt: '2026-11-01T08:00:00.000Z',
labels: ['Red'], labelIds: ['x'], owner: 'ann', assignees: ['bob'], creator: 'cid', requestedBy: 'dan',
spentTime: 1.5, dueComplete: true, recurrence: 'weekly', color: 'red', customFields: { Priority: 'High', Points: 3 },
blocked: true, blockedReason: 'Waiting for parts',
comments: [{ text: 'A comment', author: 'ann', date: '2026-11-02T00:00:00.000Z' }],
checklists: [{ title: 'CL', items: [{ title: 'Step', done: true }] }] };
const collected = { board: { title: 'B' }, lists: [{ _id: 'l1', title: 'Doing' }], swimlanes: [{ title: 'Default' }], items: [item] };
@@ -64,6 +66,7 @@ async function main() {
dueComplete: t => t.due_complete === true, recurrence: t => t.recurrence === 'weekly',
owner: t => Boolean(t.owner_username || t.owner_id || t.owner_name), requester: t => Boolean(t.requested_by),
customFields: t => Boolean(t.custom_fields) && Object.keys(t.custom_fields).length > 0, color: t => Boolean(t.color),
blocked: t => t.blocked === true && t.blocked_reason === 'Waiting for parts',
};
const differ = [];
for (const [format, keeps] of Object.entries(KEEPS)) {
+11 -1
View File
@@ -77,6 +77,8 @@ function collectedFrom(parsed) {
assignees: t.assignees || [],
creator: t.requested_by,
color: t.color,
// What models/lib/externalExporters.js writes from the card's flow field.
...(t.blocked ? { blocked: true, ...(t.blocked_reason ? { blockedReason: t.blocked_reason } : {}) } : {}),
...(t.parent_ref ? { parentCardId: t.parent_ref } : {}),
...(t.comments.length ? { comments: t.comments.map(c => ({ text: c.text, author: c.author, date: c.date })) } : {}),
...(t.checklists ? { checklists: t.checklists } : {}),
@@ -120,8 +122,16 @@ async function main() {
assert.equal(story.date_creation, '2024-03-01T10:20:00.000Z');
assert.equal(story.parent_ref, 'epic-7', 'its epic is its parent');
assert.deepEqual(story.dependencies, [{ ref: 'issue-6', type: 'related-to' }], 'the issue it was generated from');
assert.deepEqual(story.custom_fields, { Audience: 'Customers', Words: 800, Blocked: 'Waiting for the brand guide',
assert.deepEqual(story.custom_fields, { Audience: 'Customers', Words: 800,
'Due date reason': 'Launch', 'Story points': 5 }, 'points of computable roles only: UX 3 + Design 2');
// Blocked is the card's Blocked flow field now, with its note as the reason.
assert.equal(story.blocked, true);
assert.equal(story.blocked_reason, 'Waiting for the brand guide');
assert.deepEqual(planImportedTask(story).card.flow, { blocked: true, blockedReason: 'Waiting for the brand guide' });
assert.equal(planImportedTask(board.tasks[0]).card.flow, undefined, 'negative: a card that is not blocked has no flow');
// The board shows the Blocked field when the import has a blocked card (flow fields are off by default).
const creator = require('node:fs').readFileSync(require('node:path').join(__dirname, '../models/kanboardCreator.js'), 'utf8');
assert.match(creator, /if \(this\._tasks\(data\)\.some\(task => task && task\.blocked === true\)\) \{\n\s+boardToCreate\.allowsBlockedOnCard = true;\n\s+boardToCreate\.allowsBlockedOnMinicard = true;/);
assert.deepEqual(board.tasks[0].custom_fields, { 'Client requirement': true });
assert.equal(board.tasks[2].archived, true, 'a story in an archived status');
assert.equal(board.tasks[2].date_end, '2024-02-10T10:00:00.000Z');