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

Listing Limit Option Not Working As Expected #2333

Closed
3 tasks done
bobmatyas opened this issue Oct 24, 2022 · 2 comments · Fixed by #2362
Closed
3 tasks done

Listing Limit Option Not Working As Expected #2333

bobmatyas opened this issue Oct 24, 2022 · 2 comments · Fixed by #2362

Comments

@bobmatyas
Copy link
Contributor

bobmatyas commented Oct 24, 2022

Describe the bug

The job listing limit doesn't work as expected. If you enter 0, you are allowed to enter an unlimited number of jobs. This should either not allow you to enter any jobs or the field description should state that 0 means unlimited jobs are allowed.

To Reproduce
Steps to reproduce the behavior:

  1. Add more than 2 test jobs.
  2. Go to 'Settings > Job Submission'
  3. Add a "Listing Limit" of 0.
  4. Try adding another job, you are allowed to add an additional job.
  5. Set the listing limit to 1.
  6. Try adding another job. You should be redirected to the Jobs dashboard.
  7. Remove the "Listing Limit" entirely -- you can add jobs.

Expected behavior

  • I would expect that if I enter "0", I wouldn't be able to add additional jobs.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only WP Job Manager plugin is active.
  • This bug happens with a default WordPress theme active.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment

  • WordPress Version: v6.0.3
  • WP Job Manager Version: v1.3.8
  • PHP Version: v8.1
  • Other important details:
@mikeyarce
Copy link
Member

Thanks @bobmatyas ! I can confirm that this is happening. My question is - why would you want to have the Listing Limit be 0?

@bobmatyas
Copy link
Contributor Author

@mikeyarce I don't think there was a use case that the bug reporter had where they needed to do that, it was just reported as an inconsistency. It seems the check in the PR would fix the issue.

@github-actions github-actions bot added this to the 1.41.0 milestone Jul 3, 2023
@gikaragia gikaragia removed this from the 1.41.0 milestone Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants