Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Restrict the duration field on Jobs to a 4 week minimum #383

Closed
maxceem opened this issue Jul 16, 2021 · 16 comments
Closed

Restrict the duration field on Jobs to a 4 week minimum #383

maxceem opened this issue Jul 16, 2021 · 16 comments

Comments

@maxceem
Copy link
Contributor

maxceem commented Jul 16, 2021

Task from Will:

I know we have a new intake tool, and once it's ready for primetime I want to retire the Connect form, but in the meantime we need to do a quick update to the Connect intake form.
We need to restrict the duration field on Jobs to a 4 week minimum.

This is similar like we did in Connect App appirio-tech/connect-app#4417

@maxceem maxceem changed the title [TaaS] Restrict the duration field on Jobs to a 4 week minimum Restrict the duration field on Jobs to a 4 week minimum Jul 16, 2021
@maxceem
Copy link
Contributor Author

maxceem commented Jul 16, 2021

Sum up:

  • If the user try to enter Duration less than 4 during creating or editing Job, show an error message like in Connect App: "Please, choose at least 4 weeks"

  • the same time "Create"/"Save" button should be disabled

  • NOTE: don't block a user from entering Duration less than 4, the user should be able to input value and see the error. If we just block a user from entering a small value user might think these is a bug.

    image

  • For error message reuse existent error message style

    image

  • Create a constant for minimal resource booking duration and reuse it for this task and in the existent place which was implemented for Update Default Values for Resource Count & Duration #362

@nikolay83
Copy link
Collaborator

@maxceem
should we align it with #362 ?
Must be the same ENV_VAR is a source of truth.

@maxceem
Copy link
Contributor Author

maxceem commented Jul 16, 2021

thanks for pointing it out @nikolay83, yes, makes sense

We would create a constant and reuse it in both places.

maxceem added a commit that referenced this issue Jul 20, 2021
@maxceem maxceem reopened this Jul 20, 2021
maxceem added a commit that referenced this issue Jul 20, 2021
@maxceem
Copy link
Contributor Author

maxceem commented Jul 20, 2021

@maxceem maxceem added the PAID label Jul 20, 2021
@sandhiyakavi
Copy link
Collaborator

@maxceem Currently we are able to enter floating point values to the duration field, though tooltip is displayed and Create button is hidden, the "Talent as a Service engagements have a 4 week minimum commitment." error message is also shown even if the value is already greater than 4.
image

Other than that it is working as expected.
image
image

@maxceem
Copy link
Contributor Author

maxceem commented Jul 20, 2021

@mbaghel there appears to be one edge case, could please have a look at this. Validation should work well even if enter float number.

@mbaghel
Copy link
Contributor

mbaghel commented Jul 20, 2021

Added a fix #392

@maxceem
Copy link
Contributor Author

maxceem commented Jul 20, 2021

Thanks, @mbaghel.

@sandhiyakavi the issue with decimal numbers is fixed and ready for testing on DEV.

@sandhiyakavi
Copy link
Collaborator

Verified in Dev Env.

image

@sandhiyakavi
Copy link
Collaborator

sandhiyakavi commented Jul 23, 2021

@maxceem There is an issue while editing the Job, Save button is not getting enabled in Editing Job screen if the duration field is null. Save button is getting enabled only if we edit the duration field.

Steps to Reproduce:

  1. Edit the existing duration field to null.
  2. click save button.
  3. Again try to edit fields other than the duration field.
  4. Observe the Save button is not getting enabled.
  5. It gets enabled only if we enter the duration field again.

sample: https://platform.topcoder-dev.com/taas/myteams/18102/positions/b5c6fdc8-b4f6-4331-877f-1bb0fe5b6c6c/edit

@maxceem
Copy link
Contributor Author

maxceem commented Jul 23, 2021

Ah, nice catch @sandhiyakavi.

@mbaghel this field is optional. So we may leave it empty and should only check for minimal value if some value is entered into the field. Could you please have a look at this?

@mbaghel
Copy link
Contributor

mbaghel commented Jul 24, 2021

Fixed in #409. I misunderstood how this field should work.

@maxceem
Copy link
Contributor Author

maxceem commented Jul 24, 2021

Thanks @mbaghel it works well for me now.

@sandhiyakavi this was fixed and ready for QA.

@sandhiyakavi
Copy link
Collaborator

Verified in Dev Env. working as expected

@sandhiyakavi
Copy link
Collaborator

Verified on Prod

image

@maxceem
Copy link
Contributor Author

maxceem commented Aug 2, 2021

The previous payment was incorrect and was canceled by Topcoder Support. Here is a correct payment https://www.topcoder.com/challenges/ab3b12b0-e89e-40d5-9fa5-92dde9cbb248

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

No branches or pull requests

5 participants