Skip to content

Commit a93f6f7

Browse files
committed
[#74316] document JSON WP workflows
Add README examples for the new machine-readable Work Package flows: inspect with children, parent-aware create dry-runs, and schema-driven update dry-runs. https://community.openproject.org/projects/cli/work_packages/74316
1 parent d6ba678 commit a93f6f7

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ op create workpackge --project 11 'Document new CLI tool'
150150

151151
# Same command with shorthands and directly open it in a browser to continue working on it.
152152
op create workpackge -p11 'Document new CLI tool' -o
153+
154+
# Validating the creation of a child work package without persisting it.
155+
# The parent determines the project automatically.
156+
op create workpackage --parent 74316 --type Implementation 'Build reusable skill' --dry-run --json
153157
```
154158

155159
#### Listing
@@ -174,6 +178,9 @@ op update workpackage 42 --subject 'The new subject' --status 'In Progress' --ty
174178

175179
# Uploading an attachment to a work package
176180
op update workpackage 42 --attach ./Downloads/Report.pdf
181+
182+
# Resolving and validating field updates as JSON before applying them
183+
op update workpackage 74316 --set 'Votes=3' --dry-run --json
177184
```
178185

179186
#### Inspecting
@@ -182,6 +189,9 @@ op update workpackage 42 --attach ./Downloads/Report.pdf
182189
# Inspecting a work package with more details,
183190
# then in the work package list command
184191
op inspect workpackage 42
192+
193+
# Inspecting a work package and its direct children as machine-readable JSON
194+
op inspect workpackage 74316 --children --json
185195
```
186196

187197
## Creating a release

0 commit comments

Comments
 (0)