Skip to content

Add external source fields in event #2760

Draft
sudip-khanal wants to merge 1 commit into
developfrom
feat/update-event-creation-logic-from-field-report
Draft

Add external source fields in event #2760
sudip-khanal wants to merge 1 commit into
developfrom
feat/update-event-creation-logic-from-field-report

Conversation

@sudip-khanal

Copy link
Copy Markdown
Contributor

Changes

  • Add auto_generated_external_source field to Event
  • Add auto_generated_external_source_id field to Event
  • Add external_source field to FieldReport
  • Add external_source_id field to FieldReport
  • Set both fields during automatic event creation from a FieldReport

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.

…m field report

- Added auto_generated_external_source field to Event
- Added auto_generated_external_source_id field to Event
- Set both fields during automatic event creation from a FieldReport
@sudip-khanal sudip-khanal force-pushed the feat/update-event-creation-logic-from-field-report branch from 8643590 to d6b5ff6 Compare June 10, 2026 08:44
@sudip-khanal sudip-khanal requested a review from susilnem June 10, 2026 08:52

@susilnem susilnem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just some queries!

Comment thread api/models.py
help_text=_("External source or system from which the original event data originated."),
)
# Identifier of the originating event record in the external system
auto_generated_external_source_id = models.CharField(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Any reason for using CharField here?

This looks like it should be a UUID field.

If this value is always expected to be a UUID, would it be possible to use a UUIDField instead? That would provide built-in validation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In the MRCS site, we are not using UUIDs for the id field. If it’s coming externally as a UUID, we can switch to a UUIDField. @frozenhelium can you also confirm this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Correct!

Comment thread api/models.py
)

# External system or source from which the event data originated
auto_generated_external_source = models.CharField(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we even need these fields here in the event table? Do we need filtering for this features?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, we may need these for filtering in the future. @frozenhelium , can you also confirm this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's correct!

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.

3 participants