Skip to content

fix: add tags support to workflow export and import#204

Merged
wcollins merged 1 commit into
itential:mainfrom
davhparry:fix/workflow-export-tags
Jun 26, 2026
Merged

fix: add tags support to workflow export and import#204
wcollins merged 1 commit into
itential:mainfrom
davhparry:fix/workflow-export-tags

Conversation

@davhparry

Copy link
Copy Markdown
Contributor

The Workflow struct was missing a Tags field, causing tags to be silently dropped when deserialising the export API response and omitted when serialising the import request body.

Adds Tags []Tag to the Workflow struct, initialises it to an empty slice in NewWorkflow() to match the platform API behaviour of always returning "tags": [], and adds tests with real-world fixture data to verify tags are preserved through both export and import.

Description

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Chore

Changes Made

  • pkg/services/workflows.go — Added Tags []Tag to the Workflow struct and initialised it to []Tag{} in NewWorkflow() so an empty tags array is always serialised as "tags": [], matching the platform API behaviour
  • pkg/services/workflows_test.go — Added TestWorkflowExportPreservesTags and TestWorkflowImportPreservesTags to verify tags are preserved through both operations
  • pkg/services/testdata/.../export.with-tags.success.json — New export fixture with a real-world tag object
  • pkg/services/testdata/.../import.with-tags.success.json — New import fixture with a real-world tag object

Testing

Unit tests added for export and import with tags
done
Full test suite passes (make test)
done
Manually verified with a real workflow — export now includes tags when present and "tags": [] when not, matching platform API output

Checklist

  • Code follows the project's style guidelines
  • Self-review of code has been performed
  • Code has been commented where necessary
  • Tested with make setup or relevant profile
  • Commits follow conventional format (type: subject)
  • No secrets or credentials committed
  • Documentation has been updated accordingly
  • PR has been labeled appropriately (enhancement, bug, documentation, refactor, chore)

Related Issues

Closes # 200

The Workflow struct was missing a Tags field, causing tags to be
silently dropped when deserialising the export API response and
omitted when serialising the import request body.

Adds Tags []Tag to the Workflow struct, initialises it to an empty
slice in NewWorkflow() to match the platform API behaviour of always
returning "tags": [], and adds tests with real-world fixture data to
verify tags are preserved through both export and import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wcollins wcollins merged commit efa68b5 into itential:main Jun 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants