-
-
Notifications
You must be signed in to change notification settings - Fork 544
[5086] Rename executive director to contacts #5158
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
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,27 @@ | |||
class MigrateOrganizationPartnerFormFieldsExecutiveDirectorToContacts < ActiveRecord::Migration[8.0] | |||
class Organization < ApplicationRecord |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlikely the Organization name would change, but this is a way to allow us to use the model name in the migration.
@@ -34,6 +34,11 @@ def partial_display_name(partial) | |||
'attached_documents' => 'Additional Documents' | |||
} | |||
|
|||
# TODO: temporary change of name for the contacts partial before migration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this is merged and deployed, we can remove these extra bits of code.
Hey @edwinthinks -- Thanks for taking this on! I'm busy with family obligations Sunday, so probably won't get to kicking the tires on this until at least Monday. I'll let @dorner make the call on tests, but I did notice that you haven't updated the user guide, and it looks like the linter is failing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @edwinthinks -- I see you've marked this WIP in the meantime, but I took a look anyway. Functionally it's close, but I did see a couple of things to adjust.
Summary
I think there's a mismatch between the change in the migration and how the organization view/edits pick up the list of partner profile edits, and that you missed changing the bank's partner view from executive director to contacts
Details/Recreation
For recreating the following, I started with the production branch, ran a fresh bin/setup, then picked Area Served, Executive Director, Pickup Person for the Partner Profile sections. Then I switched to this branch and ran the migration.
1/ "Contacts" is not showing up within the Partner Profile sections in the Organnization view -- but there's a blank entry where Executive Director was:
1a/ If I go into edit, "Contacts" is missing in the Partner Profile sections field
FWIW, I think it's stored -- just not showing up properly, because the partner profile functionality works at this point.
2/ The partner's view of their profile initially looks right, but the bank's view is missing the "Contacts" label:
3/ Next, on your branch, I selected "Area Served, "Contacts" and "Pickup Person" and saved the organization.
The bank's partner profile view now doesn't show the contacts -- I suspect it's still working off of executive_director. The rest seems to be working.
#Thoughts/theories on the weirdness
I'm wondering if a/ the migration removes "executive_director" from a string that contains a comma-separated list, leaving a ",," in it and b/ the organization view and edits' treatment of the Partner Profile section is sensitive to the order of the elements -- so it doesn't pick up on "Contacts" at the end of the list.
Anyway, If you solve those issues, and the user guide, we can pass it to @dorner for any technical input.
Thanks for the review @cielf ; I'll take a look into addressing those. |
@cielf fixed everything except that thing you saw when you ran it in production. Any chance you can tell me what the output of that loop value is. In
I'am looking at the migration and it shouldn't cause a empty |
Hey @edwinthinks -- Did you try the sequence I specified to recreate it? I have a busier than usual week this week, so I might not be able to get back to this until Friday. |
@cielf I don't believe I can since I don't have production data? And sure no rush :) |
@edwinthinks For clarity, It's not production data -- it's the production branch (though the main branch should work as well). We don't have this situation in the default data, so we need to create it before running the migration to test it. "For recreating the following, I started with the production branch, ran a fresh bin/setup, then picked Area Served, Executive Director, Pickup Person for the Partner Profile sections. Then I switched to this branch and ran the migration." |
Ahh thanks, @cielf I was confused about that one. I'll try to replicate the issue then. |
Hey @cielf; I followed your steps to replicate the issue and was unable to get it what you were seeing. This would happen if you ran the migration and then went back to production branch. After migration are you staying on this branch? Maybe a restart might work? Thanks! |
It's plausible. I'll try to re-recreate. |
Ok. That seems to be working. Sorry about the mixup. |
Nit: The order on the view is not right after the migration, though it corrects itself the first time you save the organization. |
It looks like the order of the partial names is a bigger problem than that, though. By appending "Contacts" to the list, instead of replacing it in the same order, we end up changing the order of the partials in the partner profile edits, and the partner's view of their profile, though not in the bank's view of the partner's profile. That's not a desirable side-effect - could be confusing to the users. And it would change back when the organization was saved (I'm pretty sure - haven't tested it.) Is it workable to do the migration in a way that the order is preserved? |
Yep we can do it to retain the order for sure. Thanks @cielf |
Resolves #5086
Description
I can see that we wanted to change this from saying "Executive Director" since the field inside contains general contact information.
This includes some "scaffold" or temporary code that would be removed once migration goes out. For example, the executive director partials.
Type of change
How Has This Been Tested?
Manually testing my migration and clicking through the application. I think this doesn't really need an additional system test since I think this isn't likely to break.
Screenshots