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

PDP Prod Issue: Error 500 displayed when exporting conversations in Employee Record page #1386

Closed
telusdcinco opened this issue Dec 20, 2024 · 13 comments
Assignees
Labels
bug Something isn't working PO Approved PO has reviewed and approved Priority

Comments

@telusdcinco
Copy link
Collaborator

After implementing #1379 to Production Error 500 displayed when exporting conversations in Employee Record page for select employees like EE 061623.

image.png

@telusdcinco telusdcinco added bug Something isn't working Priority labels Dec 20, 2024
@telusdcinco telusdcinco self-assigned this Dec 20, 2024
@telusdcinco
Copy link
Collaborator Author

The employee demographics record for EE 061623 has a dept ID 100-3507. The employee demo department ID is mapped to an Org ID by the nightly process for pulling the employee demographics from ODS.

PDP retrieves department information from PDP thru another nightly process for generating department tree. 100-3507 is no longer available in the currently generated tree. This may happen due to re-orgs within BC Gov.

In Employee Record page, Org ID is used to retrieve the 4-level departments, and is currently required to retrieve the necessary details displayed in the PDF file. The open and closed conversations does not display the 4-level departments. The 4-level department details seems to be not required or may be optional for the generated PDF.

The export displays the error 500 when the 4-level dept details is not found, due to missing Org ID. The issue may not be limited to EE 061623. This issue could potentially happen to other employees with mismatching dept ID to 4-level depts.

The 500 Server Error is NOT a result of the #1379 change.

The simplest fix is to make the 4-level dept optional (or not required) in the Export PDF.

telusdcinco added a commit that referenced this issue Dec 27, 2024
…issing 4-level depts

ZenHub #1386 - Fix join issue in PDF export for Employee Record for missing 4-level depts
@telusdcinco
Copy link
Collaborator Author

@jessicahjwu

Issue replicated in Test, after syncing employee demo details.

image.png

telusdcinco added a commit that referenced this issue Dec 27, 2024
…issing 4-level depts

ZenHub #1386 - Fix join issue in PDF export for Employee Record for missing 4-level depts
@telusdcinco
Copy link
Collaborator Author

@jessicahjwu I've deployed the fix in Test. The export button is working again.

@telusdcinco
Copy link
Collaborator Author

@jessicahjwu Training data for 061623 is now setup like in Prod. Training is setup with a higher debug setting. Does not show Error 500, but shows the actual error in the PHP code.

@jessicahjwu
Copy link
Collaborator

jessicahjwu commented Dec 30, 2024

@telusdcinco Not sure why the error shows for PHP code but can we have it fixed? I'd also like to see if we can manually do the following in Test and Training so I can validate the function (as 061623 did not have any completed conversations in Test/Training):

Scenario 1 - Past Employee with a department ID that's no longer existing

  1. Put 163102 (Travis Clark) back to dept 100-3507 (in both Test and Training)
  2. Manually add a date_deleted for 163102 (In both Test and Training)
  3. After testing is completed and confirmed working as expected, revert the changes and link 163102 back to his current department 100-3547

Scenario 2 - Past Employee with a valid department ID

  1. Manually add a date_deleted for EE ID 062149 (Zehra Leroy)
  2. After testing is completed and confirmed working as expected, revert the changes and link 163102 back to her current department 100-3527

@telusdcinco
Copy link
Collaborator Author

@jessicahjwu

Updates in Test and Training:

EE 163102 updated to dept 100-3507 and date deleted of Jan 1 2024.
EE 062149 updated with date deleted of Jan 1, 2024.

The following processes ran manually for above changes to reflect across pages.

  • php artisan command:SyncUserProfile;
  • php artisan command:UpdateGUIDByEmployeeId;
  • php artisan command:AutoRemoveAccess;
  • php artisan command:PopulateAuthUsers;
  • php artisan command:PopulateAuthOrgs;
  • php artisan command:SetNextLevelManager;
  • php artisan command:BuildAdminOrgUsers;
  • php artisan command:CalcNextConversationDate;
  • php artisan command:BuildEmployeeDemoTree;
  • php artisan command:PopulateEmployeeManagersTable;
  • php artisan command:PopulateUsersAnnexTable;
  • php artisan command:PopulateOrganizationStatistics;
  • php artisan command:CleanShareProfile;
  • php artisan command:MaintainLogs;

Checking with Warren on why Training is displaying debug page when this error occurs, instead of the generic Error 500 page. This issue is limited to Training only. Test and Prod are following the correct behavior as defined in the config file.

@jessicahjwu
Copy link
Collaborator

If the PHP coding error doesn't affect Prod nor our testing to this specific item, let's not dig deeper for now.

@jessicahjwu jessicahjwu added the PO Approved PO has reviewed and approved label Dec 31, 2024
@jessicahjwu
Copy link
Collaborator

jessicahjwu commented Dec 31, 2024

Just a thought - since there are also possibilities to different levels of re-orgs, and since the PDFs are not displaying any departmental information other than the two participant names - I'm wondering if it's possible to make pulling all levels of work unit information optional for past employees to avoid similar issues from happening?
This is how it looks like when pulling a past employee records in MyPerformance:
image.png

@telusdcinco
Copy link
Collaborator Author

@jessicahjwu The 4-level dept pulling is now optional for Employee Records export function.

telusdcinco added a commit that referenced this issue Dec 31, 2024
…issing 4-level depts

ZenHub #1386 - Fix join issue in PDF export for Employee Record for missing 4-level depts
@telusdcinco
Copy link
Collaborator Author

@jessicahjwu Deployed to Training. Ready for your validation.

@jessicahjwu
Copy link
Collaborator

Confirmed function working properly as expected, error message did not appear in Training for both scenarios: past employee with an non-existing department ID and past employee with a valid department ID.

telusdcinco added a commit that referenced this issue Jan 2, 2025
…issing 4-level depts

ZenHub #1386 - Fix join issue in PDF export for Employee Record for missing 4-level depts
@telusdcinco
Copy link
Collaborator Author

MIGRATION NOTES:

Code change only.

@telusdcinco
Copy link
Collaborator Author

@jessicahjwu Deployed to Prod. App pods restarted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PO Approved PO has reviewed and approved Priority
Projects
None yet
Development

No branches or pull requests

2 participants