Opened 5 years ago

Last modified 3 months ago

#6405 accepted enhancement

When deleting users without any links/posts, don't ask to whom they should be reattributed

Reported by: markjaquith Owned by: rajnikmit
Priority: normal Milestone: Future Release
Component: Users Version: 2.7
Severity: normal Keywords: has-patch needs-refresh
Cc: wojtek.szkutnik@…, bmay@…

Description

When deleting a user, it asks to whom their links/posts should be reattributed (or if they should be deleted). We can skip this screen if they don't have any links or posts.

Attachments (3)

users.patch (12.4 KB) - added by rajnikmit 3 years ago.
6405.diff (4.2 KB) - added by wojtek.szkutnik 3 years ago.
users.diff (2.9 KB) - added by benjmay 3 months ago.

Download all attachments as: .zip

Change History (14)

  • Keywords needs-patch added
  • Version changed from 2.5 to 2.7
  • Component changed from Administration to Users
  • Milestone changed from 2.9 to Future Release
  • Owner changed from anonymous to rajnikmit
  • Status changed from new to accepted

comment:4 in reply to: ↑ description   rajnikmit3 years ago

  • Keywords has-patch added; needs-patch removed

Hi,
I added a patch.Please check it and let me know.

  • Keywords needs-patch added; has-patch removed

Please create a diff against trunk. That patch removes a significant amount of code that was recently committed, and therefore I have no idea what you changed.

Please review your diffs pre/post upload. It would have been rather obvious to realize that you were suggesting so many changes.

  • Cc wojtek.szkutnik@… added
  • Keywords has-patch needs-testing added; needs-patch removed

The previous one seems a little inefficient, this one should do a better job.

  • Keywords gsoc added

See also ticket #23224 Delete Users: selecting a username should select the “Attribute all posts to” radio button

#23730 was marked as a duplicate.

  • Keywords needs-refresh added; needs-testing gsoc removed
  • Cc bmay@… added

I put a quick proof of concept together, essentially checking that any of the user(s) about to be deleted have any kind of post, and if they don't, just show a hidden input to run the default delete action on the next step, rather than re-assign.

I also put a check on the jQuery in the header, that if that hidden field exists, it doesn't disable the submit button.

I'm not sure if a text line with words to the effect of "This user has no posts that need to be dealt with" - incase they are expecting those two options.

Note: See TracTickets for help on using tickets.