Skip to content

Api: Add event severity details on appeal api#2685

Merged
susilnem merged 2 commits intoproject/surge-eru-updatefrom
feat/add-event-severity-level-on-appeal-api
Mar 18, 2026
Merged

Api: Add event severity details on appeal api#2685
susilnem merged 2 commits intoproject/surge-eru-updatefrom
feat/add-event-severity-level-on-appeal-api

Conversation

@sudip-khanal
Copy link
Contributor

Changes

  • Add event details like id,name severity level on appeal api

Checklist

Things that should succeed before merging.

  • Updated/ran unit tests
  • Updated CHANGELOG.md

Release

If there is a version update, make sure to tag the repository with the latest version.

"name",
"ifrc_severity_level",
"ifrc_severity_level_display",
"disaster_start_date",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we need this.
We might need when severity level was changed.

country = MiniCountrySerializer(read_only=True)
dtype = DisasterTypeSerializer(read_only=True)
region = RegionSerializer(read_only=True)
event = EventMiniSerializer(source="appeal.event", read_only=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing this might cause issues in the frontend where we are using event id from this. Double check with FE @shreeyash07 , if this causes any issues.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be safe, we can rename this to event_details or something.

"name",
"ifrc_severity_level",
"ifrc_severity_level_display",
"updated_at",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you verify if this is the field actually used to track the severity changes? or if incase we need this??

ifrc_severity_level_update_date

ifrc_severity_level_update_date = models.DateTimeField(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to take this from the other model used to save history.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ifrc_severity_level_update_date field tracks the date when the severity level changes. We don’t need this information for now, but I’ve added the field in the event details as it may be useful in the future.

@sudip-khanal sudip-khanal force-pushed the feat/add-event-severity-level-on-appeal-api branch from 631da5d to 0ba5f97 Compare March 18, 2026 06:52
@sudip-khanal sudip-khanal force-pushed the feat/add-event-severity-level-on-appeal-api branch from 0ba5f97 to 597c8fa Compare March 18, 2026 09:58
@susilnem susilnem marked this pull request as ready for review March 18, 2026 10:35
@susilnem susilnem merged commit cb2a836 into project/surge-eru-update Mar 18, 2026
3 checks passed
@susilnem susilnem deleted the feat/add-event-severity-level-on-appeal-api branch March 18, 2026 10:36
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 this pull request may close these issues.

4 participants