"Fossies" - the Fresh Open Source Software Archive

Member "db/migrate/20170130000001_follow_up_possible_check_643.rb" (25 Mar 2021, 1461 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 "20170130000001_follow_up_possible_check_643.rb": 3.4.1_vs_3.5.0.

    1 class FollowUpPossibleCheck643 < 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.create_if_not_exists(
    8       title:       'Define postmaster filter.',
    9       name:        '0200_postmaster_filter_follow_up_possible_check',
   10       area:        'Postmaster::PreFilter',
   11       description: 'Define postmaster filter to check if follow-ups get created (based on admin settings).',
   12       options:     {},
   13       state:       'Channel::Filter::FollowUpPossibleCheck',
   14       frontend:    false
   15     )
   16 
   17     ObjectManager::Attribute.add(
   18       force:       true,
   19       object:      'Group',
   20       name:        'follow_up_possible',
   21       display:     'Follow-up possible',
   22       data_type:   'select',
   23       data_option: {
   24         default:   'yes',
   25         options:   {
   26           yes:        'yes',
   27           new_ticket: 'do not reopen Ticket but create new Ticket'
   28         },
   29         null:      false,
   30         note:      'Follow-up for closed ticket possible or not.',
   31         translate: true
   32       },
   33       editable:    false,
   34       active:      true,
   35       screens:     {
   36         create: {
   37           '-all-' => {
   38             null: true,
   39           },
   40         },
   41         edit:   {
   42           '-all-' => {
   43             null: true,
   44           },
   45         },
   46       },
   47       to_create:   false,
   48       to_migrate:  false,
   49       to_delete:   false,
   50       position:    400,
   51     )
   52 
   53   end
   54 end