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

Deleted user appears as "Failed to execute the [useravatar] macro" #48

Closed
ane-gabriela opened this issue Sep 19, 2019 · 6 comments
Assignees
Milestone

Comments

@ane-gabriela
Copy link

@ane-gabriela ane-gabriela commented Sep 19, 2019

Steps to reproduce:

  1. Log in as Admin
  2. Create a poll on a main wiki or subwiki
  3. As 2/3 simple users vote
  4. Log in as Admin again
  5. Delete a user that voted
  6. Observe the results in the Poll

Expected results: The name of the user still appears grayed out.

Actual results: "Failed to execute the [useravatar] macro. Cause: [User [XWiki.user02] is not registered in this wiki]. Click on this message for details"

11.7:
11 7BeforeDeleteUser
11 7AfterRemoval

10.11.9:
10 11 9-DeletedUser

Environment: Windows 10, XWiki 10.11.9 Standard and 11.7 with MySQL 5.7 and Edge 18

@ane-gabriela ane-gabriela added this to the 1.11 milestone Sep 19, 2019
@CamiAndrei

This comment has been minimized.

Copy link

@CamiAndrei CamiAndrei commented Oct 8, 2019

The deleted users are counted in the users tab, the same as their votes. Should they be counted?
65269433-d4acaa00-db21-11e9-8b59-d802b87c4de4

@oanalavinia

This comment has been minimized.

Copy link

@oanalavinia oanalavinia commented Oct 8, 2019

IMO the user shouldn't be counted or displayed, as long as he was deleted with a purpose. Considering also the fact that those votes are not deleted, just not displayed (the object is not erased).
If it is to keep counting him, that could also influence the winner of the poll.

There are several general use cases for a poll, like choosing a place to go, or some benefits inside a company, where it would be hard to follow the votes if they contain deleted users.

@ane-gabriela

This comment has been minimized.

Copy link
Author

@ane-gabriela ane-gabriela commented Oct 8, 2019

This ticket was raised as it was an issue for a client. The expectation he had was that once the user was deleted, as in the past, the name was grayed out but the votes would still appear there, as counted.

@CamiAndrei

This comment has been minimized.

Copy link

@CamiAndrei CamiAndrei commented Oct 8, 2019

What about the Polls with the "Finished" status? Should the same behaviour be applied?
I have identified 3 cases:

  1. If the poll's status is "Active", you don't want to take into account the deleted users. As mentioned by Lavinia, that could also influence the winner of the poll.
  2. If the poll has the status "Finished" and the action that should be decided didn't took place, you don't want to display the deleted users.
  3. But if the status is "Finished" and the action already took place ( the poll is keep as history), you want to display the deleted user too.
    The only issue is that between 2 and 3 now is no method to mark them differently (for example "Approved" and "Applied" ).
@oanalavinia

This comment has been minimized.

Copy link

@oanalavinia oanalavinia commented Oct 8, 2019

If the polls class has no date to set, as you don't always vote for something that will take place in a specific time, then maybe is a valid idea to only consider 2 cases, "Active" with just active users at that moment and "Finished", containing those users that were deleted after the vote was closed.

@silviamacovei

This comment has been minimized.

Copy link

@silviamacovei silviamacovei commented Oct 8, 2019

IMO it makes sense that for the “Finished” state the users are grayed out and the votes still appear and are counted (as Gabi mentioned). Even if the action that was decided on didn’t take place, we would still display the deleted users in gray and count their votes. We don’t have visibility on why the voted action didn’t take place anymore.

For the “Active” state, inactive users shouldn’t be displayed and counted IMO, since the Poll doesn’t concern them anymore. Since the result won’t impact them, they shouldn’t be impacting the result either.

CamiAndrei added a commit to CamiAndrei/application-xpoll that referenced this issue Oct 9, 2019
CamiAndrei added a commit to CamiAndrei/application-xpoll that referenced this issue Oct 10, 2019
CamiAndrei added a commit to CamiAndrei/application-xpoll that referenced this issue Oct 10, 2019
CamiAndrei added a commit to CamiAndrei/application-xpoll that referenced this issue Oct 14, 2019
oanalavinia added a commit that referenced this issue Oct 14, 2019
Deleted user appears as "Failed to execute the [useravatar] macro" #48
@CamiAndrei CamiAndrei closed this Oct 14, 2019
@acotiuga acotiuga modified the milestones: 1.11, 1.10.10, 2.0 Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.