bcgov / performance

Performance
Apache License 2.0
0 stars 2 forks source link

An employee should not be shared with their direct supervisor or shared with the same supervisor multiple times #905

Closed Travis-A-Clark closed 1 year ago

Travis-A-Clark commented 1 year ago

Currently, an employee can show up as both a direct report and a shared employee for a supervisor. The employee can also be shared with the same supervisor multiple times. This means that they can appear multiple times in areas like the Conversation participant dropdown list, the Shared With or Audience fields of goals.

We need to develop a process to:

1) Stop employees from being shared with their direct supervisor 2) Stop sharing employees that become direct reports at a later date (for example, employee A is shared with me in February; employee A then officially moves to my team in PeopleSoft in March and therefore shows up as my direct report; employee A should no longer be my shared employee) 3) Stop creating duplicates of shared employees that already exist (for example, if employee B is already shared with me, and someone tries to share employee B with me again, there should be no change made).

This process should apply to all shares created by supervisors, HR admins, or Sys admins.

Travis-A-Clark commented 1 year ago

@jizhaogit I added an additional item to the issue to prevent employees from being shared multiple times with the same supervisor. Let me know if you have any questions. Thanks!

jizhaogit commented 1 year ago
  1. Stop employees from being shared with their direct supervisor - done
  2. Stop sharing employees that become direct reports at a later date (for example, employee A is shared with me in February; employee A then officially moves to my team in PeopleSoft in March and therefore shows up as my direct report; employee A should no longer be my shared employee) - a schedule job to clean up this case after ods data pulling? or modify ods data pulling to stop those sharing relationship?
  3. Stop creating duplicates of shared employees that already exist (for example, if employee B is already shared with me, and someone tries to share employee B with me again, there should be no change made). - done
jizhaogit commented 1 year ago

@telusdcinco please help do the code review about #1 and #3 and we can talk about #2 in the meeting or in our conversation

@jizhaogit Looks ok to migrate.

SSubashree26 commented 1 year ago

@jizhaogit Hi Ji,

Observation 1: Noticed that the audience name is being repeated if a direct employee is shared to the same supervisor (while creating a goal from the goal bank) Data : For user Amy Miller

Screenshot 2023-02-22 at 6.38.26 PM.png

Observation 2: Also noticed that if an employee is being shared to the same supervisor again and again, the "Employee Profile Sharing" section displays repeated the information too.Screenshot 2023-02-22 at 6.42.21 PM.png

@Travis-A-Clark Can you please let us know if this redundant information has to be displayed for observation 2? (My Team > Team members > Shared )

jizhaogit commented 1 year ago

added the same validation to system admin sharing and supervisor team member sharing.

steffipravasi commented 1 year ago

@jizhaogit 1)Noticed a small typo issue while sharing a already shared employee with a non-direct supervisor by HRadmin and SysAdmin. Message must say 'Employee has "been" shared with the selected supervisor. Please review and try again!' Screenshot 2023-03-01 at 11.59.46 AM.png

2)Suggesting if we should change the message from 'Sharing Failed' to a more descriptive text just like the message error displayed in Issue 1. Screenshot 2023-03-01 at 11.57.13 AM.png

jizhaogit commented 1 year ago

@steffipravasi @Travis-A-Clark Could you please help provide the content of the message for issue #2? thanks. please note we cannot use issue #1 content directly because the direct report team member will also cause the sharing process to be failed.

Travis-A-Clark commented 1 year ago

@steffipravasi @jizhaogit For the two scenarios let's use the warning message:

1) The employee has already been shared with that supervisor. They cannot be shared with the same supervisor more than once.

2) The employee already reports directly to that supervisor. Employees cannot be shared with their direct supervisor.

jizhaogit commented 1 year ago
steffipravasi commented 1 year ago

@jizhaogit The warning messages has been updated on the Team Members page. Can we please update those 2 messages in HR Admin and SysAdmin - Share Employees page.

jizhaogit commented 1 year ago

message updated for sysadmin/hradmin employee sharing pages

steffipravasi commented 1 year ago

Ticket has been validated. Messages are now updated for HR admin and Sys admin Screenshot 2023-03-13 at 11.14.25 AM.png Screenshot 2023-03-13 at 11.06.21 AM.png Moving ticket to PO review

Travis-A-Clark commented 1 year ago

