"Fossies" - the Fresh Open Source Software Archive

Member "db/migrate/20170529000002_setting_delivery_permanent_failed.rb" (25 Mar 2021, 1364 Bytes) of package /linux/www/zammad-4.0.0.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ruby source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "20170529000002_setting_delivery_permanent_failed.rb": 3.4.1_vs_3.5.0.

    1 class SettingDeliveryPermanentFailed < ActiveRecord::Migration[4.2]
    2   def up
    3 
    4     # return if it's a new setup
    5     return if !Setting.exists?(name: 'system_init_done')
    6 
    7     setting = Setting.find_by(name: '0900_postmaster_filter_bounce_check')
    8     if setting
    9       setting.name = '0900_postmaster_filter_bounce_follow_up_check'
   10       setting.state = 'Channel::Filter::BounceFollowUpCheck'
   11       setting.save!
   12     else
   13       Setting.create_if_not_exists(
   14         title:       'Defines postmaster filter.',
   15         name:        '0900_postmaster_filter_bounce_follow_up_check',
   16         area:        'Postmaster::PreFilter',
   17         description: 'Defines postmaster filter to identify postmaster bounced - to handle it as follow-up of the original ticket.',
   18         options:     {},
   19         state:       'Channel::Filter::BounceFollowUpCheck',
   20         frontend:    false
   21       )
   22     end
   23     Setting.create_if_not_exists(
   24       title:       'Defines postmaster filter.',
   25       name:        '0950_postmaster_filter_bounce_delivery_permanent_failed',
   26       area:        'Postmaster::PreFilter',
   27       description: 'Defines postmaster filter to identify postmaster bounced - disable sending notification on permanent deleivery failed.',
   28       options:     {},
   29       state:       'Channel::Filter::BounceDeliveryPermanentFailed',
   30       frontend:    false
   31     )
   32 
   33   end
   34 
   35 end