[5086] Rename executive director to contacts
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
- Bug fix (non-breaking change which fixes an issue)
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
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.
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 https://github.com/rubyforgood/human-essentials/blob/fc95a66c28112b500409b483432286154ca28bd8/app/views/organizations/_details.html.erb#L125
<% for partner_form_field in @organization.partner_form_fields %>
<li>
<%= partner_form_field %>
<%= display_partner_fields_value(partner_form_field) %>
</li>
<% end %>
I'am looking at the migration and it shouldn't cause a empty ,, that seems strange.
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."
For clarity, It's not production data -- it's the production branch
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.
@edwinthinks
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? Alternatively, we would need to rework the partner profile edits, and the partner's profile view.
Yep we can do it to retain the order for sure. Thanks @cielf
Hey @edwinthinks -- I'm stepping back to being an IC, and am looking to attack the abandoned PRs. This looks like one to me, but if you want to step in in the next couple of days to finish it off, that would be great.