<commit_before>module MailerPatch
    def self.included(base) # :nodoc:
    base.send(:include, InstanceMethods)

    base.class_eval do
      alias_method_chain :issue_add, :email_filter
      alias_method_chain :issue_edit, :email_filter
    end
  end

  module InstanceMethods

    def issue_add_with_email_filter(issue)
	if issue.project.module_enabled?('email_notification_content_filter')
		if Setting.plugin_redmine_email_notification_content_filter['removeDescription']
			issue.description=""
		end
		if Setting.plugin_redmine_email_notification_content_filter['removeSubject']
			issue.subject=""
		end
	end
	issue_add_without_email_filter(issue)
    end

    def issue_edit_with_email_filter(journal)
	if Rails::VERSION::MAJOR >= 3
		     issue = journal.journalized.reload
			if issue.project.module_enabled?('email_notification_content_filter')
			if Setting.plugin_redmine_email_notification_content_filter['removeDescription']
				issue.description=""
			end
			if Setting.plugin_redmine_email_notification_content_filter['removeSubject']
				issue.subject=""
			end
			end<commit_msg>arguments for issue_add alias updated<commit_after>module MailerPatch
    def self.included(base) # :nodoc:
    base.send(:include, InstanceMethods)

    base.class_eval do
      alias_method_chain :issue_add, :email_filter
      alias_method_chain :issue_edit, :email_filter
    end
  end

  module InstanceMethods

    def issue_add_with_email_filter(issue, to_users, cc_users)
	if issue.project.module_enabled?('email_notification_content_filter')
		if Setting.plugin_redmine_email_notification_content_filter['removeDescription']
			issue.description=""
		end
		if Setting.plugin_redmine_email_notification_content_filter['removeSubject']
			issue.subject=""
		end
	end
	issue_add_without_email_filter(issue, to_users, cc_users)
    end

    def issue_edit_with_email_filter(journal, to_users, cc_users)
	if Rails::VERSION::MAJOR >= 3
		     issue = journal.journalized.reload
			if issue.project.module_enabled?('email_notification_content_filter')
			if Setting.plugin_redmine_email_notification_content_filter['removeDescription']
				issue.description=""
			end
			if Setting.plugin_redmine_email_notification_content_filter['removeSubject']
				issue.subject=""
			end
			end
{'fraction_non_alphanumeric': 0.07793345008756568, 'fraction_numerical': 0.0008756567425569177, 'mean_word_length': 5.50997150997151, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '190745', 'n_tokens_mistral': 747, 'n_tokens_neox': 680, 'n_words': 113}