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

[API-35332] View POA Requests - Filtering #19306

Merged
merged 10 commits into from
Nov 12, 2024
Merged

Conversation

tycol7
Copy link
Contributor

@tycol7 tycol7 commented Nov 6, 2024

Summary

  • add the filter key to the POA request with the following keys:
    • status, an array of enums (NEW, ACCEPTED, DECLINED)
    • state
    • city
    • country
  • add tests and docs (v2 staging only)

Related issue(s)

API-35332

Testing done

  • New code is covered by unit tests

Testing steps

  1. Connect to BGS.

  2. Send the following request:

    curl --location 'http://localhost:3000/services/claims/v2/veterans/power-of-attorney-requests' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer *****' \
    --data '{
        "data": {
            "attributes": {
                "poaCodes": [
                    "002",
                    "003",
                    "083"
                ],
                "filter": {
                    "status": [
                        "ACCEPTED"
                    ],
                    "state": "TX",
                    "city": "Cedar Park",
                    "country": "USA"
                }
            }
        }
    }'
    
  3. Observe the following response:

    [
        {
            "VSOUserEmail": "Beatrice.Stroud44@va.gov",
            "VSOUserFirstName": "BEATRICE",
            "VSOUserLastName": "STROUD",
            "changeAddressAuth": "N",
            "claimantCity": "CEDAR PARK",
            "claimantCountry": "USA",
            "claimantMilitaryPO": null,
            "claimantMilitaryPostalCode": null,
            "claimantState": "TX",
            "claimantZip": "78613",
            "dateRequestActioned": "2024-05-09T02:18:04-05:00",
            "dateRequestReceived": "2013-02-10T13:47:54-06:00",
            "declinedReason": null,
            "healthInfoAuth": "N",
            "poaCode": "083",
            "procID": "12072",
            "secondaryStatus": "Accepted",
            "vetFirstName": "Pat",
            "vetLastName": "Morris",
            "vetMiddleName": "H",
            "vetPtcpntID": "600043198"
        }
    ]
    
  4. Adjust filters and resend as desired.

Screenshots

example schema

What areas of the site does it impact?

  • Power of attorney requests (index)
  • v2 staging docs

Acceptance criteria

  • I added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Requested Feedback

N/A

@tycol7 tycol7 added the claimsApi modules/claims_api label Nov 6, 2024
@va-vfs-bot va-vfs-bot temporarily deployed to tdc/view-poa-requests-filtering/main/main November 6, 2024 21:49 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to tdc/view-poa-requests-filtering/main/main November 7, 2024 00:08 Inactive
@tycol7 tycol7 force-pushed the tdc/view-poa-requests-filtering branch from b4658c7 to 2f7b111 Compare November 7, 2024 21:57
@tycol7 tycol7 force-pushed the tdc/view-poa-requests-filtering branch from 2f7b111 to 65165d5 Compare November 7, 2024 22:12
@va-vfs-bot va-vfs-bot temporarily deployed to tdc/view-poa-requests-filtering/main/main November 7, 2024 23:10 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to tdc/view-poa-requests-filtering/main/main November 8, 2024 00:16 Inactive
Comment on lines +59 to +69
context 'when pageIndex is present but pageSize is not' do
before do
allow(subject).to receive(:form_attributes).and_return({ 'poaCodes' => %w[002 003 083], 'pageIndex' => '2' })
end

it 'raises a ParameterMissing error' do
expect do
subject.index
end.to raise_error(Common::Exceptions::ParameterMissing)
end
end
Copy link
Contributor Author

Choose a reason for hiding this comment

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

missed this test in #19268, so adding here.

Copy link
Contributor

@FonzMP FonzMP left a comment

Choose a reason for hiding this comment

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

:shipit:

@tycol7 tycol7 merged commit 4912bed into master Nov 12, 2024
55 of 56 checks passed
@tycol7 tycol7 deleted the tdc/view-poa-requests-filtering branch November 12, 2024 19:33
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.

3 participants