@steffipravasi I am getting the wrong error message when I try to share an employee (Cathy May) with Travis Clark. The error message should be "The employee has already been shared with that supervisor. They cannot be shared with the same supervisor more than once." Instead I am seeing the other error message about direct supervisors (see below). Can you verify that the right message is displayed in each scenario? Thanks!

image.png

jizhaogit commented 1 year ago

@Travis-A-Clark @steffipravasi it is a copy/paste error when i update the latest message for the "my team member" sharing process. a fix is applied for fixing this error in the test. thanks!

steffipravasi commented 1 year ago

Ticket validated. For direct supervisors: The employee already reports directly to that supervisor. Employees cannot be shared with their direct supervisor. For shared employees: The employee has already been shared with that supervisor. They cannot be shared with the same supervisor more than once. Validated at: My Team members, HRadmin-share, Sys admin - share

Travis-A-Clark commented 1 year ago

@steffipravasi I just logged in as Sys Admin and shared an employee (Heather Davey) with Jessica Wu. It was the first employee shared with Jessica, but I still received the error message that the employee had already been shared and couldn't be shared again.

The process worked and Jessica has access to Heather, but the error message shouldn't have been displayed.

One additional piece of context is that Jessica has HR and Sys Admin access as well. I don't know if that is impacting the result. Can you take a look? Thanks!

jizhaogit commented 1 year ago

i deleted the share relation about Davey,Heather and Wu,Jessica Hsin-Jung and tried to reproduce what @Travis-A-Clark did but can't get the warning message.

@steffipravasi would you please try from your end and we can talk if you can reproduce the issue? thanks.

Travis-A-Clark commented 1 year ago

Looks like the warning message is gone. Steffi to confirm.

steffipravasi commented 1 year ago

@jizhaogit I Only noticed the error when the Share button in the pop-up confirmation modal is clicked multiple times. Can we restrict the user(HrAdmin/SysAdmin) to be allowed to click the Share button only once?

jizhaogit commented 1 year ago

@steffipravasi the quick multi-time clicking issue should be handled. would you take it a try? thanks!

steffipravasi commented 1 year ago

Issue still occurring on Test. Multiple clicks on Share button gives the user an error.

jizhaogit commented 1 year ago

javascript updated in hr/sys admin share employee modules.

steffipravasi commented 1 year ago

@jizhaogit We still got some issues here. The share button from the pop-up is hidden after one click, but the user can still click on Cancel or 'x' button or 'Share' button multiple times and we get the error 'The employee has already been shared with that supervisor. They cannot be shared with the same supervisor more than once.' https://bcgov.sharepoint.com/:v:/r/teams/02915/Shared%20Documents/General/Testing/905.mov?csf=1&web=1&e=hCkGUt

jizhaogit commented 1 year ago

@steffipravasi based on the video, I'm not very sure it is a UI issue. The form is submitted once the "share" button is clicked. even if a user close the modal while the submit process is running the form will still keep working.

my suggestion:
1) we may need a message in the modal to explain that the form is submitting, the user should not close the modal while it is processing. 2) remove the "cancel" button. I don't see any purpose to keep it there.

Please let me know if this can help improve user experience. thanks!

Travis-A-Clark commented 1 year ago

Ignore my last comment.

@jizhaogit Once someone has clicked "Share" in the confirmation modal, can we add a note that says: "Processing request. Please do not close this window."

If not, we can create a separate ticket for this and move it to lower in the priority list. There's lots of other stuff we need to get done!

jizhaogit commented 1 year ago

message added

steffipravasi commented 1 year ago

Ticket Validated. Message 'Processing request. Do not close the window' is displayed after clicking on the Share button in the popup dialog box. Screenshot 2023-04-04 at 1.48.02 PM.png

Travis-A-Clark commented 1 year ago

@steffipravasi for some reason, I am not seeing the errors on the Sys Admin > Sharing screen anymore when I create a duplicate share. I see the processing request pop-up and then it goes through as if everyone worked fine. No error message like the screenshots you posted on March 13. Can you confirm?

steffipravasi commented 1 year ago

@Travis-A-Clark I have confirmed that the errors are displayed for Sys Admin Screenshot 2023-04-13 at 9.11.12 PM.pngScreenshot 2023-04-13 at 9.13.02 PM.png Working fine on the team members too. Although due to the site giving 504 error, I couldn't verify the same for HR admin.

steffipravasi commented 1 year ago

Was able to verify the issue for HR admin as well Screenshot 2023-04-14 at 3.08.12 PM.pngScreenshot 2023-04-14 at 3.10.59 PM.png