Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Planner: Add work items widget uses API that doesn't exist anymore #3383

Closed
jiekang opened this issue Apr 30, 2018 · 14 comments
Closed

Planner: Add work items widget uses API that doesn't exist anymore #3383

jiekang opened this issue Apr 30, 2018 · 14 comments

Comments

@jiekang
Copy link
Collaborator

jiekang commented Apr 30, 2018

The planner work-items.service.ts provides function getWorkItemTypes. It makes a request to get workitemtypes, building the URL:

this.workItemTypeUrl = this._currentSpace.links.self + '/workitemtypes';

In production, requests to this endpoint are 404 Not Found for me. This affects the add work items widget in fabric8-ui. It displays a blank page.

Comments in this PR [1] suggest the URL should be built from the 'relationships' part of the space response.

workitemtypes

[1] fabric8-services/fabric8-wit#2073

Edit: Specifically, this service is used in fabric8-ui:create-work-item-overlay.component.ts via:

this.workItemTypes = this.workItemService.getWorkItemTypes();

Edit2:

It looks like there is another API that has been changed:

https://api.openshift.io/api/namedspaces/<username>/prod-5/workitems/new?type=26787039-b68f-4e28-8814-c2f93be1ef4e

Returns:
400 Bad Request: {"errors":[{"code":"invalid_request","detail":"invalid value \"new\" for parameter \"wiNumber\", must be a integer","id":"YxQM4g7F","status":"400","title":"Bad Request"}]}

This will need to be addressed as well to make the widget work.

[2] fabric8-ui/fabric8-ui#2843

@jiekang jiekang added this to the Planner Backlog milestone Apr 30, 2018
@jiekang jiekang changed the title Planner: Workitemtypes link is wrong Planner: Workitemtypes url is wrong Apr 30, 2018
@joshuawilson
Copy link
Member

@jiekang is this needed or blocking for an issue?

@jiekang
Copy link
Collaborator Author

jiekang commented Apr 30, 2018

@joshuawilson
Users can't add work items via the widget in production; the feature is unusable. The PR fabric8-ui/fabric8-ui#2794 addressing the P0 #3021 is for this same feature. I think if the above PR/Issue is a P0, this one is also definitely P0.

@jiekang
Copy link
Collaborator Author

jiekang commented Apr 30, 2018

And conversely, if this isn't a P0, then #3021 should not be a P0 either.

Short description:
This bug makes the widget blank and unusable. The above bug makes the widget redirect to 404 and unusable.

@joshuawilson joshuawilson added the priority/P1 Critical label Apr 30, 2018
@joshuawilson
Copy link
Member

joshuawilson commented Apr 30, 2018

Based on that logic, I've add the P0.
cc @bmicklea @qodfathr

@jiekang jiekang changed the title Planner: Workitemtypes url is wrong Planner: Add work items widget uses API that doesn't exist anymore May 1, 2018
sanbornsen added a commit to sanbornsen/fabric8-ui that referenced this issue May 2, 2018
@sanbornsen
Copy link
Collaborator

I have fixed the issue with work item type service, but the problem is we don't support non-contextual detail add from the planner, thus the next step in this flow is broken.

@nimishamukherjee
Copy link
Collaborator

@qodfathr @joshuawilson @jiekang can we remove the Add work item work flow from the dash board.
We have removed Detailed Work Item Creation component and this workflow would not work.
Have a look at #2840

@joshuawilson
Copy link
Member

@dlabrecq @jiekang can you please take a look.

@jiekang
Copy link
Collaborator Author

jiekang commented May 2, 2018

@joshuawilson It looks like the suggested action is to remove the add work item flow from the UI. That's relatively simple to do; I or Dan could take a look. Is that acceptable?

@michaelkleinhenz
Copy link
Collaborator

We should remove it. This flow will not work anymore. And it also does not makes sense from a systematic perspective: even if it would work, it would promote creating top-level WIs, which is not desirable in most cases. New WIs certainly are childs and should be properly created using the contextual add.

We can get to a feature like that later when implementing the generic "issue" WIT.

@jiekang jiekang self-assigned this May 2, 2018
@jiekang
Copy link
Collaborator Author

jiekang commented May 2, 2018

Okay. I can look at providing a PR to remove the functionality completely.

@dlabrecq
Copy link
Collaborator

dlabrecq commented May 2, 2018

I was also thinking this should be removed. I'll close fabric8-ui/fabric8-ui#2843 and reference this issue.

@kwk
Copy link
Contributor

kwk commented May 3, 2018

I'm for removing as well.

@jiekang
Copy link
Collaborator Author

jiekang commented May 4, 2018

Fix has been merged upstream. I will track this and close it when it reaches Production.

@joshuawilson
Copy link
Member

Closing as this has been fixed and we don't want to work this way anymore.

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

Successfully merging a pull request may close this issue.

7 participants