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

Bound listing duration between 1 and 100 years, or no expiration #2695

Merged
merged 3 commits into from
Jan 5, 2024

Conversation

thedebian
Copy link
Contributor

@thedebian thedebian commented Jan 5, 2024

Fixes #2690

Changes Proposed in this Pull Request

This PR fixes an issue with the listing duration being a free text setting.
It is now a number, bound from 1 to 100 years.
If a number if below or above, it will be reset to "no expiration".
It's also adding a placeholder "No limit" to the field.

Testing Instructions

  • Don't apply PR
  • Follow test steps in Editing Job Listing breaks if Listing Duration is set too large. #2690
  • Should break
  • Apply PR
  • Do it again
  • ✅ It should be set to "no limit"
  • Update limit to a number between 1 and 36500
  • ✅ The limit should be properly set
  • Update it to a number out of these bounds (eg. 0, -1, 36501)
  • ✅ It should be set to "no limit"
  • The field should also only accept numbers, you can try manually setting the field to some random text (you'll have to bypass browser submit checks), it should be set to "no limit"

Plugin build for 008c0fb
📦 Download plugin zip
▶️ Open in playground

@thedebian thedebian requested review from dericleeyy and a team January 5, 2024 12:08
@thedebian thedebian self-assigned this Jan 5, 2024
Copy link
Contributor

@yscik yscik left a comment

Choose a reason for hiding this comment

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

Looks good. Could the same issue happen with the 'Listing Limit' setting? Looks like I can even save it as a string:

image

@thedebian
Copy link
Contributor Author

Looks good. Could the same issue happen with the 'Listing Limit' setting? Looks like I can even save it as a string:

Good catch, I'll check other settings and update them too 👍

Copy link
Contributor

@yscik yscik left a comment

Choose a reason for hiding this comment

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

👍

@thedebian thedebian merged commit 7e6ce09 into trunk Jan 5, 2024
8 checks passed
@thedebian thedebian deleted the fix/submission-duration-too-long branch January 5, 2024 15:17
@yscik yscik added this to the 2.2.0 milestone Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editing Job Listing breaks if Listing Duration is set too large.
2 participants