Skip to content

Fix update on fresh workpackages, add parent and description mutation flags#17

Open
EatonChips wants to merge 2 commits into
opf:mainfrom
EatonChips:main
Open

Fix update on fresh workpackages, add parent and description mutation flags#17
EatonChips wants to merge 2 commits into
opf:mainfrom
EatonChips:main

Conversation

@EatonChips

Copy link
Copy Markdown

Ticket

N/A

What are you trying to accomplish?

Add support for setting work package descriptions and parent relations through the CLI.
Updating a freshly created workpackage with a lockVersion of 0 always fails.

  • op create workpackage --description
  • op create workpackage --description-file
  • op create workpackage --parent
  • op update workpackage --description
  • op update workpackage --description-file
  • op update workpackage --parent

What approach did you choose and why?

Flags were added using Cobra, and the DTOs were updated to include the fields the API already supports. This was just plumbing to route the cli argument into the final struct shape.
The lockVersion should always be sent, even if 0. It is required by the PATCH handler, newly created workpackages initialize with a 0 value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant