Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

needscontact needs to call the right API route. #680

Closed
karlcow opened this issue Aug 25, 2015 · 7 comments
Closed

needscontact needs to call the right API route. #680

karlcow opened this issue Aug 25, 2015 · 7 comments

Comments

@karlcow
Copy link
Member

karlcow commented Aug 25, 2015

This is blocking #434

The current call to needscontact is not carried on to the API call.

For example needsdiagnosis is working well, but needscontact is failing and being redirected to all.

The call to the API was:
https://webcompat.com/api/issues?page=1&per_page=50&state=open&stage=all&sort=created&direction=desc
An API call is made to all, while when requesting sitewait for example the API call is made to https://webcompat.com/api/issues/category/sitewait?page=1&per_page=50&state=open&stage=sitewait&sort=created&direction=desc

btw maybe an additional issue. In https://webcompat.com/api/issues/category/sitewait?page=1&per_page=50&state=open&stage=sitewait&sort=created&direction=desc

  • /api/issues/category/sitewait
  • stage=sitewait

seems to be redundant.

@miketaylr
Copy link
Member

Unrelated (maybe?) bug: If you visit https://webcompat.com/api/issues?page=1&per_page=50&state=open&stage=all&sort=created&direction=desc directly in the browser it's... surprising. 💩 👈

@karlcow
Copy link
Member Author

karlcow commented Aug 26, 2015

@miketaylr it's a JSON file. What did you notice was wrong?

@miketaylr
Copy link
Member

The bug is in toggleFilter of issue-list.js. Right now that will only do what we expect it to if there's a corresponding filter button with [data-filter=needscontact], which I guess is kind of not great, but that means #434 will fix this.

@miketaylr
Copy link
Member

@miketaylr it's a JSON file. What did you notice was wrong?

Oh, nevermind. >_< Not fully awake I guess.

@miketaylr
Copy link
Member

As for the issue about the redundancy, yeah that's a good point. Right now we just pass along all params to GitHub (and they don't seem to mind), but we could filter out our own at the API level.

@miketaylr
Copy link
Member

This will get fixed by #685. If somebody wants to refactor issue-list.js so it doesn't rely on certain DOM elements existing to succeed - that would be a cool contribution. Probably not a huge priority though. 💐

@miketaylr
Copy link
Member

I'm gonna close this as a dupe of #434.

miketaylr pushed a commit that referenced this issue Sep 3, 2015
Fixes Issue #434 and #680: Add Needs Contact button to Issues UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants