fabric8-services / fabric8-wit

wit stands for Work Item Tracker
http://devdoc.almighty.io/
Apache License 2.0
45 stars 86 forks source link

Update /workitemtype response for field rename #2335

Closed jarifibrahim closed 5 years ago

jarifibrahim commented 5 years ago

~Depends on https://github.com/fabric8-services/fabric8-wit/pull/2333~

This PR changes the /workitemtype/show response. For every system.* field we add a system_* field. Both system.* and system_* have exactly same attributes and corresponding values. This change was done so that the clients could start consuming system_* and then we could remove system.* attributes

The original response was

{
  "data": {
    "attributes": {
      ...
      "fields": {
        "system.area": {
          ...
        },
        "system.description": {
          ...
        },
        "system.title": {
          ...
        },
      },
      ...
    },
    "id": "00000000-0000-0000-0000-000000000002",
    "relationships": { ...  },
    "type": "workitemtypes"
  }
}

and now it is

{
  "data": {
    "attributes": {
      ...
      "fields": {
        "system.area": {
          ...
        },
        "system.description": {
          ...
        },
        "system.title": {
          ...
        },
        "system_area": {
          ...
        },
        "system_description": {
          ...
        },
        "system_title": {
          ...
        },
      },
      ...
    },
    "id": "00000000-0000-0000-0000-000000000002",
    "relationships": { ...  },
    "type": "workitemtypes"
  }
}
codecov[bot] commented 5 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (osio-story-743-rename-fields@efb6a38). Click here to learn what that means. The diff coverage is 100%.

Impacted file tree graph

@@                       Coverage Diff                       @@
##             osio-story-743-rename-fields    #2335   +/-   ##
===============================================================
  Coverage                                ?   70.12%           
===============================================================
  Files                                   ?      171           
  Lines                                   ?    16647           
  Branches                                ?        0           
===============================================================
  Hits                                    ?    11674           
  Misses                                  ?     3841           
  Partials                                ?     1132
Impacted Files Coverage Δ
workitem/workitemtype.go 73.62% <ø> (ø)
controller/workitemtype.go 67.6% <100%> (ø)
controller/workitem.go 81.72% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update efb6a38...5489f5c. Read the comment docs.