Generic Admin Import Support#1699
Conversation
…tiple entity types. - Renamed Admin::LeadsController to Admin::ImportsController. - Genericized import logic to support Lead, Account, Campaign, Opportunity, Contact, and Task. - Updated routes and settings to reflect the rename. - Renamed and updated views to include an entity type selector. - Updated locales with generic import keys and added missing model pluralizations. - Updated and renamed specs to cover multiple entity types. Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
| redirect_to admin_imports_path and return | ||
| end | ||
|
|
||
| klass = params[:klass].classify.constantize rescue nil |
| redirect_to admin_imports_path and return | ||
| end | ||
|
|
||
| klass = params[:klass].classify.constantize rescue nil |
| redirect_to admin_imports_path and return | ||
| end | ||
|
|
||
| klass = params[:klass].classify.constantize rescue nil |
| flash[:notice] = t(:msg_imported_records, count: @imported_count, records: klass.model_name.human(count: @imported_count).downcase) | ||
| else | ||
| flash[:warning] = t(:msg_imported_records_with_errors, count: @imported_count, records: klass.model_name.human(count: @imported_count).downcase, errors: @errors.size) | ||
| flash[:error] = @errors.join("<br/>").html_safe |
…ties. - Rename Admin::LeadsController to Admin::ImportsController. - Add support for Account, Campaign, Opportunity, Contact, and Task imports. - Update routes, settings, and navigation. - Implement entity type selector in the import view. - Fix i18n pluralization for imported record counts in flash messages. - Update and rename controller specs. Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
This change renames the administrative leads import feature to a more generic "Import" feature. It also adds support for importing other major entity types including Accounts, Campaigns, Opportunities, Contacts, and Tasks. The implementation uses a whitelisted dynamic class constantization in the controller to handle different models. Views and locale strings have been updated to be generic and user-friendly.
PR created automatically by Jules for task 16709899828126939314 started by @CloCkWeRX