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

Fix missing category in delete draft listing URL #10809

Merged

Conversation

akshayymahajan
Copy link
Contributor

@akshayymahajan akshayymahajan commented Oct 12, 2020

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

The JSON for listings on the listing dashboard page is missing the category key which causes an undefined in the delete listing URL. This PR adds the category key in the JSON.

Related Tickets & Documents

Fixes #10800

QA Instructions, Screenshots, Recordings

Before

Before

After

After

Added tests?

  • yes
  • no, because they aren't needed
  • no, because I need help

Added to documentation?

  • docs.forem.com
  • readme
  • no documentation needed

@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Oct 12, 2020
Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @akshayymahajan, great find! do you think you can add a test to make sure this doesn't regress in the future?

Controller specs are in https://github.com/forem/forem/blob/master/spec/requests/listings_spec.rb

thank you!

@akshayymahajan
Copy link
Contributor Author

Thanks, @rhymes. I will add a test for that.

@akshayymahajan
Copy link
Contributor Author

Hey @rhymes, I have added the test. Can you have a look?

@rhymes rhymes requested review from a team and citizen428 and removed request for a team October 13, 2020 14:46
Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Thanks @akshayymahajan

@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Oct 13, 2020
@benhalpern benhalpern merged commit f6c1fe0 into forem:master Oct 13, 2020
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Oct 13, 2020
boardfish pushed a commit to boardfish/forem that referenced this pull request Oct 17, 2020
* added category in DASHBOARD_JSON_OPTIONS in listing_controller.rb

* added test to make sure that draft listings contain category
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undefined in url for delete listing in listing dashboard
3 participants