{"action":"created","issue":{"url":"https://api.github.com/repos/fabric8-services/fabric8-wit/issues/2177","repository_url":"https://api.github.com/repos/fabric8-services/fabric8-wit","labels_url":"https://api.github.com/repos/fabric8-services/fabric8-wit/issues/2177/labels{/name}","comments_url":"https://api.github.com/repos/fabric8-services/fabric8-wit/issues/2177/comments","events_url":"https://api.github.com/repos/fabric8-services/fabric8-wit/issues/2177/events","html_url":"https://github.com/fabric8-services/fabric8-wit/issues/2177","id":343939428,"node_id":"MDU6SXNzdWUzNDM5Mzk0Mjg=","number":2177,"title":"Rename workitem field names","user":{"login":"DhritiShikhar","id":6303309,"node_id":"MDQ6VXNlcjYzMDMzMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/6303309?v=4","gravatar_id":"","url":"https://api.github.com/users/DhritiShikhar","html_url":"https://github.com/DhritiShikhar","followers_url":"https://api.github.com/users/DhritiShikhar/followers","following_url":"https://api.github.com/users/DhritiShikhar/following{/other_user}","gists_url":"https://api.github.com/users/DhritiShikhar/gists{/gist_id}","starred_url":"https://api.github.com/users/DhritiShikhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DhritiShikhar/subscriptions","organizations_url":"https://api.github.com/users/DhritiShikhar/orgs","repos_url":"https://api.github.com/users/DhritiShikhar/repos","events_url":"https://api.github.com/users/DhritiShikhar/events{/privacy}","received_events_url":"https://api.github.com/users/DhritiShikhar/received_events","type":"User","site_admin":false},"labels":[{"id":554289356,"node_id":"MDU6TGFiZWw1NTQyODkzNTY=","url":"https://api.github.com/repos/fabric8-services/fabric8-wit/labels/:bath:%20cleanup","name":":bath: cleanup","color":"fef2c0","default":false},{"id":451888636,"node_id":"MDU6TGFiZWw0NTE4ODg2MzY=","url":"https://api.github.com/repos/fabric8-services/fabric8-wit/labels/:rocket:%20optimization","name":":rocket: optimization","color":"c5def5","default":false},{"id":344197280,"node_id":"MDU6TGFiZWwzNDQxOTcyODA=","url":"https://api.github.com/repos/fabric8-services/fabric8-wit/labels/:see_no_evil:%20%20bug","name":":see_no_evil:  bug","color":"cccccc","default":false},{"id":478238716,"node_id":"MDU6TGFiZWw0NzgyMzg3MTY=","url":"https://api.github.com/repos/fabric8-services/fabric8-wit/labels/jsonapi","name":"jsonapi","color":"f9d0c4","default":false}],"state":"open","locked":false,"assignee":{"login":"DhritiShikhar","id":6303309,"node_id":"MDQ6VXNlcjYzMDMzMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/6303309?v=4","gravatar_id":"","url":"https://api.github.com/users/DhritiShikhar","html_url":"https://github.com/DhritiShikhar","followers_url":"https://api.github.com/users/DhritiShikhar/followers","following_url":"https://api.github.com/users/DhritiShikhar/following{/other_user}","gists_url":"https://api.github.com/users/DhritiShikhar/gists{/gist_id}","starred_url":"https://api.github.com/users/DhritiShikhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DhritiShikhar/subscriptions","organizations_url":"https://api.github.com/users/DhritiShikhar/orgs","repos_url":"https://api.github.com/users/DhritiShikhar/repos","events_url":"https://api.github.com/users/DhritiShikhar/events{/privacy}","received_events_url":"https://api.github.com/users/DhritiShikhar/received_events","type":"User","site_admin":false},"assignees":[{"login":"DhritiShikhar","id":6303309,"node_id":"MDQ6VXNlcjYzMDMzMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/6303309?v=4","gravatar_id":"","url":"https://api.github.com/users/DhritiShikhar","html_url":"https://github.com/DhritiShikhar","followers_url":"https://api.github.com/users/DhritiShikhar/followers","following_url":"https://api.github.com/users/DhritiShikhar/following{/other_user}","gists_url":"https://api.github.com/users/DhritiShikhar/gists{/gist_id}","starred_url":"https://api.github.com/users/DhritiShikhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DhritiShikhar/subscriptions","organizations_url":"https://api.github.com/users/DhritiShikhar/orgs","repos_url":"https://api.github.com/users/DhritiShikhar/repos","events_url":"https://api.github.com/users/DhritiShikhar/events{/privacy}","received_events_url":"https://api.github.com/users/DhritiShikhar/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2018-07-24T08:40:41Z","updated_at":"2018-10-25T06:07:08Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"As per discussion with @kwk \r\n\r\n## Expected\r\n\r\nAs per [JSON API SPECIFICATION](http://jsonapi.org/format/#document-member-names), A period (.) should not be used as a member name.\r\n\r\n## Actual\r\n\r\nCurrently, almost all the workitem field member name contain a period:\r\n\r\n```\r\n\tSystemRemoteItemID        = \"system.remote_item_id\"\r\n\tSystemNumber              = \"system.number\"\r\n\tSystemTitle               = \"system.title\"\r\n\tSystemDescription         = \"system.description\"\r\n\tSystemDescriptionMarkup   = \"system.description.markup\"\r\n\tSystemDescriptionRendered = \"system.description.rendered\"\r\n\tSystemState               = \"system.state\"\r\n\tSystemAssignees           = \"system.assignees\"\r\n\tSystemCreator             = \"system.creator\"\r\n\tSystemCreatedAt           = \"system.created_at\"\r\n\tSystemUpdatedAt           = \"system.updated_at\"\r\n\tSystemOrder               = \"system.order\"\r\n\tSystemIteration           = \"system.iteration\"\r\n\tSystemArea                = \"system.area\"\r\n\tSystemCodebase            = \"system.codebase\"\r\n\tSystemLabels              = \"system.labels\"\r\n\tSystemBoardcolumns        = \"system.boardcolumns\"\r\n\r\n\tSystemBoard = \"Board\"\r\n```\r\n\r\n## Proposal\r\n\r\n1. Create a middleware in backend which would convert both e.g. `system.area` as well as `area` to store workitem field name as `area` in DB.\r\n\r\n2. Write a migration script to rename workitem fields for existing workitems\r\n\r\n## Related Issues\r\n\r\n#2029\r\n#2028\r\n#2181 "},"comment":{"url":"https://api.github.com/repos/fabric8-services/fabric8-wit/issues/comments/432926121","html_url":"https://github.com/fabric8-services/fabric8-wit/issues/2177#issuecomment-432926121","issue_url":"https://api.github.com/repos/fabric8-services/fabric8-wit/issues/2177","id":432926121,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjkyNjEyMQ==","user":{"login":"jarifibrahim","id":12949454,"node_id":"MDQ6VXNlcjEyOTQ5NDU0","avatar_url":"https://avatars3.githubusercontent.com/u/12949454?v=4","gravatar_id":"","url":"https://api.github.com/users/jarifibrahim","html_url":"https://github.com/jarifibrahim","followers_url":"https://api.github.com/users/jarifibrahim/followers","following_url":"https://api.github.com/users/jarifibrahim/following{/other_user}","gists_url":"https://api.github.com/users/jarifibrahim/gists{/gist_id}","starred_url":"https://api.github.com/users/jarifibrahim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarifibrahim/subscriptions","organizations_url":"https://api.github.com/users/jarifibrahim/orgs","repos_url":"https://api.github.com/users/jarifibrahim/repos","events_url":"https://api.github.com/users/jarifibrahim/events{/privacy}","received_events_url":"https://api.github.com/users/jarifibrahim/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T06:07:08Z","updated_at":"2018-10-25T06:07:08Z","author_association":"CONTRIBUTOR","body":"Renaming of fields involves changes to the payload, the data stored in the database and the migration of the client. This is a multi-step process. So here's how we're going to do this\r\n\r\n**Step 1**: **Migration of the Backend**\r\nWe migrate the backend in this phase and add some *temporary code* which would allow backward compatitibilty. This would mean the clients can migrate gracefully without any loss of functionality.\r\nBy the end of this phase, the backend will accept both system.* and system_* field names but internally it will use only system_* field names. The response will also contain both type of field names. \r\nWe will also migrate the database.\r\n\r\n**Step 2**: **Migration of the Client**\r\nIn this phase the backend will accept and return both kinds of field names. The client can easily switch from one type to another. We are aware of only two clients as of now. The fabric8-planner and fabric8-analytics. Once both the clients are migrated, we will remove the temporary code.\r\n\r\n**Step 3**: **Removal of the Temporary Code**\r\nOnce all the clients have migrated, we will remove the temporary code added for backward compatibilty. By the end of this phase, the backend will no longer send or accept system.* field names. We will support only system_* field names.\r\n"}}
{"actor":{"display_login":"jarifibrahim"}}