Open jarifibrahim opened 6 years ago
It looks like the type of value for the field business_value
in ctx.payload
is float64
instead of int
https://github.com/fabric8-services/fabric8-wit/blob/79ce6a9abf2c8f2e2c6ac1e3f86c0046fd70a18f/controller/workitem.go#L86-L87 and hence the conversion fails at the following lines
https://github.com/fabric8-services/fabric8-wit/blob/79ce6a9abf2c8f2e2c6ac1e3f86c0046fd70a18f/workitem/simple_type.go#L71-L74
because valueType.Kind()
is float64
instead of int/int64
.
It looks like the type of value for the field business_value in ctx.payload is float64 instead of int
@jarifibrahim what happens when you update the business value with a float then?
@jarifibrahim what happens when you update the business value with a float then?
It doesn't work for float as well. The following conversion logic fails https://github.com/fabric8-services/fabric8-wit/blob/79ce6a9abf2c8f2e2c6ac1e3f86c0046fd70a18f/workitem/simple_type.go#L71-L74
Expected behavior
PATCH
request on/api/workitem/{wi_id}
for workitem typeEpic
(or any other type with a field of typeInteger
) should update the field value. Example requestResponse is
Actual behavior
PATCH
request on/api/workitem/{wi_id}
for workitem typeEpic
(or any other type with a field of typeInteger
) should update the field value.