Skip to content
New issue

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

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

Already on GitHub? # to your account

Business name should be mandatory for vendors #4677

Closed
3 tasks
cielf opened this issue Sep 30, 2024 · 6 comments · Fixed by #4704
Closed
3 tasks

Business name should be mandatory for vendors #4677

cielf opened this issue Sep 30, 2024 · 6 comments · Fixed by #4704

Comments

@cielf
Copy link
Collaborator

cielf commented Sep 30, 2024

#Summary
The business name is not currently mandatory for vendors it should be.

Why?

It's shown in drop downs, and it's a bit silly to have a blank there.

Details

Vendors can be entered under Community | Vendors, but also in a popup under Purchases | New Purchase (click on the vendor field and there is an option to enter a new vendor).

We do have 1 case where the business name is not entered in production, but the contact name makes sense as the business name.

Also do a migration to bring the contact name into the business name if the business name is blank.

Criteria for completion

  • business name is mandatory for vendors
  • migration
  • tests to support behaviour.
@cassieemb
Copy link
Contributor

Hi @cielf, hope you are well! If possible, I would love to take this issue.

This would be my first contribution, but my job uses Rails and Rspec so I feel very comfortable with the scope of this ticket. No worries at all if it would be preferable for me to take one tagged as a good first time issue.

If that would be alright, I do have one implementation question!

I was reviewing to determine whether the validation should be added to the Vendor model itself or the shared Provideable concern where the "business name or contact name" validation currently exists.

It feels like Provideable would be a better fit to avoid validating the field twice with differing criteria, but then the business name would be mandatory for ProductDriveParticipant as well. Would it be okay to introduce that requirement and do spec changes and the backfill via migration for both, or would we want to limit the scope to only affecting Vendor at this time?

@cielf
Copy link
Collaborator Author

cielf commented Oct 2, 2024

I'm assigning it to you, then! What's your question?

@cassieemb
Copy link
Contributor

Awesome, thank you very much!

I was reviewing to determine whether the validation should be added to the Vendor model itself or the shared Provideable concern where the "business name or contact name" validation currently exists.

It feels like Provideable would be a better fit to avoid validating the field twice with differing criteria, but then the business name would be mandatory for ProductDriveParticipant as well. Would it be okay to introduce that requirement and do spec changes and the backfill via migration for both, or would we want to limit the scope to only affecting Vendor at this time?

@cielf
Copy link
Collaborator Author

cielf commented Oct 2, 2024

Hmmm.. I think that a product drive participant could be an individual. Let me check what the production data looks like for those.

@cielf
Copy link
Collaborator Author

cielf commented Oct 2, 2024

Yeah... more than 10 % of our Product Drive Participants have no business name. In fact it looks like business name was added later -- that we started out without it!

So put it only on the Vendor, please.

@cassieemb
Copy link
Contributor

Will do, thank you for your clarification!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants