update DataOperationFailure query to reflect table changes - #944
Conversation
e82e910 to
a9d9895
Compare
|
I don't think this is going to work correctly. Are we bringing in the |
ed2a1ad to
0f0a1d3
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The new FileGroupAnalysisJob lookup is used without null-safety, which can cause NullReferenceException and break the timeline endpoint when no analysis job exists yet.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR aims to fix SentEmail timeline errors by updating the backend timeline-building logic to align with updated database relationships (moving DataOperationFailure linkage from FileGroupID to FileGroupAnalysisJobID). It also includes a small navigation URL fix in the notification UI.
Changes:
- Update
SentEmailtimeline processing window to readProcessingStartTime/EndTimefrom the latestFileGroupAnalysisJob. - Update
DataOperationFailurelookup to query byFileGroupAnalysisJobIDinstead ofFileGroupID. - Fix category delete redirect URL composition in the Email Category page.
File summaries
| File | Description |
|---|---|
| Source/Applications/SystemCenterNotification/Scripts/TSX/EmailCategory/EmailCategoryPage.tsx | Adjusts post-delete navigation URL composition for Categories. |
| Source/Applications/SystemCenterNotification/Controllers/EmailTypeController.cs | Updates SentEmail timeline queries to use FileGroupAnalysisJob and the new DataOperationFailure foreign key. |
Review details
Suppressed comments (1)
Source/Applications/SystemCenterNotification/Controllers/EmailTypeController.cs:525
- This query assumes
fileGroupAnalysisJobRecordis non-null; if there is no analysis job yet,fileGroupAnalysisJobRecord.IDwill throw. Consider returning an empty failure set when the analysis job record is missing.
DataOperationFailure[] dataOperationFailureRecords = new TableOperations<DataOperationFailure>(connection).QueryRecordsWhere("FileGroupAnalysisJobID = {0}", fileGroupAnalysisJobRecord.ID).ToArray();
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Fix SentTimeline errors by updating DataOperationFailure