seeds.rb 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513
  1. # This file should contain all the record creation needed to seed the database with its default values.
  2. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
  3. #
  4. # Examples:
  5. #
  6. # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
  7. # Mayor.create(:name => 'Emanuel', :city => cities.first)
  8. Setting.create(
  9. :title => 'Product Name',
  10. :name => 'product_name',
  11. :area => 'System::Base',
  12. :description => 'Defines the name of the application, shown in the web interface, tabs and title bar of the web browser.',
  13. :options => {
  14. :form => [
  15. {
  16. :display => '',
  17. :null => false,
  18. :name => 'product_name',
  19. :tag => 'input',
  20. },
  21. ],
  22. },
  23. :state => {
  24. :value => 'Zammad',
  25. },
  26. :frontend => true
  27. )
  28. Setting.create(
  29. :title => 'Organization',
  30. :name => 'organization',
  31. :area => 'System::Base',
  32. :description => 'Will also be included in emails as an X-Header.',
  33. :options => {
  34. :form => [
  35. {
  36. :display => '',
  37. :null => false,
  38. :name => 'organization',
  39. :tag => 'input',
  40. },
  41. ],
  42. },
  43. :state => {
  44. :value => 'Example Inc.',
  45. },
  46. :frontend => true
  47. )
  48. Setting.create(
  49. :title => 'SystemID',
  50. :name => 'system_id',
  51. :area => 'System::Base',
  52. :description => 'Defines the system identifier. Every ticket number contains this ID. This ensures that only tickets which belong to your system will be processed as follow-ups (useful when communicating between two instances of Zammad).',
  53. :options => {
  54. :form => [
  55. {
  56. :display => '',
  57. :null => true,
  58. :name => 'system_id',
  59. :tag => 'select',
  60. :options => {
  61. '10' => '10',
  62. '11' => '11',
  63. '12' => '12',
  64. '13' => '13',
  65. },
  66. },
  67. ],
  68. },
  69. :state => {
  70. :value => '10',
  71. },
  72. :frontend => true
  73. )
  74. Setting.create(
  75. :title => 'Fully Qualified Domain Name',
  76. :name => 'fqdn',
  77. :area => 'System::Base',
  78. :description => 'Defines the fully qualified domain name of the system. This setting is used as a variable, #{setting.fqdn} which is found in all forms of messaging used by the application, to build links to the tickets within your system.',
  79. :options => {
  80. :form => [
  81. {
  82. :display => '',
  83. :null => false,
  84. :name => 'fqdn',
  85. :tag => 'input',
  86. },
  87. ],
  88. },
  89. :state => {
  90. :value => 'zammad.example.com',
  91. },
  92. :frontend => true
  93. )
  94. Setting.create(
  95. :title => 'http type',
  96. :name => 'http_type',
  97. :area => 'System::Base',
  98. :description => 'Defines the type of protocol, used by ther web server, to serve the application. If https protocol will be used instead of plain http, it must be specified it here. Since this has no affect on the web server\'s settings or behavior, it will not change the method of access to the application and, if it is wrong, it will not prevent you from logging into the application. This setting is used as a variable, #{setting.http_type} which is found in all forms of messaging used by the application, to build links to the tickets within your system.',
  99. :options => {
  100. :form => [
  101. {
  102. :display => '',
  103. :null => true,
  104. :name => 'storage',
  105. :tag => 'select',
  106. :options => {
  107. 'https' => 'https',
  108. 'http' => 'http',
  109. },
  110. },
  111. ],
  112. },
  113. :state => {
  114. :value => 'http',
  115. },
  116. :frontend => true
  117. )
  118. Setting.create(
  119. :title => 'Storage Mechanism',
  120. :name => 'storage',
  121. :area => 'System::Storage',
  122. :description => '"Database" stores all attachments in the database (not recommended for storing big). "Filesystem" stores the data on the filesystem; this is faster but the webserver should run under the Zammad user. You can switch between the modules even on a system that is already in production without any loss of data.',
  123. :options => {
  124. :form => [
  125. {
  126. :display => '',
  127. :null => true,
  128. :name => 'storage',
  129. :tag => 'select',
  130. :options => {
  131. 'DB' => 'Database',
  132. 'FS' => 'Filesystem',
  133. },
  134. },
  135. ],
  136. },
  137. :state => {
  138. :value => 'DB',
  139. },
  140. :frontend => false
  141. )
  142. Setting.create(
  143. :title => 'New User Accouts',
  144. :name => 'user_create_account',
  145. :area => 'Security::Authentication',
  146. :description => 'Enables users to create their own account via web interface.',
  147. :options => {
  148. :form => [
  149. {
  150. :display => '',
  151. :null => true,
  152. :name => 'user_create_account',
  153. :tag => 'boolean',
  154. :options => {
  155. true => 'yes',
  156. false => 'no',
  157. },
  158. },
  159. ],
  160. },
  161. :state => {
  162. :value => true,
  163. },
  164. :frontend => true
  165. )
  166. Setting.create(
  167. :title => 'Lost Password',
  168. :name => 'user_lost_password',
  169. :area => 'Security::Authentication',
  170. :description => 'Activates lost password feature for agents, in the agent interface.',
  171. :options => {
  172. :form => [
  173. {
  174. :display => '',
  175. :null => true,
  176. :name => 'user_lost_password',
  177. :tag => 'boolean',
  178. :options => {
  179. true => 'yes',
  180. false => 'no',
  181. },
  182. },
  183. ],
  184. },
  185. :state => {
  186. :value => true,
  187. },
  188. :frontend => true
  189. )
  190. Setting.create(
  191. :title => 'Switch to User',
  192. :name => 'switch_to_user',
  193. :area => 'Security::Authentication',
  194. :description => 'Allows the administrators to login as other users, via the users administration panel.',
  195. :options => {
  196. :form => [
  197. {
  198. :display => '',
  199. :null => true,
  200. :name => 'switch_to_user',
  201. :tag => 'boolean',
  202. :options => {
  203. true => 'yes',
  204. false => 'no',
  205. },
  206. },
  207. ],
  208. },
  209. :state => {
  210. :value => false,
  211. },
  212. :frontend => true
  213. )
  214. Setting.create(
  215. :title => 'Autentication via Database',
  216. :name => 'auth_db',
  217. :area => 'Security::Authentication',
  218. :description => 'Enables user authentication via database.',
  219. :options => {
  220. :form => [
  221. {
  222. :display => '',
  223. :null => true,
  224. :name => 'auth_db',
  225. :tag => 'boolean',
  226. :options => {
  227. true => 'yes',
  228. false => 'no',
  229. },
  230. },
  231. ],
  232. },
  233. :state => {
  234. :value => true,
  235. },
  236. :frontend => true
  237. )
  238. Setting.create(
  239. :title => 'Autentication via Twitter',
  240. :name => 'auth_twitter',
  241. :area => 'Security::Authentication',
  242. :description => 'Enables user authentication via twitter. Register your app first at https://dev.twitter.com/apps',
  243. :options => {
  244. :form => [
  245. {
  246. :display => '',
  247. :null => true,
  248. :name => 'auth_twitter',
  249. :tag => 'boolean',
  250. :options => {
  251. true => 'yes',
  252. false => 'no',
  253. },
  254. },
  255. ],
  256. },
  257. :state => {
  258. :value => false,
  259. },
  260. :frontend => true
  261. )
  262. Setting.create(
  263. :title => 'Twitter App Credentials',
  264. :name => 'auth_twitter_credentials',
  265. :area => 'Security::Authentication',
  266. :description => 'App credentials for Twitter.',
  267. :options => {
  268. :form => [
  269. {
  270. :display => 'Twitter Key',
  271. :null => true,
  272. :name => 'key',
  273. :tag => 'input',
  274. },
  275. {
  276. :display => 'Twitter Secret',
  277. :null => true,
  278. :name => 'secret',
  279. :tag => 'input',
  280. },
  281. ],
  282. },
  283. :state => {
  284. :value => {}
  285. },
  286. :frontend => false
  287. )
  288. Setting.create(
  289. :title => 'Autentication via Facebook',
  290. :name => 'auth_facebook',
  291. :area => 'Security::Authentication',
  292. :description => 'Enables user authentication via Facebook. Register your app first at https://developers.facebook.com/apps/',
  293. :options => {
  294. :form => [
  295. {
  296. :display => '',
  297. :null => true,
  298. :name => 'auth_facebook',
  299. :tag => 'boolean',
  300. :options => {
  301. true => 'yes',
  302. false => 'no',
  303. },
  304. },
  305. ],
  306. },
  307. :state => {
  308. :value => false,
  309. },
  310. :frontend => true
  311. )
  312. Setting.create(
  313. :title => 'Facebook App Credentials',
  314. :name => 'auth_facebook_credentials',
  315. :area => 'Security::Authentication',
  316. :description => 'App credentials for Facebook.',
  317. :options => {
  318. :form => [
  319. {
  320. :display => 'App ID',
  321. :null => true,
  322. :name => 'app_id',
  323. :tag => 'input',
  324. },
  325. {
  326. :display => 'App Secret',
  327. :null => true,
  328. :name => 'app_secret',
  329. :tag => 'input',
  330. },
  331. ],
  332. },
  333. :state => {
  334. :value => {},
  335. },
  336. :frontend => false
  337. )
  338. Setting.create(
  339. :title => 'Autentication via Google',
  340. :name => 'auth_google_oauth2',
  341. :area => 'Security::Authentication',
  342. :description => 'Enables user authentication via Google.',
  343. :options => {
  344. :form => [
  345. {
  346. :display => '',
  347. :null => true,
  348. :name => 'auth_google_oauth2',
  349. :tag => 'boolean',
  350. :options => {
  351. true => 'yes',
  352. false => 'no',
  353. },
  354. },
  355. ],
  356. },
  357. :state => {
  358. :value => false,
  359. },
  360. :frontend => true
  361. )
  362. Setting.create(
  363. :title => 'Google App Credentials',
  364. :name => 'auth_google_oauth2_credentials',
  365. :area => 'Security::Authentication',
  366. :description => 'Enables user authentication via Google.',
  367. :options => {
  368. :form => [
  369. {
  370. :display => 'Client ID',
  371. :null => true,
  372. :name => 'client_id',
  373. :tag => 'input',
  374. },
  375. {
  376. :display => 'Client Secret',
  377. :null => true,
  378. :name => 'client_secret',
  379. :tag => 'input',
  380. },
  381. ],
  382. },
  383. :state => {
  384. :value => {},
  385. },
  386. :frontend => false
  387. )
  388. Setting.create(
  389. :title => 'Autentication via LinkedIn',
  390. :name => 'auth_linkedin',
  391. :area => 'Security::Authentication',
  392. :description => 'Enables user authentication via LinkedIn.',
  393. :options => {
  394. :form => [
  395. {
  396. :display => '',
  397. :null => true,
  398. :name => 'auth_linkedin',
  399. :tag => 'boolean',
  400. :options => {
  401. true => 'yes',
  402. false => 'no',
  403. },
  404. },
  405. ],
  406. },
  407. :state => {
  408. :value => false,
  409. },
  410. :frontend => true
  411. )
  412. Setting.create(
  413. :title => 'LinkedIn App Credentials',
  414. :name => 'auth_linkedin_credentials',
  415. :area => 'Security::Authentication',
  416. :description => 'Enables user authentication via LinkedIn.',
  417. :options => {
  418. :form => [
  419. {
  420. :display => 'App ID',
  421. :null => true,
  422. :name => 'app_id',
  423. :tag => 'input',
  424. },
  425. {
  426. :display => 'App Secret',
  427. :null => true,
  428. :name => 'app_secret',
  429. :tag => 'input',
  430. },
  431. ],
  432. },
  433. :state => {
  434. :value => {},
  435. },
  436. :frontend => false
  437. )
  438. Setting.create(
  439. :title => 'Minimal size',
  440. :name => 'password_min_size',
  441. :area => 'Security::Password',
  442. :description => 'Password need to have at least minimal size of characters.',
  443. :options => {
  444. :form => [
  445. {
  446. :display => '',
  447. :null => true,
  448. :name => 'password_min_size',
  449. :tag => 'select',
  450. :options => {
  451. 4 => 4,
  452. 5 => 5,
  453. 6 => 6,
  454. 7 => 7,
  455. 8 => 8,
  456. 9 => 9,
  457. 10 => 10,
  458. 11 => 11,
  459. 12 => 12,
  460. },
  461. },
  462. ],
  463. },
  464. :state => {
  465. :value => 6,
  466. },
  467. :frontend => true
  468. )
  469. Setting.create(
  470. :title => '2 lower and 2 upper characters',
  471. :name => 'password_min_2_lower_2_upper_characters',
  472. :area => 'Security::Password',
  473. :description => 'Password need to contain 2 lower and 2 upper characters.',
  474. :options => {
  475. :form => [
  476. {
  477. :display => '',
  478. :null => true,
  479. :name => 'password_min_2_lower_2_upper_characters',
  480. :tag => 'select',
  481. :options => {
  482. 1 => 'yes',
  483. 0 => 'no',
  484. },
  485. },
  486. ],
  487. },
  488. :state => {
  489. :value => 0,
  490. },
  491. :frontend => true
  492. )
  493. Setting.create(
  494. :title => 'Digit required',
  495. :name => 'password_need_digit',
  496. :area => 'Security::Password',
  497. :description => 'Password need to have at least one digit.',
  498. :options => {
  499. :form => [
  500. {
  501. :display => 'Needed',
  502. :null => true,
  503. :name => 'password_need_digit',
  504. :tag => 'select',
  505. :options => {
  506. 1 => 'yes',
  507. 0 => 'no',
  508. },
  509. },
  510. ],
  511. },
  512. :state => {
  513. :value => 0,
  514. },
  515. :frontend => true
  516. )
  517. Setting.create(
  518. :title => 'Maximal failed logins',
  519. :name => 'password_max_login_failed',
  520. :area => 'Security::Password',
  521. :description => 'Maximal faild logins after account is inactive.',
  522. :options => {
  523. :form => [
  524. {
  525. :display => '',
  526. :null => true,
  527. :name => 'password_max_login_failed',
  528. :tag => 'select',
  529. :options => {
  530. 4 => 4,
  531. 5 => 5,
  532. 6 => 6,
  533. 7 => 7,
  534. 8 => 8,
  535. 9 => 9,
  536. 10 => 10,
  537. 11 => 11,
  538. 12 => 12,
  539. },
  540. },
  541. ],
  542. },
  543. :state => {
  544. :value => 6,
  545. },
  546. :frontend => true
  547. )
  548. Setting.create(
  549. :title => 'Ticket Hook',
  550. :name => 'ticket_hook',
  551. :area => 'Ticket::Base',
  552. :description => 'The identifier for a ticket, e.g. Ticket#, Call#, MyTicket#. The default is Ticket#.',
  553. :options => {
  554. :form => [
  555. {
  556. :display => '',
  557. :null => false,
  558. :name => 'ticket_hook',
  559. :tag => 'input',
  560. },
  561. ],
  562. },
  563. :state => {
  564. :value => 'Ticket#',
  565. },
  566. :frontend => true
  567. )
  568. Setting.create(
  569. :title => 'Ticket Hook Divider',
  570. :name => 'ticket_hook_divider',
  571. :area => 'Ticket::Base::Shadow',
  572. :description => 'The divider between TicketHook and ticket number. E.g \': \'.',
  573. :options => {
  574. :form => [
  575. {
  576. :display => '',
  577. :null => true,
  578. :name => 'ticket_hook_divider',
  579. :tag => 'input',
  580. },
  581. ],
  582. },
  583. :state => {
  584. :value => '',
  585. },
  586. :frontend => false
  587. )
  588. Setting.create(
  589. :title => 'Ticket Hook Position',
  590. :name => 'ticket_hook_position',
  591. :area => 'Ticket::Base',
  592. :description => 'The format of the subject. "Left" means "[Ticket#12345] Some Subject", "Right" means "Some Subject [Ticket#12345]", "None" means "Some Subject" and no ticket number. In the last case you should enable PostmasterFollowupSearchInRaw or PostmasterFollowUpSearchInReferences to recognize followups based on email headers and/or body.',
  593. :options => {
  594. :form => [
  595. {
  596. :display => '',
  597. :null => true,
  598. :name => 'ticket_hook_position',
  599. :tag => 'select',
  600. :options => {
  601. 'left' => 'Left',
  602. 'right' => 'Right',
  603. 'none' => 'None',
  604. },
  605. },
  606. ],
  607. },
  608. :state => {
  609. :value => 'right',
  610. },
  611. :frontend => false
  612. )
  613. Setting.create(
  614. :title => 'Ticket Subject Size',
  615. :name => 'ticket_subject_size',
  616. :area => 'Ticket::Base',
  617. :description => 'Max size of the subjects in an email reply.',
  618. :options => {
  619. :form => [
  620. {
  621. :display => '',
  622. :null => false,
  623. :name => 'ticket_subject_size',
  624. :tag => 'input',
  625. },
  626. ],
  627. },
  628. :state => {
  629. :value => '50',
  630. },
  631. :frontend => false
  632. )
  633. Setting.create(
  634. :title => 'Ticket Subject Reply',
  635. :name => 'ticket_subject_re',
  636. :area => 'Ticket::Base',
  637. :description => 'The text at the beginning of the subject in an email reply, e.g. RE, AW, or AS.',
  638. :options => {
  639. :form => [
  640. {
  641. :display => '',
  642. :null => true,
  643. :name => 'ticket_subject_re',
  644. :tag => 'input',
  645. },
  646. ],
  647. },
  648. :state => {
  649. :value => 'RE',
  650. },
  651. :frontend => false
  652. )
  653. #Setting.create(
  654. # :title => 'Ticket Subject Forward',
  655. # :name => 'ticket_subject_fw',
  656. # :area => 'Ticket::Base',
  657. # :description => 'The text at the beginning of the subject when an email is forwarded, e.g. FW, Fwd, or WG.',
  658. # :state => {
  659. # :value => 'FW',
  660. # },
  661. # :frontend => false
  662. #)
  663. Setting.create(
  664. :title => 'Ticket Number Format',
  665. :name => 'ticket_number',
  666. :area => 'Ticket::Number',
  667. :description => 'Selects the ticket number generator module. "Increment" increments the ticket
  668. number, the SystemID and the counter are used with SystemID.Counter format (e.g. 1010138, 1010139).
  669. With "Date" the ticket numbers will be generated by the current date, the SystemID and the counter.
  670. The format looks like Year.Month.Day.SystemID.counter (e.g. 201206231010138, 201206231010139).
  671. With param "Checksum => true" the counter will be appended as checksum to the string. The format
  672. looks like SystemID.Counter.CheckSum (e. g. 10101384, 10101392) or Year.Month.Day.SystemID.Counter.CheckSum (e.g. 2012070110101520, 2012070110101535).',
  673. :options => {
  674. :form => [
  675. {
  676. :display => '',
  677. :null => true,
  678. :name => 'ticket_number',
  679. :tag => 'select',
  680. :options => {
  681. 'increment' => 'Increment (SystemID.Counter)',
  682. 'date' => 'Date (Year.Month.Day.SystemID.Counter)',
  683. },
  684. },
  685. ],
  686. },
  687. :state => {
  688. :value => 'increment',
  689. },
  690. :frontend => false
  691. )
  692. Setting.create(
  693. :title => 'Ticket Number Increment',
  694. :name => 'ticket_number_increment',
  695. :area => 'Ticket::Number',
  696. :description => '-',
  697. :options => {
  698. :form => [
  699. {
  700. :display => 'Checksum',
  701. :null => true,
  702. :name => 'checksum',
  703. :tag => 'boolean',
  704. :options => {
  705. true => 'yes',
  706. false => 'no',
  707. },
  708. },
  709. {
  710. :display => 'Min. size of number',
  711. :null => true,
  712. :name => 'min_size',
  713. :tag => 'select',
  714. :options => {
  715. 1 => 1,
  716. 2 => 2,
  717. 3 => 3,
  718. 4 => 4,
  719. 5 => 5,
  720. 6 => 6,
  721. 7 => 7,
  722. 8 => 8,
  723. 9 => 9,
  724. 10 => 10,
  725. 11 => 11,
  726. 12 => 12,
  727. 13 => 13,
  728. 14 => 14,
  729. 15 => 15,
  730. 16 => 16,
  731. 17 => 17,
  732. 18 => 18,
  733. 19 => 19,
  734. 20 => 20,
  735. },
  736. },
  737. {
  738. :display => 'Logfile',
  739. :null => false,
  740. :name => 'file',
  741. :tag => 'input',
  742. },
  743. ],
  744. },
  745. :state => {
  746. :value => {
  747. :checksum => false,
  748. :file => '/tmp/counter.log',
  749. :min_size => 5,
  750. },
  751. },
  752. :frontend => false
  753. )
  754. Setting.create(
  755. :title => 'Ticket Number Increment Date',
  756. :name => 'ticket_number_date',
  757. :area => 'Ticket::Number',
  758. :description => '-',
  759. :options => {
  760. :form => [
  761. {
  762. :display => 'Checksum',
  763. :null => true,
  764. :name => 'checksum',
  765. :tag => 'boolean',
  766. :options => {
  767. true => 'yes',
  768. false => 'no',
  769. },
  770. },
  771. {
  772. :display => 'Logfile',
  773. :null => false,
  774. :name => 'file',
  775. :tag => 'input',
  776. },
  777. ],
  778. },
  779. :state => {
  780. :value => {
  781. :checksum => false,
  782. :file => '/tmp/counter.log',
  783. }
  784. },
  785. :frontend => false
  786. )
  787. Setting.create(
  788. :title => 'Sender Format',
  789. :name => 'ticket_define_email_from',
  790. :area => 'Ticket::SenderFormat',
  791. :description => 'Defines how the From field from the emails (sent from answers and email tickets) should look like.',
  792. :options => {
  793. :form => [
  794. {
  795. :display => '',
  796. :null => true,
  797. :name => 'ticket_define_email_from',
  798. :tag => 'select',
  799. :options => {
  800. :SystemAddressName => 'System Address Display Name',
  801. :AgentNameSystemAddressName => 'Agent Name + FromSeparator + System Address Display Name',
  802. },
  803. },
  804. ],
  805. },
  806. :state => {
  807. :value => 'SystemAddressName',
  808. },
  809. :frontend => false
  810. )
  811. Setting.create(
  812. :title => 'Sender Format Seperator',
  813. :name => 'ticket_define_email_from_seperator',
  814. :area => 'Ticket::SenderFormat',
  815. :description => 'Defines the separator between the agents real name and the given queue email address.',
  816. :options => {
  817. :form => [
  818. {
  819. :display => '',
  820. :null => false,
  821. :name => 'ticket_define_email_from_seperator',
  822. :tag => 'input',
  823. },
  824. ],
  825. },
  826. :state => {
  827. :value => 'via',
  828. },
  829. :frontend => false
  830. )
  831. Setting.create(
  832. :title => 'Enable Ticket creation',
  833. :name => 'customer_ticket_create',
  834. :area => 'CustomerWeb::Base',
  835. :description => 'Defines if a customer can create tickets via the web interface.',
  836. :options => {
  837. :form => [
  838. {
  839. :display => '',
  840. :null => true,
  841. :name => 'customer_ticket_create',
  842. :tag => 'boolean',
  843. :options => {
  844. true => 'yes',
  845. false => 'no',
  846. },
  847. },
  848. ],
  849. },
  850. :state => {
  851. :value => true,
  852. },
  853. :frontend => true
  854. )
  855. Setting.create(
  856. :title => 'Enable Ticket View/Update',
  857. :name => 'customer_ticket_view',
  858. :area => 'CustomerWeb::Base',
  859. :description => 'Defines if a customer view and update his own tickets.',
  860. :options => {
  861. :form => [
  862. {
  863. :display => '',
  864. :null => true,
  865. :name => 'customer_ticket_view',
  866. :tag => 'boolean',
  867. :options => {
  868. true => 'yes',
  869. false => 'no',
  870. },
  871. },
  872. ],
  873. },
  874. :state => {
  875. :value => true,
  876. },
  877. :frontend => true
  878. )
  879. Setting.create(
  880. :title => 'Max. Email Size',
  881. :name => 'postmaster_max_size',
  882. :area => 'Email::Base',
  883. :description => 'Maximal size in MB of emails.',
  884. :options => {
  885. :form => [
  886. {
  887. :display => '',
  888. :null => true,
  889. :name => 'postmaster_max_size',
  890. :tag => 'select',
  891. :options => {
  892. 1 => 1,
  893. 2 => 2,
  894. 3 => 3,
  895. 4 => 4,
  896. 5 => 5,
  897. 6 => 6,
  898. 7 => 7,
  899. 8 => 8,
  900. 9 => 9,
  901. 10 => 10,
  902. 11 => 11,
  903. 12 => 12,
  904. 13 => 13,
  905. 14 => 14,
  906. 15 => 15,
  907. 16 => 16,
  908. 17 => 17,
  909. 18 => 18,
  910. 19 => 19,
  911. 20 => 20,
  912. },
  913. },
  914. ],
  915. },
  916. :state => {
  917. :value => 10,
  918. },
  919. :frontend => false
  920. )
  921. Setting.create(
  922. :title => 'Additional follow up detection',
  923. :name => 'postmaster_follow_up_search_in',
  924. :area => 'Email::Base',
  925. :description => '"References" - Executes follow up checks on In-Reply-To or References headers for mails that don\'t have a ticket number in the subject. "Body" - Executes follow up mail body checks in mails that don\'t have a ticket number in the subject. "Attachment" - Executes follow up mail attachments checks in mails that don\'t have a ticket number in the subject. "Raw" - Executes follow up plain/raw mail checks in mails that don\'t have a ticket number in the subject.',
  926. :options => {
  927. :form => [
  928. {
  929. :display => '',
  930. :null => true,
  931. :name => 'postmaster_follow_up_search_in',
  932. :tag => 'checkbox',
  933. :options => {
  934. 'references' => 'References',
  935. 'body' => 'Body',
  936. 'attachment' => 'Attachment',
  937. 'raw' => 'Raw',
  938. },
  939. },
  940. ],
  941. },
  942. :state => {
  943. :value => ['subject'],
  944. },
  945. :frontend => false
  946. )
  947. Setting.create(
  948. :title => 'Notification Sender',
  949. :name => 'notification_sender',
  950. :area => 'Email::Base',
  951. :description => 'Defines the sender of email notifications.',
  952. :options => {
  953. :form => [
  954. {
  955. :display => '',
  956. :null => false,
  957. :name => 'notification_sender',
  958. :tag => 'input',
  959. },
  960. ],
  961. },
  962. :state => {
  963. :value => 'Notification Master <noreply@#{config.fqdn}>',
  964. },
  965. :frontend => false
  966. )
  967. Setting.create(
  968. :title => 'System Sender',
  969. :name => 'system_sender',
  970. :area => 'Email::Base',
  971. :description => 'ONLY TEMP!',
  972. :options => {
  973. :form => [
  974. {
  975. :display => '',
  976. :null => false,
  977. :name => 'system_sender',
  978. :tag => 'input',
  979. },
  980. ],
  981. },
  982. :state => {
  983. :value => 'Zammad Team <zammad@#{config.fqdn}>',
  984. },
  985. :frontend => false
  986. )
  987. Setting.create(
  988. :title => 'Block Notifications',
  989. :name => 'send_no_auto_response_reg_exp',
  990. :area => 'Email::Base',
  991. :description => 'If this regex matches, no notification will be send by the sender.',
  992. :options => {
  993. :form => [
  994. {
  995. :display => '',
  996. :null => false,
  997. :name => 'send_no_auto_response_reg_exp',
  998. :tag => 'input',
  999. },
  1000. ],
  1001. },
  1002. :state => {
  1003. :value => '(MAILER-DAEMON|postmaster|abuse)@.+?\..+?',
  1004. },
  1005. :frontend => false
  1006. )
  1007. Setting.create(
  1008. :title => 'Enable Chat',
  1009. :name => 'chat',
  1010. :area => 'Chat::Base',
  1011. :description => 'Enable/Disable online chat.',
  1012. :options => {
  1013. :form => [
  1014. {
  1015. :display => '',
  1016. :null => true,
  1017. :name => 'chat',
  1018. :tag => 'boolean',
  1019. :options => {
  1020. true => 'yes',
  1021. false => 'no',
  1022. },
  1023. },
  1024. ],
  1025. },
  1026. :state => {
  1027. :value => false,
  1028. },
  1029. :frontend => true
  1030. )
  1031. Role.create(
  1032. :id => 1,
  1033. :name => 'Admin',
  1034. :note => 'To configure your system.',
  1035. :created_by_id => 1
  1036. )
  1037. Role.create(
  1038. :id => 2,
  1039. :name => 'Agent',
  1040. :note => 'To work on Tickets.',
  1041. :created_by_id => 1
  1042. )
  1043. Role.create(
  1044. :id => 3,
  1045. :name => 'Customer',
  1046. :note => 'People who create Tickets ask for help.',
  1047. :created_by_id => 1
  1048. )
  1049. Group.create(
  1050. :id => 1,
  1051. :name => 'Users',
  1052. :note => 'Standard Group/Pool for Tickets.',
  1053. :created_by_id => 1
  1054. )
  1055. Group.create(
  1056. :id => 2,
  1057. :name => 'Twitter',
  1058. :note => 'All Tweets.',
  1059. :created_by_id => 1
  1060. )
  1061. roles = Role.where( :name => 'Customer' )
  1062. organizations = Organization.find( :all )
  1063. groups = Group.find( :all )
  1064. user = User.create(
  1065. :login => '-',
  1066. :firstname => '-',
  1067. :lastname => '',
  1068. :email => '',
  1069. :password => 'root',
  1070. :active => false,
  1071. :roles => roles,
  1072. :groups => groups,
  1073. :organizations => organizations,
  1074. :created_by_id => 1
  1075. )
  1076. Link::Type.create( :name => 'normal' )
  1077. Link::Object.create( :name => 'Ticket' )
  1078. Link::Object.create( :name => 'Announcement' )
  1079. Link::Object.create( :name => 'Question/Answer' )
  1080. Link::Object.create( :name => 'Idea' )
  1081. Link::Object.create( :name => 'Bug' )
  1082. Ticket::StateType.create( :name => 'new' )
  1083. Ticket::StateType.create( :name => 'open' )
  1084. Ticket::StateType.create( :name => 'pending reminder' )
  1085. Ticket::StateType.create( :name => 'pending action' )
  1086. Ticket::StateType.create( :name => 'closed' )
  1087. Ticket::State.create( :name => 'new', :ticket_state_type_id => Ticket::StateType.where(:name => 'new').first.id )
  1088. Ticket::State.create( :name => 'open', :ticket_state_type_id => Ticket::StateType.where(:name => 'open').first.id )
  1089. Ticket::State.create( :name => 'pending', :ticket_state_type_id => Ticket::StateType.where(:name => 'pending reminder').first.id )
  1090. Ticket::State.create( :name => 'closed', :ticket_state_type_id => Ticket::StateType.where(:name => 'closed').first.id )
  1091. Ticket::Priority.create( :name => '1 low' )
  1092. Ticket::Priority.create( :name => '2 normal' )
  1093. Ticket::Priority.create( :name => '3 high' )
  1094. Ticket::Article::Type.create( :name => 'email', :communication => true )
  1095. Ticket::Article::Type.create( :name => 'sms', :communication => true )
  1096. Ticket::Article::Type.create( :name => 'chat', :communication => true )
  1097. Ticket::Article::Type.create( :name => 'fax', :communication => true )
  1098. Ticket::Article::Type.create( :name => 'phone', :communication => true )
  1099. Ticket::Article::Type.create( :name => 'twitter status', :communication => true )
  1100. Ticket::Article::Type.create( :name => 'twitter direct-message', :communication => true )
  1101. Ticket::Article::Type.create( :name => 'facebook', :communication => true )
  1102. Ticket::Article::Type.create( :name => 'note', :communication => false )
  1103. Ticket::Article::Sender.create( :name => 'Agent' )
  1104. Ticket::Article::Sender.create( :name => 'Customer' )
  1105. Ticket::Article::Sender.create( :name => 'System' )
  1106. ticket = Ticket.create(
  1107. :group_id => Group.where( :name => 'Users' ).first.id,
  1108. :customer_id => User.where( :login => '-' ).first.id,
  1109. :owner_id => User.where( :login => '-' ).first.id,
  1110. :title => 'Welcome to Zammad!',
  1111. :ticket_state_id => Ticket::State.where( :name => 'new' ).first.id,
  1112. :ticket_priority_id => Ticket::Priority.where( :name => '2 normal' ).first.id,
  1113. :created_by_id => User.where( :login => '-' ).first.id
  1114. )
  1115. Ticket::Article.create(
  1116. :created_by_id => User.where(:login => '-').first.id,
  1117. :ticket_id => ticket.id,
  1118. :ticket_article_type_id => Ticket::Article::Type.where(:name => 'email' ).first.id,
  1119. :ticket_article_sender_id => Ticket::Article::Sender.where(:name => 'Customer' ).first.id,
  1120. :from => 'Zammad Feedback <feedback@zammad.org>',
  1121. :body => 'Welcome!
  1122. Thank you for installing Zammad.
  1123. You will find updates and patches at http://zammad.org/. Online
  1124. documentation is available at http://guides.zammad.org/. You can also
  1125. use our forums at http://forums.zammad.org/
  1126. Regards,
  1127. The Zammad.org Project
  1128. ',
  1129. :internal => false
  1130. )
  1131. Overview.create(
  1132. :name => 'my_assigned',
  1133. :condition => {
  1134. :ticket_state_id => [ 1,2,3 ],
  1135. :owner_id => 'current_user.id',
  1136. },
  1137. :order => {
  1138. :by => 'created_at',
  1139. :direction => 'ASC',
  1140. },
  1141. :meta => {
  1142. :url => 'my_assigned',
  1143. :name => 'My assigned Tickets',
  1144. :prio => 1000,
  1145. },
  1146. :view => {
  1147. :d => {
  1148. :overview => [
  1149. 'title', 'customer', 'ticket_state', 'group', 'created_at'
  1150. ],
  1151. :per_page => 5,
  1152. },
  1153. :s => {
  1154. :overview => [
  1155. 'number', 'title', 'customer', 'ticket_state', 'ticket_priority', 'group', 'created_at'
  1156. ],
  1157. :per_page => 30,
  1158. },
  1159. :m => {
  1160. :overview => [
  1161. 'number', 'title', 'customer', 'ticket_state', 'ticket_priority', 'group', 'created_at'
  1162. ],
  1163. :per_page => 20,
  1164. },
  1165. :view_mode_default => 's',
  1166. }
  1167. )
  1168. Overview.create(
  1169. :name => 'all_unassigned',
  1170. :condition => {
  1171. :ticket_state_id => [1,2,3],
  1172. :owner_id => 1,
  1173. },
  1174. :order => {
  1175. :by => 'created_at',
  1176. :direction => 'ASC',
  1177. },
  1178. :meta => {
  1179. :url => 'all_unassigned',
  1180. :name => 'Unassigned Tickets',
  1181. :prio => 1001,
  1182. },
  1183. :view => {
  1184. :d => {
  1185. :overview => [
  1186. 'title', 'customer', 'ticket_state', 'group', 'created_at'
  1187. ],
  1188. :per_page => 5,
  1189. },
  1190. :s => {
  1191. :overview => [
  1192. 'number', 'title', 'customer', 'ticket_state', 'ticket_priority', 'group', 'created_at'
  1193. ],
  1194. :per_page => 30,
  1195. },
  1196. :m => {
  1197. :overview => [
  1198. 'number', 'title', 'customer', 'ticket_state', 'ticket_priority', 'group', 'created_at'
  1199. ],
  1200. :per_page => 20,
  1201. },
  1202. :view_mode_default => 's',
  1203. }
  1204. )
  1205. Overview.create(
  1206. :name => 'all_escalated',
  1207. :condition => {
  1208. :ticket_state_id => [1,2,3],
  1209. },
  1210. :order => {
  1211. :by => 'created_at',
  1212. :direction => 'ASC',
  1213. },
  1214. :meta => {
  1215. :url => 'all_escalated',
  1216. :name => 'Escalated Tickets',
  1217. :prio => 1002,
  1218. },
  1219. :view => {
  1220. :d => {
  1221. :overview => [
  1222. 'title', 'customer', 'ticket_state', 'group', 'owner', 'created_at'
  1223. ],
  1224. :per_page => 5,
  1225. },
  1226. :s => {
  1227. :overview => [
  1228. 'number', 'title', 'customer', 'ticket_state', 'ticket_priority', 'group', 'owner', 'created_at'
  1229. ],
  1230. :per_page => 30,
  1231. },
  1232. :m => {
  1233. :overview => [
  1234. 'number', 'title', 'customer', 'ticket_state', 'ticket_priority', 'group', 'owner', 'created_at'
  1235. ],
  1236. :per_page => 20,
  1237. },
  1238. :view_mode_default => 's',
  1239. }
  1240. )
  1241. Overview.create(
  1242. :name => 'my_pending_reached',
  1243. :condition => {
  1244. :ticket_state_id => [3],
  1245. :owner_id => 'current_user.id',
  1246. },
  1247. :order => {
  1248. :by => 'created_at',
  1249. :direction => 'ASC',
  1250. },
  1251. :meta => {
  1252. :url => 'my_pending_reached',
  1253. :name => 'My pending reached Tickets',
  1254. :prio => 1003,
  1255. },
  1256. :view => {
  1257. :d => {
  1258. :overview => [
  1259. 'title', 'customer', 'ticket_state', 'group', 'created_at'
  1260. ],
  1261. :per_page => 5,
  1262. },
  1263. :s => {
  1264. :overview => [
  1265. 'number', 'title', 'customer', 'ticket_state', 'ticket_priority', 'group', 'created_at'
  1266. ],
  1267. :per_page => 30,
  1268. },
  1269. :m => {
  1270. :overview => [
  1271. 'number', 'title', 'customer', 'ticket_state', 'ticket_priority', 'group', 'created_at'
  1272. ],
  1273. :per_page => 20,
  1274. },
  1275. :view_mode_default => 's',
  1276. }
  1277. )
  1278. Overview.create(
  1279. :name => 'all',
  1280. :condition => {
  1281. # :ticket_state_id => [3],
  1282. # :owner_id => current_user.id,
  1283. },
  1284. :order => {
  1285. :by => 'created_at',
  1286. :direction => 'ASC',
  1287. },
  1288. :meta => {
  1289. :url => 'all',
  1290. :name => 'All Tickets',
  1291. :prio => 9003,
  1292. },
  1293. :view => {
  1294. :s => {
  1295. :overview => [
  1296. 'title', 'customer', 'ticket_state', 'group', 'created_at'
  1297. ],
  1298. :per_page => 5,
  1299. },
  1300. :s => {
  1301. :overview => [
  1302. 'number', 'title', 'customer', 'ticket_state', 'ticket_priority', 'group', 'created_at'
  1303. ],
  1304. :per_page => 30,
  1305. },
  1306. :m => {
  1307. :overview => [
  1308. 'number', 'title', 'customer', 'ticket_state', 'ticket_priority', 'group', 'created_at'
  1309. ],
  1310. :per_page => 20,
  1311. },
  1312. :view_mode_default => 's',
  1313. }
  1314. )
  1315. Channel.create(
  1316. :adapter => 'SMTP',
  1317. :area => 'Email::Outbound',
  1318. :options => {
  1319. :host => 'host.example.com',
  1320. :user => '',
  1321. :password => '',
  1322. :ssl => true,
  1323. },
  1324. :group_id => 1,
  1325. :active => false,
  1326. :created_by_id => User.where( :login => '-' ).first.id
  1327. )
  1328. Channel.create(
  1329. :adapter => 'Sendmail',
  1330. :area => 'Email::Outbound',
  1331. :options => {},
  1332. :active => true,
  1333. :created_by_id => User.where( :login => '-' ).first.id
  1334. )
  1335. Channel.create(
  1336. :adapter => 'Twitter2',
  1337. :area => 'Twitter',
  1338. :options => {
  1339. :consumer_key => 'PJ4c3dYYRtSZZZdOKo8ow',
  1340. :consumer_secret => 'ggAdnJE2Al1Vv0cwwvX5bdvKOieFs0vjCIh5M8Dxk',
  1341. :oauth_token => '293437546-xxRa9g74CercnU5AvY1uQwLLGIYrV1ezYtpX8oKW',
  1342. :oauth_token_secret => 'ju0E4l9OdY2Lh1iTKMymAu6XVfOaU2oGxmcbIMRZQK4',
  1343. :search => [
  1344. {
  1345. :item => '#otrs',
  1346. :group => 'Twitter',
  1347. },
  1348. {
  1349. :item => '#zombie42',
  1350. :group => 'Twitter',
  1351. },
  1352. {
  1353. :item => '#otterhub',
  1354. :group => 'Twitter',
  1355. },
  1356. ],
  1357. :mentions => {
  1358. :group => 'Twitter',
  1359. },
  1360. :direct_messages => {
  1361. :group => 'Twitter',
  1362. }
  1363. },
  1364. :active => true,
  1365. :created_by_id => User.where( :login => '-' ).first.id
  1366. )
  1367. network = Network.create(
  1368. :name => 'base'
  1369. )
  1370. Network::Category::Type.create(
  1371. :name => 'Announcement'
  1372. )
  1373. Network::Category::Type.create(
  1374. :name => 'Idea'
  1375. )
  1376. Network::Category::Type.create(
  1377. :name => 'Question'
  1378. )
  1379. Network::Category::Type.create(
  1380. :name => 'Bug Report'
  1381. )
  1382. Network::Privacy.create(
  1383. :name => 'logged in',
  1384. :key => 'loggedIn'
  1385. )
  1386. Network::Privacy.create(
  1387. :name => 'logged in and moderator',
  1388. :key => 'loggedInModerator'
  1389. )
  1390. Network::Category.create(
  1391. :name => 'Announcements',
  1392. :network_id => network.id,
  1393. :allow_comments => true,
  1394. :network_category_type_id => Network::Category::Type.where(:name => 'Announcement').first.id,
  1395. :network_privacy_id => Network::Privacy.where(:name => 'logged in and moderator').first.id,
  1396. :allow_comments => true
  1397. )
  1398. Network::Category.create(
  1399. :name => 'Questions',
  1400. :network_id => network.id,
  1401. :allow_comments => true,
  1402. :network_category_type_id => Network::Category::Type.where(:name => 'Question').first.id,
  1403. :network_privacy_id => Network::Privacy.where(:name => 'logged in').first.id
  1404. # :network_categories_moderator_user_ids => User.where(:login => '-').first.id
  1405. )
  1406. Network::Category.create(
  1407. :name => 'Ideas',
  1408. :network_id => network.id,
  1409. :allow_comments => true,
  1410. :network_category_type_id => Network::Category::Type.where(:name => 'Idea').first.id,
  1411. :network_privacy_id => Network::Privacy.where(:name => 'logged in').first.id,
  1412. :allow_comments => true
  1413. )
  1414. Network::Category.create(
  1415. :name => 'Bug Reports',
  1416. :network_id => network.id,
  1417. :allow_comments => true,
  1418. :network_category_type_id => Network::Category::Type.where(:name => 'Bug Report').first.id,
  1419. :network_privacy_id => Network::Privacy.where(:name => 'logged in').first.id,
  1420. :allow_comments => true
  1421. )
  1422. item = Network::Item.create(
  1423. :title => 'Example Announcement',
  1424. :body => 'Some announcement....',
  1425. :network_category_id => Network::Category.where(:name => 'Announcements').first.id,
  1426. :created_by_id => User.where(:login => '-').first.id
  1427. )
  1428. Network::Item::Comment.create(
  1429. :network_item_id => item.id,
  1430. :body => 'Some comment....',
  1431. :created_by_id => User.where(:login => '-').first.id
  1432. )
  1433. item = Network::Item.create(
  1434. :title => 'Example Question?',
  1435. :body => 'Some questions....',
  1436. :network_category_id => Network::Category.where(:name => 'Questions').first.id,
  1437. :created_by_id => User.where(:login => '-').first.id
  1438. )
  1439. Network::Item::Comment.create(
  1440. :network_item_id => item.id,
  1441. :body => 'Some comment....',
  1442. :created_by_id => User.where(:login => '-').first.id
  1443. )
  1444. item = Network::Item.create(
  1445. :title => 'Example Idea',
  1446. :body => 'Some idea....',
  1447. :network_category_id => Network::Category.where(:name => 'Ideas').first.id,
  1448. :created_by_id => User.where(:login => '-').first.id
  1449. )
  1450. Network::Item::Comment.create(
  1451. :network_item_id => item.id,
  1452. :body => 'Some comment....',
  1453. :created_by_id => User.where(:login => '-').first.id
  1454. )
  1455. item = Network::Item.create(
  1456. :title => 'Example Bug Report',
  1457. :body => 'Some bug....',
  1458. :network_category_id => Network::Category.where(:name => 'Bug Reports').first.id,
  1459. :created_by_id => User.where(:login => '-').first.id
  1460. )
  1461. Network::Item::Comment.create(
  1462. :network_item_id => item.id,
  1463. :body => 'Some comment....',
  1464. :created_by_id => User.where(:login => '-').first.id
  1465. )