human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

[5086] Rename executive director to contacts

Open edwinthinks opened this issue 8 months ago • 14 comments

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

CleanShot 2025-04-20 at 12 23 45@2x

CleanShot 2025-04-20 at 12 23 50@2x

edwinthinks avatar Apr 20 '25 03:04 edwinthinks

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.

cielf avatar Apr 20 '25 06:04 cielf

Thanks for the review @cielf ; I'll take a look into addressing those.

edwinthinks avatar May 03 '25 22:05 edwinthinks

@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.

edwinthinks avatar May 03 '25 22:05 edwinthinks

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 avatar May 04 '25 01:05 cielf

@cielf I don't believe I can since I don't have production data? And sure no rush :)

edwinthinks avatar May 04 '25 05:05 edwinthinks

@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."

cielf avatar May 04 '25 13:05 cielf

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.

edwinthinks avatar May 04 '25 22:05 edwinthinks

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!

edwinthinks avatar May 05 '25 00:05 edwinthinks

It's plausible. I'll try to re-recreate.

cielf avatar May 05 '25 18:05 cielf

Ok. That seems to be working. Sorry about the mixup.

cielf avatar May 06 '25 15:05 cielf

Nit: The order on the view is not right after the migration, though it corrects itself the first time you save the organization.

cielf avatar May 06 '25 15:05 cielf

@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.

cielf avatar May 06 '25 15:05 cielf

Yep we can do it to retain the order for sure. Thanks @cielf

edwinthinks avatar May 07 '25 09:05 edwinthinks

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.

cielf avatar Aug 30 '25 21:08 cielf