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

fix readme example for creating workitem #208

Closed
dustymabe opened this issue Sep 6, 2016 · 1 comment
Closed

fix readme example for creating workitem #208

dustymabe opened this issue Sep 6, 2016 · 1 comment

Comments

@dustymabe
Copy link

The readme example to create a workitem is out of date now: c846ca3#diff-7bd4a925c695c2eb0eced3872b9b965fR197

It gives you this error:

[vagrant f24 almighty-core]$ ./bin/alm-cli create workitem --payload '{"type": "1" , "name": "some name", "fields": { "system.owner": "tmaeder", "system.state": "open" }}' -H localhost:8080
2016/09/06 20:18:11 [INFO] started id=J5v/kihB POST=http://localhost:8080/api/workitems
2016/09/06 20:18:11 [INFO] started req_id=w7m9vmdnwz-14 POST=/api/workitems from=::1 ctrl=WorkitemController action=Create
2016/09/06 20:18:11 [INFO] payload req_id=w7m9vmdnwz-14 raw={"fields":{"system.owner":"tmaeder","system.state":"open"},"type":"1"}
2016/09/06 20:18:11 loading work item type 1
2016/09/06 20:18:11 not found, res={{0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC <nil>}  0  map[]}
2016/09/06 20:18:11 [INFO] completed req_id=w7m9vmdnwz-14 status=400 error=N8DjLctB bytes=99 time=1.602504ms
2016/09/06 20:18:11 [INFO] completed id=J5v/kihB status=400 time=6.633171ms
error: 400: {"id":"N8DjLctB","code":"bad_request","status":400,"detail":"Bad value for parameter 'type': '1'"}

NOTE: the core api server was running in the background so the output is intermixed.

Aslak pointed me to a correct example: https://github.com/almighty/almighty-core/blob/master/examples/create_workitem.json

let's fix the readme

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants