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

Commit

Permalink
Add help text in README for creation, retrieval, listing of WorkItemT…
Browse files Browse the repository at this point in the history
…ype.
  • Loading branch information
Pranav authored and pranavgore09 committed Sep 19, 2016
1 parent 5c04a5b commit 7dee48d
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -261,16 +261,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

0 comments on commit 7dee48d

Please sign in to comment.