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

Deactivated partners should not appear in the dropdown when producing a new distribution. #4515

Closed
2 tasks
cielf opened this issue Jul 14, 2024 · 5 comments · Fixed by #4639
Closed
2 tasks
Assignees

Comments

@cielf
Copy link
Collaborator

cielf commented Jul 14, 2024

Summary

Limit the partners in the partner dropdown when producing a new distribution to active partners.

Why

Reduction of possible errors, just makes it easier for the banks.

Details

On new distributions only, the partners in the partner dropdown should include only active partners. They can be any other status than "Deactivated".
We still need to be able to access the deactivated partners when editing.

Criteria for completion

  • Deactivated partners do not appear in the partner dropdown on new distributions - though they do on editing a distribution. (You might be editing a distribution from an inactive partner)
  • Tests to confirm that behaviour
@cielf cielf added Help Wanted Groomed + open to all! Difficulty—Beginner labels Jul 14, 2024
@awwaiid awwaiid modified the milestone: Tasks 2024 Jul 28, 2024
@cielf cielf changed the title Inactive partners should not appear in the dropdown when producing a new distribution. Deactivated partners should not appear in the dropdown when producing a new distribution. Aug 18, 2024
@ewoknock
Copy link
Contributor

Hi, I'd like to take a shot at this issue if no one has started working on it yet.

@cielf
Copy link
Collaborator Author

cielf commented Aug 25, 2024

Sure thing!

@github-actions github-actions bot removed the Help Wanted Groomed + open to all! label Aug 25, 2024
@ewoknock
Copy link
Contributor

I've written code to modify the query for the dropdown found in the distributions/form partial and have also manually tested it by deactivating some partners and visually checking that the new view does filter out deactivated partners while the edit view keeps them in.
I did have a question about writing tests for this. Where do we write rspec tests for views? and how exactly would you write one to test if the dropdown is populated correctly?

@cielf
Copy link
Collaborator Author

cielf commented Aug 26, 2024

@dorner Could you field the above question? Thanks.

@ewoknock
Copy link
Contributor

ewoknock commented Sep 4, 2024

I was able to figure out my question about the tests and have created a pull request.
Sorry about the double pull requests. I forgot to rebase first and the first pull request pulled in a bunch of other commits so I cleaned up my branch and then made a new pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment