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

Migrate Affiliation to Insitutions #866

Closed
chigby opened this issue Mar 11, 2020 · 0 comments · Fixed by #865
Closed

Migrate Affiliation to Insitutions #866

chigby opened this issue Mar 11, 2020 · 0 comments · Fixed by #865

Comments

@chigby
Copy link
Contributor

chigby commented Mar 11, 2020

Based on a conversation with @KAMcCudden and @harrislapiroff

When we created the Institution model (see #776), we overlooked the affiliation field on the IncidentPage model, which is made redundant by it. This affiliation data is the same underlying concept as a targeted institution. Since we have a fair number of incident pages with affiliations, we should write code to copy that existing data to the Institution model and populate the corresponding associations between incidents, targeted journalists, and targeted institutions in order to:

  1. Allow auto-complete for targeted institutions and targeted journalist institutions to search through existing affiliations.
  2. Save time compared with manually copying affiliation data into the new format.

Other notable considerations:

  1. Right now the default affiliation is "Independent." The new default will simply be a blank field for targeted institution and for the institution on targeted journalists.
  2. Nothing about the layout or design of the new institution or targeted journalist fields should change
  3. For incident pages with affiliation data but without any specific targeted journalists, the data should be copied into the targeted_institution field as a fallback.
  4. If a targeted journalist already has been given an institution, the affiliation field data should not be copied over that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant