Files
wekan/client/components/rules/rulesImportExport.jade
T
Lauri Ojansivu a78b4aa744 Export Wrike Excel with Wrike's custom workflow statuses, and import and export Wrike workflows as lists and rules.
The Wrike Excel export wrote the WeKan list as a custom column named WeKan
list, which Wrike reads as a custom field rather than a status. It now
writes the five workflow columns of Wrike's import help article: Default
task workflow on folder rows, and on task rows Workflow (named after the
board), Status (the list's status group) and Custom Status (the list).
Wrike applies a custom status only when that workflow exists, matching
case, so the board's lists are also exported as that workflow: the JSON of
Wrike's GET /workflows, one custom status per list with the nearest Wrike
color. That JSON is the only exchange format, since Wrike has no file
import or export of workflows.

A list's status group comes from the board's rules. A "moved to this list,
mark complete" rule makes it Completed (Cancelled when its name says so), a
"mark incomplete" rule makes it Active (or Deferred), otherwise the name
decides. In Rules > Import / Export, a pasted Wrike workflow adds a list for
each status the board lacks, after the previous status's list, and adds the
rules that do what Wrike's status groups do. Those rules show in the list,
Workflow and Blocks views. A server method does this as a board admin and
adds nothing twice. Wrike's own automation rules have no export, import or
API, so they cannot be carried over.

The Wrike import reads Custom Status as the list and a single Workflow as
the board title. It reports a status group the status name does not imply,
since only the workflow import's rules keep it.

tests/wrikeWorkflow.test.cjs and tests/wrikeFormat.test.cjs cover the
workflow, rules, colors, refusals and round trips. Two new Playwright cases
import a workbook with the workflow columns and apply a Wrike workflow
through the Rules popup twice, and the export audit fetches the workflow.
New text is in English, pending Transifex.

Thanks to xet7 !
2026-10-09 09:48:47 +03:00

52 lines
2.0 KiB
Plaintext

template(name="rulesImportExportPopup")
.rules-import-export
h3 {{_ 'r-export'}}
.rules-ie-btns
button.primary.full.js-rules-export-json(type="button") {{_ 'r-export-json'}}
button.primary.full.js-rules-export-csv(type="button") {{_ 'r-export-csv'}}
hr
h3 {{_ 'r-import'}}
.rules-ie-target
label {{_ 'r-import-target'}}
label.rules-ie-target-row
span {{_ 'r-workspace'}}
select.js-import-workspace
option(value="") {{_ 'r-all-boards'}}
each workspaces
option(value="{{id}}")= label
label.rules-ie-target-row
span {{_ 'r-board'}}
select.js-import-board
each boardsForImport
if selected
option(value="{{_id}}" selected="selected")= title
else
option(value="{{_id}}")= title
p.rules-ie-hint {{_ 'r-import-paste'}}
textarea.rules-ie-textarea.js-rules-import-text(rows="8")
.rules-ie-btns
button.primary.full.js-rules-import-json(type="button") {{_ 'r-import-json'}}
button.primary.full.js-rules-import-csv(type="button") {{_ 'r-import-csv'}}
hr
h3 {{_ 'r-import-workflow'}}
p.rules-ie-hint {{_ 'r-import-workflow-note'}}
.rules-ie-btns
select.js-workflow-format
option(value="auto") {{_ 'r-format-auto'}}
option(value="n8n") n8n
option(value="nodered") Node-RED
button.primary.full.js-rules-import-workflow(type="button") {{_ 'r-import-workflow'}}
hr
h3 {{_ 'r-wrike-workflow'}}
p.rules-ie-hint {{_ 'r-wrike-workflow-note'}}
.rules-ie-btns
button.primary.full.js-rules-export-wrike(type="button") {{_ 'r-export-wrike-workflow'}}
button.primary.full.js-rules-import-wrike(type="button") {{_ 'r-import-wrike-workflow'}}
hr
h3 {{_ 'r-import-trello'}}
p.rules-ie-hint {{_ 'r-import-trello-note'}}
.rules-ie-btns
button.primary.full.js-rules-import-trello(type="button") {{_ 'r-import-trello'}}
if message.get
p.rules-ie-message= message.get