bcgov / performance

Performance
Apache License 2.0
0 stars 2 forks source link

HR/ Sys Admin Function: Last Modified Date and Last Modified By columns in Goal Bank did not reflect the accurate HR Administrator details #1279

Closed jessicahjwu closed 1 month ago

jessicahjwu commented 4 months ago

HR/ Sys Admin Function: The "Last Modified Date" and "Last Modified By" columns in the goal bank are not pulling from the accurate data which reflects the HR Administrator information, business requirement is to have those two columns show the details of the when and who the HR Administrator made changes. Related to #1251.

telusdcinco commented 4 months ago

@jessicahjwu Please attach/add specific details when incorrect details was being displayed on the Last Modified Date/By in PDP Prod.

telusdcinco commented 4 months ago

Goal comment audit is being used for goal changes also. Updated to only limit looking at actual Goals.

telusdcinco commented 4 months ago

@jizhaogit Please review code changes.

jizhaogit commented 4 months ago

Thank you @telusdcinco changes look good to me.

jessicahjwu commented 4 months ago

Jane McKinnon is not one of the HR Administrators from SDPR, however, the last modified by and date appeared to be under her name:

image.png

Heather Thorturn is not one of the HR Administrators, but seemed to have duplicated the goal:

image.png
telusdcinco commented 4 months ago

MIGRATION NOTES:

Code change only.

steffipravasi commented 4 months ago

Test data: HR admin1: has access to Justice 000318 Harlow,J. Robert Bob.Harlow@gov.bc.ca HR admin2: has access to Justice & SDPR 001247 Lewke,Sandra Sandy.Lewke@gov.bc.ca HR admin3: has access to Justice & Citizen Services 002737 Halpert,Mary R Social Program Officer R24 Mary.Halpert@gov.bc.ca

Scenario1: Robert added a new goal - CareerGoalMay23 for the Justice org Last modified date & Last modified by column displays correct details : Yes Hr admin Mary added 10 individual audience from Citizen services to the goal Last modified date & Last modified by column displays correct details : No Last modified column still displays the record of Harlow,J. Robert

telusdcinco commented 4 months ago

@jessicahjwu @steffipravasi Currently, the Last Modified Date & Last Modified By columns depends on Audit entries generated when the actual Goal record is updated. Adding individual or organization audience does not trigger the generation of a Goal Bank audit entry, as these details are stored on a different table. It is possible to force the creation of an audit entry whenever an audience is added/removed from a Goal Bank. The audit should be then be picked up by the Last Modified Date/By column. This change will require a separate ticket.

steffipravasi commented 4 months ago

Test data for testing purpose:

HR admin1: has access to Justice 000318 Harlow,J. Robert Bob.Harlow@gov.bc.ca HR admin2: has access to Justice & SDPR 001247 Lewke,Sandra Sandy.Lewke@gov.bc.ca HR admin3: has access to Justice & Citizen Services 002737 Halpert,Mary R Social Program Officer R24 Mary.Halpert@gov.bc.ca HR admin 4: has access to Citizen Services 000164 Richmond,Dave Dave.Richmond@gov.bc.ca

Non- HR admin from Justice org: 000297 Schultz,Michael Michael.Schultz@gov.bc.ca 135215 Froehlich,Sherry Sherry.Froehlich@gov.bc.ca From SDPR: 001247 Lewke,Sandra

Robert added a new goal - CareerGoalMay23 for the Justice org

Scenario1: Michael adds the goal to his current goals from goal bank Last modified date & Last modified by column displays Robert’s details : yes

Scenario 2: Michael editing the goal from his current goals page Last modified date & Last modified by column displays Robert’s details : yes

Scenario 3: Sherry adds the goal to goal bank and shares the goal with Sandra Sandra and Sherry adds comments to the goal Last modified date & Last modified by column displays Robert’s details : yes

Scenario 4: Sandra tries to access the link https://performance-332842-test.apps.silver.devops.gov.bc.ca/hradmin/goalbank/editdetails/1369 Expected is Sandra will not be able to access the goal: Last modified date & Last modified by column displays Robert’s details : yes

Scenario 5: Removed HR access for Sandra. Sandra tries to access the link https://performance-332842-test.apps.silver.devops.gov.bc.ca/hradmin/goalbank/editdetails/1369 Expected is Sandra will not be able to access the goal: Last modified date & Last modified by column displays Robert’s details : yes

Scenario6: Hr admin Mary made edits to the goal Last modified date & Last modified by column must display MAry’s details : yes

Scenario 7: Dave tries to access the link https://performance-332842-test.apps.silver.devops.gov.bc.ca/hradmin/goalbank/editdetails/1369 Expected is Dave will not be able to access the goal: Last modified date & Last modified by column must display Mary’s details : yes