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

Issue 3472: Bring request info to distribution #3502

Conversation

grantmca
Copy link
Contributor

@grantmca grantmca commented Mar 27, 2023

Resolves #3472

Description

Added automatic population of the agency representatives name and email address in the distribution form based around the copy_from_request method in the distribution model. I also added a function to user model to return a formatted version of the partenr_users name and email for the front end table in request as well as the filling in of agency representatives. I did this through a function to keep things DRY.

Added a test to ensure that the partner, agency representatives and
comments are all properly being passed from the request to the distribution
using the #copy_from_request function

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I have added a test and I have also tested manually, manual testing steps would be

  1. Go to the request page and find a request you would like to transfer
  2. Take note of the request sender field
  3. Click on the "view" icon on the list item
  4. Click the "Fulfill request" button
  5. Confirm you see the request sender's information in "Agency representative" field

Test to verify changes : bundle exec rspec spec/system/distribution_system_spec.rb:398

Screenshots

Screenshot 2023-03-26 at 9 33 28 PM

app/models/request.rb Outdated Show resolved Hide resolved
spec/system/distribution_system_spec.rb Outdated Show resolved Hide resolved
@grantmca grantmca force-pushed the 3472-add-user-request-details-to-distribution branch 4 times, most recently from 19e3758 to 07d4323 Compare March 30, 2023 02:34
@grantmca grantmca requested a review from dorner March 30, 2023 14:52
spec/system/distribution_system_spec.rb Outdated Show resolved Hide resolved
@grantmca grantmca force-pushed the 3472-add-user-request-details-to-distribution branch from 07d4323 to 0278e35 Compare March 31, 2023 02:55
@grantmca grantmca requested a review from dorner March 31, 2023 02:56
@dorner
Copy link
Collaborator

dorner commented Mar 31, 2023

Once tests pass this should be good to merge!

    Added ability to automatically populate the agency representatives name
    and email address in the distribution form

    Added function to user to return a string that formatted the
    partner_user's name in email for the front end on both the request show
    and to be used in the distribution's controller to populate the agency
    representatives bald

    Added a test to ensure that the partner, agency representatives and
    comments are all properly being passed from the request to the distribution
    using the #copy_from_request function
@grantmca grantmca force-pushed the 3472-add-user-request-details-to-distribution branch from 0278e35 to 466a8e7 Compare April 1, 2023 21:01
@dorner
Copy link
Collaborator

dorner commented Apr 3, 2023

Nice - thanks!

@dorner dorner merged commit 35a694d into rubyforgood:main Apr 3, 2023
@dorner
Copy link
Collaborator

dorner commented Apr 3, 2023

@grantmca for next time, please don't force push your branch if it's got active conversations on it - it becomes a lot harder to figure out what's changed since the last time a comment was made. We can always squash it on merge.

@cielf
Copy link
Collaborator

cielf commented Apr 17, 2023

@grantmca -- Just to let you know -- this has been released. Thank you!

@grantmca
Copy link
Contributor Author

Thank you!

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

Successfully merging this pull request may close these issues.

Add details for person who issued the request at fulfillment and distribution stages
3 participants