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

Migration of Field Report Data for Dynamic Title Suffixes #2332

Open
samshara opened this issue Dec 5, 2024 · 0 comments
Open

Migration of Field Report Data for Dynamic Title Suffixes #2332

samshara opened this issue Dec 5, 2024 · 0 comments
Assignees
Labels
DFS DFS implements/leads the implementation

Comments

@samshara
Copy link
Member

samshara commented Dec 5, 2024

We need to migrate legacy field report data where the suffixes were previously stored in the summary field. The task is to identify the field report with the highest #(field report number) suffix for a specific event and country, and assign this number to the fr_number field for that report. For all other reports within the same event and country, their fr_number should be set to null.

Additionally, we need to account for the possibility that the actual fr_number for an event and country might be higher than the highest number derived from the suffixes. This can occur if duplicate suffixes exist. In such cases, the highest number between the derived fr_number and the actual fr_number should be selected.

Requirements:

  1. Identify the highest #(field report number) suffix for each event and country from the old summary field.
  2. Assign the highest number (either from the suffix or the actual fr_number) to the fr_number field for the appropriate field report.
  3. Set the fr_number to null for all other reports within the same event and country.
  4. Ensure that the migration handles duplicate suffixes correctly by selecting the maximum of the actual_fr_number and the highest derived fr_number.

Acceptance Criteria:

  1. Only the field report with the highest suffix (or actual number) should have its fr_number updated.
  2. All other field reports within the same event and country should have fr_number set to null.
  3. The highest value between the derived number and the actual_fr_number should be used.
@samshara samshara added the DFS DFS implements/leads the implementation label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DFS DFS implements/leads the implementation
Projects
None yet
Development

No branches or pull requests

3 participants