Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Add help text in README for creation, retrieval, listing of WorkItemTypes #195

Merged
merged 1 commit into from
Sep 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 22 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -262,16 +262,36 @@ Test out the build by executing CLI commands in a different terminal.

NOTE: The CLI needs the API Server which was started on executing `make dev` to be up and running. Please do not kill the process. Alternatively if you haven't run `make dev` you could just start the server by running `./bin/alm`.

Create a work item type.
----
./bin/alm-cli create workitemtype --payload '{"fields":{"system.owner":{"Type":{"Kind":"user"},"Required":true},"system.state":{"Type":{"Kind":"string"},"Required":false}},"name":"Epic"}' -H localhost:8080 --pp
----
Note: Work Item Type `Name` is unique. If one tries to create another work item type with same name, error will be trown.

Retrieve the work item type.

----
$ ./bin/alm-cli show workitemtype --name "Epic" -H localhost:8080
----

List all available work item types.
----
$ ./bin/alm-cli list workitemtype -H localhost:8080 --pp
----

Create a work item.

Based on WorkItemType created above, we can create WorkItem.
We need to use name of work item type in the `type` field below.

----
$ ./bin/alm-cli create workitem --payload '{"type": "1" , "name": "some name", "fields": { "system.owner": "tmaeder", "system.state": "open" }}' -H localhost:8080
$ ./bin/alm-cli create workitem --payload '{"type": "Epic", "fields": { "system.owner": "tmaeder", "system.state": "open" }}' -H localhost:8080
----

Retrieve the work item.

----
$ ./bin/alm-cli show workitem --id 1 -H localhost:8080
$ ./bin/alm-cli show workitem --id 1 -H localhost:8080 --pp
----

== Debugging [[debug]]
Expand Down