Feature #35365

Allow sending account information when importing users

Added by Go MAEDA about 1 month ago. Updated 26 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Importers
Target version:5.0.0
Resolution:Fixed

Description

Currently, the user import feature (#33102) does not have a feature to send account information to newly created users. Since there is a "Send account information to the user" checkbox when adding users one by one from the web UI, I think there should be the same kind of feature for importing from CSV.

The "Import users" screen already has a "Send email notifications during the import" checkbox (#22771, currently not working when importing users). I think it would be better if the account information is sent when this checkbox is turned on.

35365.patch Magnifier (1.45 KB) Yuichi HARADA, 2021-06-15 08:58

Associated revisions

Revision 21058
Added by Go MAEDA 26 days ago

Allow sending account information when importing users (#35365).

Patch by Yuichi HARADA.

History

#1 Updated by Yuichi HARADA about 1 month ago

Go MAEDA wrote:

The "Import users" screen already has a "Send email notifications during the import" checkbox (#22771, currently not working when importing users). I think it would be better if the account information is sent when this checkbox is turned on.

+1
"Send email notifications during the import" checkbox didn't work, but it works with the following patch.

diff --git a/app/models/user_import.rb b/app/models/user_import.rb
index 71407c14e..609c9b078 100644
--- a/app/models/user_import.rb
+++ b/app/models/user_import.rb
@@ -115,4 +115,8 @@ class UserImport < Import
     object.send(:safe_attributes=, attributes, user)
     object
   end
+
+  def extend_object(row, item, object)
+    Mailer.deliver_account_information(object, object.password) if yes?(settings['notifications'])
+  end
 end

#2 Updated by Go MAEDA about 1 month ago

  • Target version set to Candidate for next major release

#3 Updated by Go MAEDA 29 days ago

  • Target version changed from Candidate for next major release to 5.0.0

Setting the target version to 5.0.0.

#4 Updated by Go MAEDA 26 days ago

  • Subject changed from Allow sending account information to the user when importing users to Allow sending account information when importing users
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you for your contribution.

Now you can send account information if you check the "Send email notifications during the import" checkbox on the user import dialog.

Also available in: Atom PDF