seeds.rb 71 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366
  1. # encoding: utf-8
  2. # This file should contain all the record creation needed to seed the database with its default values.
  3. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
  4. #
  5. # Examples:
  6. #
  7. # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
  8. # Mayor.create(:name => 'Emanuel', :city => cities.first)
  9. Setting.create_if_not_exists(
  10. title: 'System Init Done',
  11. name: 'system_init_done',
  12. area: 'Core',
  13. description: 'Defines if application is in init mode.',
  14. options: {},
  15. state: false,
  16. preferences: { online_service_disable: true },
  17. frontend: true
  18. )
  19. Setting.create_if_not_exists(
  20. title: 'Developer System',
  21. name: 'developer_mode',
  22. area: 'Core::Develop',
  23. description: 'Defines if application is in developer mode (useful for developer, all users have the same password, password reset will work without email delivery).',
  24. options: {},
  25. state: false,
  26. preferences: { online_service_disable: true },
  27. frontend: true
  28. )
  29. Setting.create_if_not_exists(
  30. title: 'Online Service',
  31. name: 'system_online_service',
  32. area: 'Core',
  33. description: 'Defines if application is used as online service.',
  34. options: {},
  35. state: false,
  36. preferences: { online_service_disable: true },
  37. frontend: true
  38. )
  39. Setting.create_if_not_exists(
  40. title: 'Product Name',
  41. name: 'product_name',
  42. area: 'System::Branding',
  43. description: 'Defines the name of the application, shown in the web interface, tabs and title bar of the web browser.',
  44. options: {
  45. form: [
  46. {
  47. display: '',
  48. null: false,
  49. name: 'product_name',
  50. tag: 'input',
  51. },
  52. ],
  53. },
  54. preferences: { render: true, session_check: true, prio: 1 },
  55. state: 'Zammad Helpdesk',
  56. frontend: true
  57. )
  58. Setting.create_if_not_exists(
  59. title: 'Logo',
  60. name: 'product_logo',
  61. area: 'System::Branding',
  62. description: 'Defines the logo of the application, shown in the web interface.',
  63. options: {
  64. form: [
  65. {
  66. display: '',
  67. null: false,
  68. name: 'product_logo',
  69. tag: 'input',
  70. },
  71. ],
  72. },
  73. preferences: { prio: 3 },
  74. state: 'logo.svg',
  75. frontend: true
  76. )
  77. Setting.create_if_not_exists(
  78. title: 'Organization',
  79. name: 'organization',
  80. area: 'System::Branding',
  81. description: 'Will be shown in the app and is included in email footers.',
  82. options: {
  83. form: [
  84. {
  85. display: '',
  86. null: false,
  87. name: 'organization',
  88. tag: 'input',
  89. },
  90. ],
  91. },
  92. state: '',
  93. preferences: { prio: 2 },
  94. frontend: true
  95. )
  96. options = {}
  97. (10..99).each {|item|
  98. options[item] = item
  99. }
  100. system_id = rand(10..99)
  101. Setting.create_if_not_exists(
  102. title: 'SystemID',
  103. name: 'system_id',
  104. area: 'System::Base',
  105. 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).',
  106. options: {
  107. form: [
  108. {
  109. display: '',
  110. null: true,
  111. name: 'system_id',
  112. tag: 'select',
  113. options: options,
  114. },
  115. ],
  116. },
  117. state: system_id,
  118. preferences: { online_service_disable: true },
  119. frontend: true
  120. )
  121. Setting.create_if_not_exists(
  122. title: 'Fully Qualified Domain Name',
  123. name: 'fqdn',
  124. area: 'System::Base',
  125. 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.',
  126. options: {
  127. form: [
  128. {
  129. display: '',
  130. null: false,
  131. name: 'fqdn',
  132. tag: 'input',
  133. },
  134. ],
  135. },
  136. state: 'zammad.example.com',
  137. preferences: { online_service_disable: true },
  138. frontend: true
  139. )
  140. Setting.create_if_not_exists(
  141. title: 'websocket port',
  142. name: 'websocket_port',
  143. area: 'System::WebSocket',
  144. description: 'Defines the port of the websocket server.',
  145. options: {
  146. form: [
  147. {
  148. display: '',
  149. null: false,
  150. name: 'websocket_port',
  151. tag: 'input',
  152. },
  153. ],
  154. },
  155. state: '6042',
  156. preferences: { online_service_disable: true },
  157. frontend: true
  158. )
  159. Setting.create_if_not_exists(
  160. title: 'http type',
  161. name: 'http_type',
  162. area: 'System::Base',
  163. description: 'Defines the type of protocol, used by the web server, to serve the application. If https protocol will be used instead of plain http, it must be specified in 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.',
  164. options: {
  165. form: [
  166. {
  167. display: '',
  168. null: true,
  169. name: 'http_type',
  170. tag: 'select',
  171. options: {
  172. 'https' => 'https',
  173. 'http' => 'http',
  174. },
  175. },
  176. ],
  177. },
  178. state: 'http',
  179. preferences: { online_service_disable: true },
  180. frontend: true
  181. )
  182. Setting.create_if_not_exists(
  183. title: 'Storage Mechanism',
  184. name: 'storage',
  185. area: 'System::Storage',
  186. description: '"Database" stores all attachments in the database (not recommended for storing large amounts of data). "Filesystem" stores the data on the filesystem. You can switch between the modules even on a system that is already in production without any loss of data.',
  187. options: {
  188. form: [
  189. {
  190. display: '',
  191. null: true,
  192. name: 'storage',
  193. tag: 'select',
  194. options: {
  195. 'DB' => 'Database',
  196. 'FS' => 'Filesystem',
  197. },
  198. },
  199. ],
  200. },
  201. state: 'DB',
  202. preferences: { online_service_disable: true },
  203. frontend: false
  204. )
  205. Setting.create_if_not_exists(
  206. title: 'Image Service',
  207. name: 'image_backend',
  208. area: 'System::Services',
  209. description: 'Defines the backend for user and organization image lookups.',
  210. options: {
  211. form: [
  212. {
  213. display: '',
  214. null: true,
  215. name: 'image_backend',
  216. tag: 'select',
  217. options: {
  218. '' => '-',
  219. 'Service::Image::Zammad' => 'Zammad Image Service',
  220. },
  221. },
  222. ],
  223. },
  224. state: 'Service::Image::Zammad',
  225. preferences: { prio: 1 },
  226. frontend: false
  227. )
  228. Setting.create_if_not_exists(
  229. title: 'Geo IP Service',
  230. name: 'geo_ip_backend',
  231. area: 'System::Services',
  232. description: 'Defines the backend for geo IP lookups. Show also location of an IP address if an IP address is shown.',
  233. options: {
  234. form: [
  235. {
  236. display: '',
  237. null: true,
  238. name: 'geo_ip_backend',
  239. tag: 'select',
  240. options: {
  241. '' => '-',
  242. 'Service::GeoIp::Zammad' => 'Zammad GeoIP Service',
  243. },
  244. },
  245. ],
  246. },
  247. state: 'Service::GeoIp::Zammad',
  248. preferences: { prio: 2 },
  249. frontend: false
  250. )
  251. Setting.create_if_not_exists(
  252. title: 'Geo Location Service',
  253. name: 'geo_location_backend',
  254. area: 'System::Services',
  255. description: 'Defines the backend for geo location lookups to store geo locations for addresses.',
  256. options: {
  257. form: [
  258. {
  259. display: '',
  260. null: true,
  261. name: 'geo_location_backend',
  262. tag: 'select',
  263. options: {
  264. '' => '-',
  265. 'Service::GeoLocation::Gmaps' => 'Google Maps',
  266. },
  267. },
  268. ],
  269. },
  270. state: 'Service::GeoLocation::Gmaps',
  271. preferences: { prio: 3 },
  272. frontend: false
  273. )
  274. Setting.create_if_not_exists(
  275. title: 'Geo Calendar Service',
  276. name: 'geo_calendar_backend',
  277. area: 'System::Services',
  278. description: 'Defines the backend for geo calendar lookups. Used for inital calendar succession.',
  279. options: {
  280. form: [
  281. {
  282. display: '',
  283. null: true,
  284. name: 'geo_calendar_backend',
  285. tag: 'select',
  286. options: {
  287. '' => '-',
  288. 'Service::GeoCalendar::Zammad' => 'Zammad GeoCalendar Service',
  289. },
  290. },
  291. ],
  292. },
  293. state: 'Service::GeoCalendar::Zammad',
  294. preferences: { prio: 2 },
  295. frontend: false
  296. )
  297. Setting.create_if_not_exists(
  298. title: 'Send client stats',
  299. name: 'ui_send_client_stats',
  300. area: 'System::UI',
  301. description: 'Send client stats/error message to central server to improve the usability.',
  302. options: {
  303. form: [
  304. {
  305. display: '',
  306. null: true,
  307. name: 'ui_send_client_stats',
  308. tag: 'boolean',
  309. options: {
  310. true => 'yes',
  311. false => 'no',
  312. },
  313. },
  314. ],
  315. },
  316. state: true,
  317. preferences: { prio: 1 },
  318. frontend: true
  319. )
  320. Setting.create_if_not_exists(
  321. title: 'Client storage',
  322. name: 'ui_client_storage',
  323. area: 'System::UI',
  324. description: 'Use client storage to cache data to perform speed of application.',
  325. options: {
  326. form: [
  327. {
  328. display: '',
  329. null: true,
  330. name: 'ui_client_storage',
  331. tag: 'boolean',
  332. options: {
  333. true => 'yes',
  334. false => 'no',
  335. },
  336. },
  337. ],
  338. },
  339. state: false,
  340. preferences: { prio: 2 },
  341. frontend: true
  342. )
  343. Setting.create_if_not_exists(
  344. title: 'New User Accounts',
  345. name: 'user_create_account',
  346. area: 'Security::Base',
  347. description: 'Enables users to create their own account via web interface.',
  348. options: {
  349. form: [
  350. {
  351. display: '',
  352. null: true,
  353. name: 'user_create_account',
  354. tag: 'boolean',
  355. options: {
  356. true => 'yes',
  357. false => 'no',
  358. },
  359. },
  360. ],
  361. },
  362. state: true,
  363. frontend: true
  364. )
  365. Setting.create_if_not_exists(
  366. title: 'Lost Password',
  367. name: 'user_lost_password',
  368. area: 'Security::Base',
  369. description: 'Activates lost password feature for users.',
  370. options: {
  371. form: [
  372. {
  373. display: '',
  374. null: true,
  375. name: 'user_lost_password',
  376. tag: 'boolean',
  377. options: {
  378. true => 'yes',
  379. false => 'no',
  380. },
  381. },
  382. ],
  383. },
  384. state: true,
  385. frontend: true
  386. )
  387. Setting.create_if_not_exists(
  388. title: 'Authentication via LDAP',
  389. name: 'auth_ldap',
  390. area: 'Security::Authentication',
  391. description: 'Enables user authentication via LDAP.',
  392. state: {
  393. adapter: 'Auth::Ldap',
  394. host: 'localhost',
  395. port: 389,
  396. bind_dn: 'cn=Manager,dc=example,dc=org',
  397. bind_pw: 'example',
  398. uid: 'mail',
  399. base: 'dc=example,dc=org',
  400. always_filter: '',
  401. always_roles: %w(Admin Agent),
  402. always_groups: ['Users'],
  403. sync_params: {
  404. firstname: 'sn',
  405. lastname: 'givenName',
  406. email: 'mail',
  407. login: 'mail',
  408. },
  409. },
  410. frontend: false
  411. )
  412. Setting.create_if_not_exists(
  413. title: 'Authentication via Twitter',
  414. name: 'auth_twitter',
  415. area: 'Security::ThirdPartyAuthentication',
  416. description: "@T('Enables user authentication via twitter. Register your app first at [Twitter Developer Site](https://dev.twitter.com/apps)')",
  417. options: {
  418. form: [
  419. {
  420. display: '',
  421. null: true,
  422. name: 'auth_twitter',
  423. tag: 'boolean',
  424. options: {
  425. true => 'yes',
  426. false => 'no',
  427. },
  428. },
  429. ],
  430. },
  431. state: false,
  432. frontend: true
  433. )
  434. Setting.create_if_not_exists(
  435. title: 'Twitter App Credentials',
  436. name: 'auth_twitter_credentials',
  437. area: 'Security::ThirdPartyAuthentication',
  438. description: 'App credentials for Twitter.',
  439. options: {
  440. form: [
  441. {
  442. display: 'Twitter Key',
  443. null: true,
  444. name: 'key',
  445. tag: 'input',
  446. },
  447. {
  448. display: 'Twitter Secret',
  449. null: true,
  450. name: 'secret',
  451. tag: 'input',
  452. },
  453. ],
  454. },
  455. state: {},
  456. frontend: false
  457. )
  458. Setting.create_if_not_exists(
  459. title: 'Authentication via Facebook',
  460. name: 'auth_facebook',
  461. area: 'Security::ThirdPartyAuthentication',
  462. description: "@T('Enables user authentication via Facebook. Register your app first at [Facebook Developer Site](https://developers.facebook.com/apps/)')",
  463. options: {
  464. form: [
  465. {
  466. display: '',
  467. null: true,
  468. name: 'auth_facebook',
  469. tag: 'boolean',
  470. options: {
  471. true => 'yes',
  472. false => 'no',
  473. },
  474. },
  475. ],
  476. },
  477. state: false,
  478. frontend: true
  479. )
  480. Setting.create_if_not_exists(
  481. title: 'Facebook App Credentials',
  482. name: 'auth_facebook_credentials',
  483. area: 'Security::ThirdPartyAuthentication',
  484. description: 'App credentials for Facebook.',
  485. options: {
  486. form: [
  487. {
  488. display: 'App ID',
  489. null: true,
  490. name: 'app_id',
  491. tag: 'input',
  492. },
  493. {
  494. display: 'App Secret',
  495. null: true,
  496. name: 'app_secret',
  497. tag: 'input',
  498. },
  499. ],
  500. },
  501. state: {},
  502. frontend: false
  503. )
  504. Setting.create_if_not_exists(
  505. title: 'Authentication via Google',
  506. name: 'auth_google_oauth2',
  507. area: 'Security::ThirdPartyAuthentication',
  508. description: 'Enables user authentication via Google.',
  509. options: {
  510. form: [
  511. {
  512. display: '',
  513. null: true,
  514. name: 'auth_google_oauth2',
  515. tag: 'boolean',
  516. options: {
  517. true => 'yes',
  518. false => 'no',
  519. },
  520. },
  521. ],
  522. },
  523. state: false,
  524. frontend: true
  525. )
  526. Setting.create_if_not_exists(
  527. title: 'Google App Credentials',
  528. name: 'auth_google_oauth2_credentials',
  529. area: 'Security::ThirdPartyAuthentication',
  530. description: 'Enables user authentication via Google.',
  531. options: {
  532. form: [
  533. {
  534. display: 'Client ID',
  535. null: true,
  536. name: 'client_id',
  537. tag: 'input',
  538. },
  539. {
  540. display: 'Client Secret',
  541. null: true,
  542. name: 'client_secret',
  543. tag: 'input',
  544. },
  545. ],
  546. },
  547. state: {},
  548. frontend: false
  549. )
  550. Setting.create_if_not_exists(
  551. title: 'Authentication via LinkedIn',
  552. name: 'auth_linkedin',
  553. area: 'Security::ThirdPartyAuthentication',
  554. description: 'Enables user authentication via LinkedIn.',
  555. options: {
  556. form: [
  557. {
  558. display: '',
  559. null: true,
  560. name: 'auth_linkedin',
  561. tag: 'boolean',
  562. options: {
  563. true => 'yes',
  564. false => 'no',
  565. },
  566. },
  567. ],
  568. },
  569. state: false,
  570. frontend: true
  571. )
  572. Setting.create_if_not_exists(
  573. title: 'LinkedIn App Credentials',
  574. name: 'auth_linkedin_credentials',
  575. area: 'Security::ThirdPartyAuthentication',
  576. description: 'Enables user authentication via LinkedIn.',
  577. options: {
  578. form: [
  579. {
  580. display: 'App ID',
  581. null: true,
  582. name: 'app_id',
  583. tag: 'input',
  584. },
  585. {
  586. display: 'App Secret',
  587. null: true,
  588. name: 'app_secret',
  589. tag: 'input',
  590. },
  591. ],
  592. },
  593. state: {},
  594. frontend: false
  595. )
  596. Setting.create_if_not_exists(
  597. title: 'Minimal size',
  598. name: 'password_min_size',
  599. area: 'Security::Password',
  600. description: 'Password need to have at least minimal size of characters.',
  601. options: {
  602. form: [
  603. {
  604. display: '',
  605. null: true,
  606. name: 'password_min_size',
  607. tag: 'select',
  608. options: {
  609. 4 => ' 4',
  610. 5 => ' 5',
  611. 6 => ' 6',
  612. 7 => ' 7',
  613. 8 => ' 8',
  614. 9 => ' 9',
  615. 10 => '10',
  616. 11 => '11',
  617. 12 => '12',
  618. 13 => '13',
  619. 14 => '14',
  620. 15 => '15',
  621. 16 => '16',
  622. 17 => '17',
  623. 18 => '18',
  624. 19 => '19',
  625. 20 => '20',
  626. },
  627. },
  628. ],
  629. },
  630. state: 6,
  631. frontend: true
  632. )
  633. Setting.create_if_not_exists(
  634. title: '2 lower and 2 upper characters',
  635. name: 'password_min_2_lower_2_upper_characters',
  636. area: 'Security::Password',
  637. description: 'Password need to contain 2 lower and 2 upper characters.',
  638. options: {
  639. form: [
  640. {
  641. display: '',
  642. null: true,
  643. name: 'password_min_2_lower_2_upper_characters',
  644. tag: 'select',
  645. options: {
  646. 1 => 'yes',
  647. 0 => 'no',
  648. },
  649. },
  650. ],
  651. },
  652. state: 0,
  653. frontend: true
  654. )
  655. Setting.create_if_not_exists(
  656. title: 'Digit required',
  657. name: 'password_need_digit',
  658. area: 'Security::Password',
  659. description: 'Password need to have at least one digit.',
  660. options: {
  661. form: [
  662. {
  663. display: 'Needed',
  664. null: true,
  665. name: 'password_need_digit',
  666. tag: 'select',
  667. options: {
  668. 1 => 'yes',
  669. 0 => 'no',
  670. },
  671. },
  672. ],
  673. },
  674. state: 1,
  675. frontend: true
  676. )
  677. Setting.create_if_not_exists(
  678. title: 'Maximal failed logins',
  679. name: 'password_max_login_failed',
  680. area: 'Security::Password',
  681. description: 'Maximal failed logins after account is inactive.',
  682. options: {
  683. form: [
  684. {
  685. display: '',
  686. null: true,
  687. name: 'password_max_login_failed',
  688. tag: 'select',
  689. options: {
  690. 4 => ' 4',
  691. 5 => ' 5',
  692. 6 => ' 6',
  693. 7 => ' 7',
  694. 8 => ' 8',
  695. 9 => ' 9',
  696. 10 => '10',
  697. 11 => '11',
  698. 13 => '13',
  699. 14 => '14',
  700. 15 => '15',
  701. 16 => '16',
  702. 17 => '17',
  703. 18 => '18',
  704. 19 => '19',
  705. 20 => '20',
  706. },
  707. },
  708. ],
  709. },
  710. state: 10,
  711. frontend: true
  712. )
  713. Setting.create_if_not_exists(
  714. title: 'Ticket Hook',
  715. name: 'ticket_hook',
  716. area: 'Ticket::Base',
  717. description: 'The identifier for a ticket, e.g. Ticket#, Call#, MyTicket#. The default is Ticket#.',
  718. options: {
  719. form: [
  720. {
  721. display: '',
  722. null: false,
  723. name: 'ticket_hook',
  724. tag: 'input',
  725. },
  726. ],
  727. },
  728. preferences: { render: true },
  729. state: 'Ticket#',
  730. frontend: true
  731. )
  732. Setting.create_if_not_exists(
  733. title: 'Ticket Hook Divider',
  734. name: 'ticket_hook_divider',
  735. area: 'Ticket::Base::Shadow',
  736. description: 'The divider between TicketHook and ticket number. E.g \': \'.',
  737. options: {
  738. form: [
  739. {
  740. display: '',
  741. null: true,
  742. name: 'ticket_hook_divider',
  743. tag: 'input',
  744. },
  745. ],
  746. },
  747. state: '',
  748. frontend: false
  749. )
  750. Setting.create_if_not_exists(
  751. title: 'Ticket Hook Position',
  752. name: 'ticket_hook_position',
  753. area: 'Ticket::Base',
  754. description: "@T('The format of the subject.')
  755. * @T('**Right** means **Some Subject [Ticket#12345]**')
  756. * @T('**Left** means **[Ticket#12345] Some Subject**')
  757. * @T('**None** means **Some Subject** (without ticket number). In the last case you should enable *postmaster_follow_up_search_in* to recognize followups based on email headers and/or body.')",
  758. options: {
  759. form: [
  760. {
  761. display: '',
  762. null: true,
  763. name: 'ticket_hook_position',
  764. tag: 'select',
  765. options: {
  766. 'left' => 'left',
  767. 'right' => 'right',
  768. 'none' => 'none',
  769. },
  770. },
  771. ],
  772. },
  773. state: 'right',
  774. frontend: false
  775. )
  776. Setting.create_if_not_exists(
  777. title: 'Ticket Subject Size',
  778. name: 'ticket_subject_size',
  779. area: 'Ticket::Base',
  780. description: 'Max size of the subjects in an email reply.',
  781. options: {
  782. form: [
  783. {
  784. display: '',
  785. null: false,
  786. name: 'ticket_subject_size',
  787. tag: 'input',
  788. },
  789. ],
  790. },
  791. state: '110',
  792. frontend: false
  793. )
  794. Setting.create_if_not_exists(
  795. title: 'Ticket Subject Reply',
  796. name: 'ticket_subject_re',
  797. area: 'Ticket::Base',
  798. description: 'The text at the beginning of the subject in an email reply, e.g. RE, AW, or AS.',
  799. options: {
  800. form: [
  801. {
  802. display: '',
  803. null: true,
  804. name: 'ticket_subject_re',
  805. tag: 'input',
  806. },
  807. ],
  808. },
  809. state: 'RE',
  810. frontend: false
  811. )
  812. Setting.create_if_not_exists(
  813. title: 'Ticket Number Format',
  814. name: 'ticket_number',
  815. area: 'Ticket::Number',
  816. description: "@T('Selects the ticket number generator module.')
  817. * @T('**Increment** increments the ticket number, the SystemID and the counter are used with SystemID.Counter format (e.g. 1010138, 1010139).')
  818. * @T('With **Date** the ticket numbers will be generated by the current date, the SystemID and the counter. The format looks like Year.Month.Day.SystemID.counter (e.g. 201206231010138, 201206231010139).')
  819. @T('With param 'Checksum => true' the counter will be appended as checksum to the string. The format looks like SystemID.Counter.CheckSum (e. g. 10101384, 10101392) or Year.Month.Day.SystemID.Counter.CheckSum (e.g. 2012070110101520, 2012070110101535).')",
  820. options: {
  821. form: [
  822. {
  823. display: '',
  824. null: true,
  825. name: 'ticket_number',
  826. tag: 'select',
  827. options: {
  828. 'Ticket::Number::Increment' => 'Increment (SystemID.Counter)',
  829. 'Ticket::Number::Date' => 'Date (Year.Month.Day.SystemID.Counter)',
  830. },
  831. },
  832. ],
  833. },
  834. state: 'Ticket::Number::Increment',
  835. frontend: false
  836. )
  837. Setting.create_if_not_exists(
  838. title: 'Ticket Number Increment',
  839. name: 'ticket_number_increment',
  840. area: 'Ticket::Number',
  841. description: '-',
  842. options: {
  843. form: [
  844. {
  845. display: 'Checksum',
  846. null: true,
  847. name: 'checksum',
  848. tag: 'boolean',
  849. options: {
  850. true => 'yes',
  851. false => 'no',
  852. },
  853. },
  854. {
  855. display: 'Min. size of number',
  856. null: true,
  857. name: 'min_size',
  858. tag: 'select',
  859. options: {
  860. 1 => ' 1',
  861. 2 => ' 2',
  862. 3 => ' 3',
  863. 4 => ' 4',
  864. 5 => ' 5',
  865. 6 => ' 6',
  866. 7 => ' 7',
  867. 8 => ' 8',
  868. 9 => ' 9',
  869. 10 => '10',
  870. 11 => '11',
  871. 12 => '12',
  872. 13 => '13',
  873. 14 => '14',
  874. 15 => '15',
  875. 16 => '16',
  876. 17 => '17',
  877. 18 => '18',
  878. 19 => '19',
  879. 20 => '20',
  880. },
  881. },
  882. ],
  883. },
  884. state: {
  885. checksum: false,
  886. min_size: 5,
  887. },
  888. frontend: false
  889. )
  890. Setting.create_if_not_exists(
  891. title: 'Ticket Number Increment Date',
  892. name: 'ticket_number_date',
  893. area: 'Ticket::Number',
  894. description: '-',
  895. options: {
  896. form: [
  897. {
  898. display: 'Checksum',
  899. null: true,
  900. name: 'checksum',
  901. tag: 'boolean',
  902. options: {
  903. true => 'yes',
  904. false => 'no',
  905. },
  906. },
  907. ],
  908. },
  909. state: {
  910. checksum: false,
  911. },
  912. frontend: false
  913. )
  914. Setting.create_if_not_exists(
  915. title: 'Enable Ticket creation',
  916. name: 'customer_ticket_create',
  917. area: 'CustomerWeb::Base',
  918. description: 'Defines if a customer can create tickets via the web interface.',
  919. options: {
  920. form: [
  921. {
  922. display: '',
  923. null: true,
  924. name: 'customer_ticket_create',
  925. tag: 'boolean',
  926. options: {
  927. true => 'yes',
  928. false => 'no',
  929. },
  930. },
  931. ],
  932. },
  933. state: true,
  934. frontend: true
  935. )
  936. Setting.create_if_not_exists(
  937. title: 'Group selection for Ticket creation',
  938. name: 'customer_ticket_create_group_ids',
  939. area: 'CustomerWeb::Base',
  940. description: 'Defines groups where customer can create tickets via web interface. "-" means all groups are available.',
  941. options: {
  942. form: [
  943. {
  944. display: '',
  945. null: true,
  946. name: 'group_ids',
  947. tag: 'select',
  948. multiple: true,
  949. nulloption: true,
  950. relation: 'Group',
  951. },
  952. ],
  953. },
  954. state: '',
  955. frontend: true
  956. )
  957. Setting.create_if_not_exists(
  958. title: 'Enable Ticket View/Update',
  959. name: 'customer_ticket_view',
  960. area: 'CustomerWeb::Base',
  961. description: 'Defines if a customer view and update his own tickets.',
  962. options: {
  963. form: [
  964. {
  965. display: '',
  966. null: true,
  967. name: 'customer_ticket_view',
  968. tag: 'boolean',
  969. options: {
  970. true => 'yes',
  971. false => 'no',
  972. },
  973. },
  974. ],
  975. },
  976. state: true,
  977. frontend: true
  978. )
  979. Setting.create_if_not_exists(
  980. title: 'Enable Ticket creation',
  981. name: 'form_ticket_create',
  982. area: 'Form::Base',
  983. description: 'Defines if ticket can get created via web form.',
  984. options: {
  985. form: [
  986. {
  987. display: '',
  988. null: true,
  989. name: 'form_ticket_create',
  990. tag: 'boolean',
  991. options: {
  992. true => 'yes',
  993. false => 'no',
  994. },
  995. },
  996. ],
  997. },
  998. state: false,
  999. frontend: false,
  1000. )
  1001. Setting.create_if_not_exists(
  1002. title: 'Sender Format',
  1003. name: 'ticket_define_email_from',
  1004. area: 'Email::Base',
  1005. description: 'Defines how the From field from the emails (sent from answers and email tickets) should look like.',
  1006. options: {
  1007. form: [
  1008. {
  1009. display: '',
  1010. null: true,
  1011. name: 'ticket_define_email_from',
  1012. tag: 'select',
  1013. options: {
  1014. SystemAddressName: 'System Address Display Name',
  1015. AgentNameSystemAddressName: 'Agent Name + FromSeparator + System Address Display Name',
  1016. },
  1017. },
  1018. ],
  1019. },
  1020. state: 'AgentNameSystemAddressName',
  1021. frontend: false
  1022. )
  1023. Setting.create_if_not_exists(
  1024. title: 'Sender Format Seperator',
  1025. name: 'ticket_define_email_from_seperator',
  1026. area: 'Email::Base',
  1027. description: 'Defines the separator between the agents real name and the given group email address.',
  1028. options: {
  1029. form: [
  1030. {
  1031. display: '',
  1032. null: false,
  1033. name: 'ticket_define_email_from_seperator',
  1034. tag: 'input',
  1035. },
  1036. ],
  1037. },
  1038. state: 'via',
  1039. frontend: false
  1040. )
  1041. Setting.create_if_not_exists(
  1042. title: 'Max. Email Size',
  1043. name: 'postmaster_max_size',
  1044. area: 'Email::Base',
  1045. description: 'Maximal size in MB of emails.',
  1046. options: {
  1047. form: [
  1048. {
  1049. display: '',
  1050. null: true,
  1051. name: 'postmaster_max_size',
  1052. tag: 'select',
  1053. options: {
  1054. 1 => ' 1',
  1055. 2 => ' 2',
  1056. 3 => ' 3',
  1057. 4 => ' 4',
  1058. 5 => ' 5',
  1059. 6 => ' 6',
  1060. 7 => ' 7',
  1061. 8 => ' 8',
  1062. 9 => ' 9',
  1063. 10 => ' 10',
  1064. 15 => ' 15',
  1065. 20 => ' 20',
  1066. 25 => ' 25',
  1067. 30 => ' 30',
  1068. 35 => ' 35',
  1069. 40 => ' 40',
  1070. 45 => ' 45',
  1071. 50 => ' 50',
  1072. 60 => ' 60',
  1073. 70 => ' 70',
  1074. 80 => ' 80',
  1075. 90 => ' 90',
  1076. 100 => '100',
  1077. 125 => '125',
  1078. 150 => '150',
  1079. },
  1080. },
  1081. ],
  1082. },
  1083. state: 10,
  1084. preferences: { online_service_disable: true },
  1085. frontend: false
  1086. )
  1087. Setting.create_if_not_exists(
  1088. title: 'Additional follow up detection',
  1089. name: 'postmaster_follow_up_search_in',
  1090. area: 'Email::Base',
  1091. description: 'In default the follow up check is done via the subject of an email. With this setting you can add more fields where the follow up ckeck is executed.',
  1092. options: {
  1093. form: [
  1094. {
  1095. display: '',
  1096. null: true,
  1097. name: 'postmaster_follow_up_search_in',
  1098. tag: 'checkbox',
  1099. options: {
  1100. 'references' => 'References - Search for follow up also in In-Reply-To or References headers.',
  1101. 'body' => 'Body - Search for follow up also in mail body.',
  1102. 'attachment' => 'Attachment - Search for follow up also in attachments.',
  1103. },
  1104. },
  1105. ],
  1106. },
  1107. state: [],
  1108. frontend: false
  1109. )
  1110. Setting.create_if_not_exists(
  1111. title: 'Notification Sender',
  1112. name: 'notification_sender',
  1113. area: 'Email::Base',
  1114. description: 'Defines the sender of email notifications.',
  1115. options: {
  1116. form: [
  1117. {
  1118. display: '',
  1119. null: false,
  1120. name: 'notification_sender',
  1121. tag: 'input',
  1122. },
  1123. ],
  1124. },
  1125. state: 'Notification Master <noreply@#{config.fqdn}>',
  1126. preferences: { online_service_disable: true },
  1127. frontend: false
  1128. )
  1129. Setting.create_if_not_exists(
  1130. title: 'Block Notifications',
  1131. name: 'send_no_auto_response_reg_exp',
  1132. area: 'Email::Base',
  1133. description: 'If this regex matches, no notification will be send by the sender.',
  1134. options: {
  1135. form: [
  1136. {
  1137. display: '',
  1138. null: false,
  1139. name: 'send_no_auto_response_reg_exp',
  1140. tag: 'input',
  1141. },
  1142. ],
  1143. },
  1144. state: '(MAILER-DAEMON|postmaster|abuse)@.+?\..+?',
  1145. preferences: { online_service_disable: true },
  1146. frontend: false
  1147. )
  1148. Setting.create_if_not_exists(
  1149. title: 'Enable Chat',
  1150. name: 'chat',
  1151. area: 'Chat::Base',
  1152. description: 'Enable/Disable online chat.',
  1153. options: {
  1154. form: [
  1155. {
  1156. display: '',
  1157. null: true,
  1158. name: 'chat',
  1159. tag: 'boolean',
  1160. options: {
  1161. true => 'yes',
  1162. false => 'no',
  1163. },
  1164. },
  1165. ],
  1166. },
  1167. preferences: { render: true },
  1168. state: false,
  1169. frontend: true
  1170. )
  1171. Setting.create_if_not_exists(
  1172. title: 'Agent idle timeout',
  1173. name: 'chat_agent_idle_timeout',
  1174. area: 'Chat::Extended',
  1175. description: 'Idle timeout in seconds till agent is set offline automatically.',
  1176. options: {
  1177. form: [
  1178. {
  1179. display: '',
  1180. null: false,
  1181. name: 'chat_agent_idle_timeout',
  1182. tag: 'input',
  1183. },
  1184. ],
  1185. },
  1186. preferences: {},
  1187. state: '120',
  1188. frontend: true
  1189. )
  1190. Setting.create_if_not_exists(
  1191. title: 'Define searchable models.',
  1192. name: 'models_searchable',
  1193. area: 'Models::Base',
  1194. description: 'Define the models which can be searched for.',
  1195. options: {},
  1196. state: [],
  1197. frontend: false,
  1198. )
  1199. Setting.create_if_not_exists(
  1200. title: 'Default Screen',
  1201. name: 'default_controller',
  1202. area: 'Core',
  1203. description: 'Defines the default controller.',
  1204. options: {},
  1205. state: '#dashboard',
  1206. frontend: true
  1207. )
  1208. Setting.create_if_not_exists(
  1209. title: 'Elasticsearch Endpoint URL',
  1210. name: 'es_url',
  1211. area: 'SearchIndex::Elasticsearch',
  1212. description: 'Define endpoint of Elastic Search.',
  1213. state: '',
  1214. preferences: { online_service_disable: true },
  1215. frontend: false
  1216. )
  1217. Setting.create_if_not_exists(
  1218. title: 'Elasticsearch Endpoint User',
  1219. name: 'es_user',
  1220. area: 'SearchIndex::Elasticsearch',
  1221. description: 'Define http basic auth user of Elasticsearch.',
  1222. state: '',
  1223. preferences: { online_service_disable: true },
  1224. frontend: false
  1225. )
  1226. Setting.create_if_not_exists(
  1227. title: 'Elastic Search Endpoint Password',
  1228. name: 'es_password',
  1229. area: 'SearchIndex::Elasticsearch',
  1230. description: 'Define http basic auth password of Elasticsearch.',
  1231. state: '',
  1232. preferences: { online_service_disable: true },
  1233. frontend: false
  1234. )
  1235. Setting.create_if_not_exists(
  1236. title: 'Elastic Search Endpoint Index',
  1237. name: 'es_index',
  1238. area: 'SearchIndex::Elasticsearch',
  1239. description: 'Define Elasticsearch index name.',
  1240. state: 'zammad',
  1241. preferences: { online_service_disable: true },
  1242. frontend: false
  1243. )
  1244. Setting.create_if_not_exists(
  1245. title: 'Elastic Search Attachment Extentions',
  1246. name: 'es_attachment_ignore',
  1247. area: 'SearchIndex::Elasticsearch',
  1248. description: 'Define attachment extentions which are ignored for Elasticsearch.',
  1249. state: [ '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe', '.box', '.mbox' ],
  1250. preferences: { online_service_disable: true },
  1251. frontend: false
  1252. )
  1253. Setting.create_if_not_exists(
  1254. title: 'Elastic Search Attachment Size',
  1255. name: 'es_attachment_max_size_in_mb',
  1256. area: 'SearchIndex::Elasticsearch',
  1257. description: 'Define max. attachment size for Elasticsearch.',
  1258. state: 50,
  1259. preferences: { online_service_disable: true },
  1260. frontend: false
  1261. )
  1262. Setting.create_if_not_exists(
  1263. title: 'Import Mode',
  1264. name: 'import_mode',
  1265. area: 'Import::Base',
  1266. description: 'Set system in import mode (disable some triggers).',
  1267. options: {
  1268. form: [
  1269. {
  1270. display: '',
  1271. null: true,
  1272. name: 'import_mode',
  1273. tag: 'boolean',
  1274. options: {
  1275. true => 'yes',
  1276. false => 'no',
  1277. },
  1278. },
  1279. ],
  1280. },
  1281. state: false,
  1282. frontend: true
  1283. )
  1284. Setting.create_if_not_exists(
  1285. title: 'Import Backend',
  1286. name: 'import_backend',
  1287. area: 'Import::Base::Internal',
  1288. description: 'Set backend which is used for import.',
  1289. options: {},
  1290. state: '',
  1291. frontend: true
  1292. )
  1293. Setting.create_if_not_exists(
  1294. title: 'Ignore Escalation/SLA Information',
  1295. name: 'import_ignore_sla',
  1296. area: 'Import::Base',
  1297. description: 'Ignore Escalation/SLA Information form import system.',
  1298. options: {
  1299. form: [
  1300. {
  1301. display: '',
  1302. null: true,
  1303. name: 'import_ignore_sla',
  1304. tag: 'boolean',
  1305. options: {
  1306. true => 'yes',
  1307. false => 'no',
  1308. },
  1309. },
  1310. ],
  1311. },
  1312. state: false,
  1313. frontend: true
  1314. )
  1315. Setting.create_if_not_exists(
  1316. title: 'Import Endpoint',
  1317. name: 'import_otrs_endpoint',
  1318. area: 'Import::OTRS',
  1319. description: 'Defines OTRS endpoint to import users, ticket, states and articles.',
  1320. options: {
  1321. form: [
  1322. {
  1323. display: '',
  1324. null: false,
  1325. name: 'import_otrs_endpoint',
  1326. tag: 'input',
  1327. },
  1328. ],
  1329. },
  1330. state: 'http://otrs_host/otrs',
  1331. frontend: false
  1332. )
  1333. Setting.create_if_not_exists(
  1334. title: 'Import Key',
  1335. name: 'import_otrs_endpoint_key',
  1336. area: 'Import::OTRS',
  1337. description: 'Defines OTRS endpoint auth key.',
  1338. options: {
  1339. form: [
  1340. {
  1341. display: '',
  1342. null: false,
  1343. name: 'import_otrs_endpoint_key',
  1344. tag: 'input',
  1345. },
  1346. ],
  1347. },
  1348. state: '',
  1349. frontend: false
  1350. )
  1351. Setting.create_if_not_exists(
  1352. title: 'Import User for http basic authentication',
  1353. name: 'import_otrs_user',
  1354. area: 'Import::OTRS',
  1355. description: 'Defines http basic authentication user (only if OTRS is protected via http basic auth).',
  1356. options: {
  1357. form: [
  1358. {
  1359. display: '',
  1360. null: true,
  1361. name: 'import_otrs_user',
  1362. tag: 'input',
  1363. },
  1364. ],
  1365. },
  1366. state: '',
  1367. frontend: false
  1368. )
  1369. Setting.create_if_not_exists(
  1370. title: 'Import Password for http basic authentication',
  1371. name: 'import_otrs_password',
  1372. area: 'Import::OTRS',
  1373. description: 'Defines http basic authentication password (only if OTRS is protected via http basic auth).',
  1374. options: {
  1375. form: [
  1376. {
  1377. display: '',
  1378. null: true,
  1379. name: 'import_otrs_password',
  1380. tag: 'input',
  1381. },
  1382. ],
  1383. },
  1384. state: '',
  1385. frontend: false
  1386. )
  1387. Setting.create_if_not_exists(
  1388. title: 'Import Endpoint',
  1389. name: 'import_zendesk_endpoint',
  1390. area: 'Import::Zendesk',
  1391. description: 'Defines Zendesk endpoint to import users, ticket, states and articles.',
  1392. options: {
  1393. form: [
  1394. {
  1395. display: '',
  1396. null: false,
  1397. name: 'import_zendesk_endpoint',
  1398. tag: 'input',
  1399. },
  1400. ],
  1401. },
  1402. state: 'https://yours.zendesk.com/api/v2',
  1403. frontend: false
  1404. )
  1405. Setting.create_if_not_exists(
  1406. title: 'Import Key for requesting the Zendesk API',
  1407. name: 'import_zendesk_endpoint_key',
  1408. area: 'Import::Zendesk',
  1409. description: 'Defines Zendesk endpoint auth key.',
  1410. options: {
  1411. form: [
  1412. {
  1413. display: '',
  1414. null: false,
  1415. name: 'import_zendesk_endpoint_key',
  1416. tag: 'input',
  1417. },
  1418. ],
  1419. },
  1420. state: '',
  1421. frontend: false
  1422. )
  1423. Setting.create_if_not_exists(
  1424. title: 'Import User for requesting the Zendesk API',
  1425. name: 'import_zendesk_endpoint_username',
  1426. area: 'Import::Zendesk',
  1427. description: 'Defines Zendesk endpoint auth key.',
  1428. options: {
  1429. form: [
  1430. {
  1431. display: '',
  1432. null: true,
  1433. name: 'import_zendesk_endpoint_username',
  1434. tag: 'input',
  1435. },
  1436. ],
  1437. },
  1438. state: '',
  1439. frontend: false
  1440. )
  1441. Setting.create_if_not_exists(
  1442. title: 'Default calendar Tickets subscriptions',
  1443. name: 'defaults_calendar_subscriptions_tickets',
  1444. area: 'Defaults::CalendarSubscriptions',
  1445. description: 'Defines the default calendar Tickets subscription settings.',
  1446. options: {},
  1447. state: {
  1448. escalation: {
  1449. own: true,
  1450. not_assigned: false,
  1451. },
  1452. new_open: {
  1453. own: true,
  1454. not_assigned: false,
  1455. },
  1456. pending: {
  1457. own: true,
  1458. not_assigned: false,
  1459. }
  1460. },
  1461. frontend: true
  1462. )
  1463. Setting.create_if_not_exists(
  1464. title: 'Define translator identifier.',
  1465. name: 'translator_key',
  1466. area: 'i18n::translator_key',
  1467. description: 'Defines the translator identifier for contributions.',
  1468. options: {},
  1469. state: '',
  1470. frontend: false
  1471. )
  1472. signature = Signature.create_if_not_exists(
  1473. id: 1,
  1474. name: 'default',
  1475. body: '
  1476. #{user.firstname} #{user.lastname}
  1477. --
  1478. Super Support - Waterford Business Park
  1479. 5201 Blue Lagoon Drive - 8th Floor & 9th Floor - Miami, 33126 USA
  1480. Email: hot@example.com - Web: http://www.example.com/
  1481. --',
  1482. updated_by_id: 1,
  1483. created_by_id: 1
  1484. )
  1485. Role.create_if_not_exists(
  1486. id: 1,
  1487. name: 'Admin',
  1488. note: 'To configure your system.',
  1489. updated_by_id: 1,
  1490. created_by_id: 1
  1491. )
  1492. Role.create_if_not_exists(
  1493. id: 2,
  1494. name: 'Agent',
  1495. note: 'To work on Tickets.',
  1496. updated_by_id: 1,
  1497. created_by_id: 1
  1498. )
  1499. Role.create_if_not_exists(
  1500. id: 3,
  1501. name: 'Customer',
  1502. note: 'People who create Tickets ask for help.',
  1503. updated_by_id: 1,
  1504. created_by_id: 1
  1505. )
  1506. Role.create_if_not_exists(
  1507. id: 4,
  1508. name: 'Report',
  1509. note: 'Access the report area.',
  1510. created_by_id: 1,
  1511. updated_by_id: 1,
  1512. )
  1513. Role.create_if_not_exists(
  1514. id: 5,
  1515. name: 'Chat',
  1516. note: 'Access to chat feature.',
  1517. updated_by_id: 1,
  1518. created_by_id: 1
  1519. )
  1520. Group.create_if_not_exists(
  1521. id: 1,
  1522. name: 'Users',
  1523. signature_id: signature.id,
  1524. note: 'Standard Group/Pool for Tickets.',
  1525. updated_by_id: 1,
  1526. created_by_id: 1
  1527. )
  1528. user = User.create_if_not_exists(
  1529. id: 1,
  1530. login: '-',
  1531. firstname: '-',
  1532. lastname: '',
  1533. email: '',
  1534. password: 'root',
  1535. active: false,
  1536. updated_by_id: 1,
  1537. created_by_id: 1
  1538. )
  1539. UserInfo.current_user_id = 1
  1540. roles = Role.where( name: 'Customer' )
  1541. organizations = Organization.all
  1542. groups = Group.all
  1543. org_community = Organization.create_if_not_exists(
  1544. id: 1,
  1545. name: 'Zammad Foundation',
  1546. )
  1547. user_community = User.create_or_update(
  1548. id: 2,
  1549. login: 'nicole.braun@zammad.org',
  1550. firstname: 'Nicole',
  1551. lastname: 'Braun',
  1552. email: 'nicole.braun@zammad.org',
  1553. password: '',
  1554. active: true,
  1555. roles: roles,
  1556. organization_id: org_community.id,
  1557. )
  1558. Link::Type.create_if_not_exists( id: 1, name: 'normal' )
  1559. Link::Object.create_if_not_exists( id: 1, name: 'Ticket' )
  1560. Link::Object.create_if_not_exists( id: 2, name: 'Announcement' )
  1561. Link::Object.create_if_not_exists( id: 3, name: 'Question/Answer' )
  1562. Link::Object.create_if_not_exists( id: 4, name: 'Idea' )
  1563. Link::Object.create_if_not_exists( id: 5, name: 'Bug' )
  1564. Ticket::StateType.create_if_not_exists( id: 1, name: 'new' )
  1565. Ticket::StateType.create_if_not_exists( id: 2, name: 'open' )
  1566. Ticket::StateType.create_if_not_exists( id: 3, name: 'pending reminder' )
  1567. Ticket::StateType.create_if_not_exists( id: 4, name: 'pending action' )
  1568. Ticket::StateType.create_if_not_exists( id: 5, name: 'closed' )
  1569. Ticket::StateType.create_if_not_exists( id: 6, name: 'merged' )
  1570. Ticket::StateType.create_if_not_exists( id: 7, name: 'removed' )
  1571. Ticket::State.create_if_not_exists( id: 1, name: 'new', state_type_id: Ticket::StateType.find_by(name: 'new').id, )
  1572. Ticket::State.create_if_not_exists( id: 2, name: 'open', state_type_id: Ticket::StateType.find_by(name: 'open').id )
  1573. Ticket::State.create_if_not_exists( id: 3, name: 'pending reminder', state_type_id: Ticket::StateType.find_by(name: 'pending reminder').id, ignore_escalation: true )
  1574. Ticket::State.create_if_not_exists( id: 4, name: 'closed', state_type_id: Ticket::StateType.find_by(name: 'closed').id, ignore_escalation: true )
  1575. Ticket::State.create_if_not_exists( id: 5, name: 'merged', state_type_id: Ticket::StateType.find_by(name: 'merged').id, ignore_escalation: true )
  1576. Ticket::State.create_if_not_exists( id: 6, name: 'removed', state_type_id: Ticket::StateType.find_by(name: 'removed').id, active: false, ignore_escalation: true )
  1577. Ticket::State.create_if_not_exists( id: 7, name: 'pending close', state_type_id: Ticket::StateType.find_by(name: 'pending action').id, next_state_id: 4, ignore_escalation: true )
  1578. Ticket::Priority.create_if_not_exists( id: 1, name: '1 low' )
  1579. Ticket::Priority.create_if_not_exists( id: 2, name: '2 normal' )
  1580. Ticket::Priority.create_if_not_exists( id: 3, name: '3 high' )
  1581. Ticket::Article::Type.create_if_not_exists( id: 1, name: 'email', communication: true )
  1582. Ticket::Article::Type.create_if_not_exists( id: 2, name: 'sms', communication: true )
  1583. Ticket::Article::Type.create_if_not_exists( id: 3, name: 'chat', communication: true )
  1584. Ticket::Article::Type.create_if_not_exists( id: 4, name: 'fax', communication: true )
  1585. Ticket::Article::Type.create_if_not_exists( id: 5, name: 'phone', communication: true )
  1586. Ticket::Article::Type.create_if_not_exists( id: 6, name: 'twitter status', communication: true )
  1587. Ticket::Article::Type.create_if_not_exists( id: 7, name: 'twitter direct-message', communication: true )
  1588. Ticket::Article::Type.create_if_not_exists( id: 8, name: 'facebook feed post', communication: true )
  1589. Ticket::Article::Type.create_if_not_exists( id: 9, name: 'facebook feed comment', communication: true )
  1590. Ticket::Article::Type.create_if_not_exists( id: 10, name: 'note', communication: false )
  1591. Ticket::Article::Type.create_if_not_exists( id: 11, name: 'web', communication: true )
  1592. Ticket::Article::Sender.create_if_not_exists( id: 1, name: 'Agent' )
  1593. Ticket::Article::Sender.create_if_not_exists( id: 2, name: 'Customer' )
  1594. Ticket::Article::Sender.create_if_not_exists( id: 3, name: 'System' )
  1595. Macro.create_if_not_exists(
  1596. name: 'Close & Tag as Spam',
  1597. perform: {
  1598. 'ticket.state_id': {
  1599. value: Ticket::State.find_by(name: 'closed').id,
  1600. },
  1601. 'ticket.tags': {
  1602. operator: 'add',
  1603. value: 'spam',
  1604. },
  1605. },
  1606. note: 'example macro',
  1607. active: true,
  1608. )
  1609. UserInfo.current_user_id = user_community.id
  1610. ticket = Ticket.create(
  1611. group_id: Group.where( name: 'Users' ).first.id,
  1612. customer_id: User.where( login: 'nicole.braun@zammad.org' ).first.id,
  1613. owner_id: User.where( login: '-' ).first.id,
  1614. title: 'Welcome to Zammad!',
  1615. state_id: Ticket::State.where( name: 'new' ).first.id,
  1616. priority_id: Ticket::Priority.where( name: '2 normal' ).first.id,
  1617. )
  1618. Ticket::Article.create(
  1619. ticket_id: ticket.id,
  1620. type_id: Ticket::Article::Type.where(name: 'phone' ).first.id,
  1621. sender_id: Ticket::Article::Sender.where(name: 'Customer' ).first.id,
  1622. from: 'Zammad Feedback <feedback@zammad.org>',
  1623. body: 'Welcome!
  1624. Thank you for installing Zammad.
  1625. You will find updates and patches at http://zammad.org/. Online
  1626. documentation is available at http://guides.zammad.org/. You can also
  1627. use our forums at http://forums.zammad.org/
  1628. Regards,
  1629. The Zammad.org Project
  1630. ',
  1631. internal: false,
  1632. )
  1633. UserInfo.current_user_id = 1
  1634. overview_role = Role.where( name: 'Agent' ).first
  1635. Overview.create_if_not_exists(
  1636. name: 'My assigned Tickets',
  1637. link: 'my_assigned',
  1638. prio: 1000,
  1639. role_id: overview_role.id,
  1640. condition: {
  1641. 'ticket.state_id' => {
  1642. operator: 'is',
  1643. value: [ 1, 2, 3, 7 ],
  1644. },
  1645. 'ticket.owner_id' => {
  1646. operator: 'is',
  1647. pre_condition: 'current_user.id',
  1648. },
  1649. },
  1650. order: {
  1651. by: 'created_at',
  1652. direction: 'ASC',
  1653. },
  1654. view: {
  1655. d: %w(title customer group created_at),
  1656. s: %w(title customer group created_at),
  1657. m: %w(number title customer group created_at),
  1658. view_mode_default: 's',
  1659. },
  1660. )
  1661. Overview.create_if_not_exists(
  1662. name: 'Unassigned & Open',
  1663. link: 'all_unassigned',
  1664. prio: 1010,
  1665. role_id: overview_role.id,
  1666. condition: {
  1667. 'ticket.state_id' => {
  1668. operator: 'is',
  1669. value: [1, 2, 3],
  1670. },
  1671. 'ticket.owner_id' => {
  1672. operator: 'is',
  1673. value: 1,
  1674. },
  1675. },
  1676. order: {
  1677. by: 'created_at',
  1678. direction: 'ASC',
  1679. },
  1680. view: {
  1681. d: %w(title customer group created_at),
  1682. s: %w(title customer group created_at),
  1683. m: %w(number title customer group created_at),
  1684. view_mode_default: 's',
  1685. },
  1686. )
  1687. Overview.create_if_not_exists(
  1688. name: 'My pending reached Tickets',
  1689. link: 'my_pending_reached',
  1690. prio: 1020,
  1691. role_id: overview_role.id,
  1692. condition: {
  1693. 'ticket.state_id' => {
  1694. operator: 'is',
  1695. value: 3,
  1696. },
  1697. 'ticket.owner_id' => {
  1698. operator: 'is',
  1699. pre_condition: 'current_user.id',
  1700. },
  1701. 'ticket.pending_time' => {
  1702. operator: 'within next (relative)',
  1703. value: 0,
  1704. range: 'minute',
  1705. },
  1706. },
  1707. order: {
  1708. by: 'created_at',
  1709. direction: 'ASC',
  1710. },
  1711. view: {
  1712. d: %w(title customer group created_at),
  1713. s: %w(title customer group created_at),
  1714. m: %w(number title customer group created_at),
  1715. view_mode_default: 's',
  1716. },
  1717. )
  1718. Overview.create_if_not_exists(
  1719. name: 'Open',
  1720. link: 'all_open',
  1721. prio: 1030,
  1722. role_id: overview_role.id,
  1723. condition: {
  1724. 'ticket.state_id' => {
  1725. operator: 'is',
  1726. value: [1, 2, 3],
  1727. },
  1728. },
  1729. order: {
  1730. by: 'created_at',
  1731. direction: 'ASC',
  1732. },
  1733. view: {
  1734. d: %w(title customer group state owner created_at),
  1735. s: %w(title customer group state owner created_at),
  1736. m: %w(number title customer group state owner created_at),
  1737. view_mode_default: 's',
  1738. },
  1739. )
  1740. Overview.create_if_not_exists(
  1741. name: 'Pending reached',
  1742. link: 'all_pending_reached',
  1743. prio: 1040,
  1744. role_id: overview_role.id,
  1745. condition: {
  1746. 'ticket.state_id' => {
  1747. operator: 'is',
  1748. value: [3],
  1749. },
  1750. 'ticket.pending_time' => {
  1751. operator: 'within next (relative)',
  1752. value: 0,
  1753. range: 'minute',
  1754. },
  1755. },
  1756. order: {
  1757. by: 'created_at',
  1758. direction: 'ASC',
  1759. },
  1760. view: {
  1761. d: %w(title customer group owner created_at),
  1762. s: %w(title customer group owner created_at),
  1763. m: %w(number title customer group owner created_at),
  1764. view_mode_default: 's',
  1765. },
  1766. )
  1767. Overview.create_if_not_exists(
  1768. name: 'Escalated',
  1769. link: 'all_escalated',
  1770. prio: 1050,
  1771. role_id: overview_role.id,
  1772. condition: {
  1773. 'ticket.escalation_time' => {
  1774. operator: 'within next (relative)',
  1775. value: '10',
  1776. range: 'minute',
  1777. },
  1778. },
  1779. order: {
  1780. by: 'escalation_time',
  1781. direction: 'ASC',
  1782. },
  1783. view: {
  1784. d: %w(title customer group owner escalation_time),
  1785. s: %w(title customer group owner escalation_time),
  1786. m: %w(number title customer group owner escalation_time),
  1787. view_mode_default: 's',
  1788. },
  1789. )
  1790. overview_role = Role.where( name: 'Customer' ).first
  1791. Overview.create_if_not_exists(
  1792. name: 'My Tickets',
  1793. link: 'my_tickets',
  1794. prio: 1100,
  1795. role_id: overview_role.id,
  1796. condition: {
  1797. 'ticket.state_id' => {
  1798. operator: 'is',
  1799. value: [ 1, 2, 3, 4, 6, 7 ],
  1800. },
  1801. 'ticket.customer_id' => {
  1802. operator: 'is',
  1803. pre_condition: 'current_user.id',
  1804. },
  1805. },
  1806. order: {
  1807. by: 'created_at',
  1808. direction: 'DESC',
  1809. },
  1810. view: {
  1811. d: %w(title customer state created_at),
  1812. s: %w(number title state created_at),
  1813. m: %w(number title state created_at),
  1814. view_mode_default: 's',
  1815. },
  1816. )
  1817. Overview.create_if_not_exists(
  1818. name: 'My Organization Tickets',
  1819. link: 'my_organization_tickets',
  1820. prio: 1200,
  1821. role_id: overview_role.id,
  1822. organization_shared: true,
  1823. condition: {
  1824. 'ticket.state_id' => {
  1825. operator: 'is',
  1826. value: [ 1, 2, 3, 4, 6, 7 ],
  1827. },
  1828. 'ticket.organization_id' => {
  1829. operator: 'is',
  1830. pre_condition: 'current_user.organization_id',
  1831. },
  1832. },
  1833. order: {
  1834. by: 'created_at',
  1835. direction: 'DESC',
  1836. },
  1837. view: {
  1838. d: %w(title customer state created_at),
  1839. s: %w(number title customer state created_at),
  1840. m: %w(number title customer state created_at),
  1841. view_mode_default: 's',
  1842. },
  1843. )
  1844. Channel.create_if_not_exists(
  1845. area: 'Email::Notification',
  1846. options: {
  1847. outbound: {
  1848. adapter: 'smtp',
  1849. options: {
  1850. host: 'host.example.com',
  1851. user: '',
  1852. password: '',
  1853. ssl: true,
  1854. },
  1855. },
  1856. },
  1857. group_id: 1,
  1858. preferences: { online_service_disable: true },
  1859. active: false,
  1860. )
  1861. Channel.create_if_not_exists(
  1862. area: 'Email::Notification',
  1863. options: {
  1864. outbound: {
  1865. adapter: 'sendmail',
  1866. },
  1867. },
  1868. preferences: { online_service_disable: true },
  1869. active: true,
  1870. )
  1871. Report::Profile.create_if_not_exists(
  1872. name: '-all-',
  1873. condition: {},
  1874. active: true,
  1875. updated_by_id: 1,
  1876. created_by_id: 1,
  1877. )
  1878. chat = Chat.create_if_not_exists(
  1879. name: 'default',
  1880. max_queue: 5,
  1881. note: '',
  1882. active: true,
  1883. updated_by_id: 1,
  1884. created_by_id: 1,
  1885. )
  1886. network = Network.create_if_not_exists(
  1887. id: 1,
  1888. name: 'base',
  1889. )
  1890. Network::Category::Type.create_if_not_exists(
  1891. id: 1,
  1892. name: 'Announcement',
  1893. )
  1894. Network::Category::Type.create_if_not_exists(
  1895. id: 2,
  1896. name: 'Idea',
  1897. )
  1898. Network::Category::Type.create_if_not_exists(
  1899. id: 3,
  1900. name: 'Question',
  1901. )
  1902. Network::Category::Type.create_if_not_exists(
  1903. id: 4,
  1904. name: 'Bug Report',
  1905. )
  1906. Network::Privacy.create_if_not_exists(
  1907. id: 1,
  1908. name: 'logged in',
  1909. key: 'loggedIn',
  1910. )
  1911. Network::Privacy.create_if_not_exists(
  1912. id: 2,
  1913. name: 'logged in and moderator',
  1914. key: 'loggedInModerator',
  1915. )
  1916. Network::Category.create_if_not_exists(
  1917. id: 1,
  1918. name: 'Announcements',
  1919. network_id: network.id,
  1920. network_category_type_id: Network::Category::Type.where(name: 'Announcement').first.id,
  1921. network_privacy_id: Network::Privacy.where(name: 'logged in and moderator').first.id,
  1922. allow_comments: true,
  1923. )
  1924. Network::Category.create_if_not_exists(
  1925. id: 2,
  1926. name: 'Questions',
  1927. network_id: network.id,
  1928. allow_comments: true,
  1929. network_category_type_id: Network::Category::Type.where(name: 'Question').first.id,
  1930. network_privacy_id: Network::Privacy.where(name: 'logged in').first.id,
  1931. # :network_categories_moderator_user_ids => User.where(:login => '-').first.id,
  1932. )
  1933. Network::Category.create_if_not_exists(
  1934. id: 3,
  1935. name: 'Ideas',
  1936. network_id: network.id,
  1937. network_category_type_id: Network::Category::Type.where(name: 'Idea').first.id,
  1938. network_privacy_id: Network::Privacy.where(name: 'logged in').first.id,
  1939. allow_comments: true,
  1940. )
  1941. Network::Category.create_if_not_exists(
  1942. id: 4,
  1943. name: 'Bug Reports',
  1944. network_id: network.id,
  1945. network_category_type_id: Network::Category::Type.where(name: 'Bug Report').first.id,
  1946. network_privacy_id: Network::Privacy.where(name: 'logged in').first.id,
  1947. allow_comments: true,
  1948. )
  1949. item = Network::Item.create(
  1950. title: 'Example Announcement',
  1951. body: 'Some announcement....',
  1952. network_category_id: Network::Category.where(name: 'Announcements').first.id,
  1953. )
  1954. Network::Item::Comment.create(
  1955. network_item_id: item.id,
  1956. body: 'Some comment....',
  1957. )
  1958. item = Network::Item.create(
  1959. title: 'Example Question?',
  1960. body: 'Some questions....',
  1961. network_category_id: Network::Category.where(name: 'Questions').first.id,
  1962. )
  1963. Network::Item::Comment.create(
  1964. network_item_id: item.id,
  1965. body: 'Some comment....',
  1966. )
  1967. item = Network::Item.create(
  1968. title: 'Example Idea',
  1969. body: 'Some idea....',
  1970. network_category_id: Network::Category.where(name: 'Ideas').first.id,
  1971. )
  1972. Network::Item::Comment.create(
  1973. network_item_id: item.id,
  1974. body: 'Some comment....',
  1975. )
  1976. item = Network::Item.create(
  1977. title: 'Example Bug Report',
  1978. body: 'Some bug....',
  1979. network_category_id: Network::Category.where(name: 'Bug Reports').first.id,
  1980. )
  1981. Network::Item::Comment.create(
  1982. network_item_id: item.id,
  1983. body: 'Some comment....',
  1984. )
  1985. ObjectManager::Attribute.add(
  1986. object: 'Ticket',
  1987. name: 'title',
  1988. display: 'Title',
  1989. data_type: 'input',
  1990. data_option: {
  1991. type: 'text',
  1992. maxlength: 200,
  1993. null: false,
  1994. translate: false,
  1995. },
  1996. editable: false,
  1997. active: true,
  1998. screens: {
  1999. create_top: {
  2000. '-all-' => {
  2001. null: false,
  2002. },
  2003. },
  2004. edit: {},
  2005. },
  2006. pending_migration: false,
  2007. position: 15,
  2008. )
  2009. ObjectManager::Attribute.add(
  2010. object: 'Ticket',
  2011. name: 'customer_id',
  2012. display: 'Customer',
  2013. data_type: 'user_autocompletion',
  2014. data_option: {
  2015. relation: 'User',
  2016. autocapitalize: false,
  2017. multiple: false,
  2018. null: false,
  2019. limit: 200,
  2020. placeholder: 'Enter Person or Organization/Company',
  2021. minLengt: 2,
  2022. translate: false,
  2023. },
  2024. editable: false,
  2025. active: true,
  2026. screens: {
  2027. create_top: {
  2028. Agent: {
  2029. null: false,
  2030. },
  2031. },
  2032. edit: {},
  2033. },
  2034. pending_migration: false,
  2035. position: 10,
  2036. )
  2037. ObjectManager::Attribute.add(
  2038. object: 'Ticket',
  2039. name: 'type',
  2040. display: 'Type',
  2041. data_type: 'select',
  2042. data_option: {
  2043. options: {
  2044. 'Incident' => 'Incident',
  2045. 'Problem' => 'Problem',
  2046. 'Request for Change' => 'Request for Change',
  2047. },
  2048. nulloption: true,
  2049. multiple: false,
  2050. null: true,
  2051. translate: true,
  2052. },
  2053. editable: false,
  2054. active: false,
  2055. screens: {
  2056. create_middle: {
  2057. '-all-' => {
  2058. null: false,
  2059. item_class: 'column',
  2060. },
  2061. },
  2062. edit: {
  2063. Agent: {
  2064. null: false,
  2065. },
  2066. },
  2067. },
  2068. pending_migration: false,
  2069. position: 20,
  2070. )
  2071. ObjectManager::Attribute.add(
  2072. object: 'Ticket',
  2073. name: 'group_id',
  2074. display: 'Group',
  2075. data_type: 'select',
  2076. data_option: {
  2077. relation: 'Group',
  2078. relation_condition: { access: 'rw' },
  2079. nulloption: true,
  2080. multiple: false,
  2081. null: false,
  2082. translate: false,
  2083. },
  2084. editable: false,
  2085. active: true,
  2086. screens: {
  2087. create_middle: {
  2088. '-all-' => {
  2089. null: false,
  2090. item_class: 'column',
  2091. },
  2092. },
  2093. edit: {
  2094. Agent: {
  2095. null: false,
  2096. },
  2097. },
  2098. },
  2099. pending_migration: false,
  2100. position: 25,
  2101. )
  2102. ObjectManager::Attribute.add(
  2103. object: 'Ticket',
  2104. name: 'owner_id',
  2105. display: 'Owner',
  2106. data_type: 'select',
  2107. data_option: {
  2108. relation: 'User',
  2109. relation_condition: { roles: 'Agent' },
  2110. nulloption: true,
  2111. multiple: false,
  2112. null: true,
  2113. translate: false,
  2114. },
  2115. editable: false,
  2116. active: true,
  2117. screens: {
  2118. create_middle: {
  2119. Agent: {
  2120. null: true,
  2121. item_class: 'column',
  2122. },
  2123. },
  2124. edit: {
  2125. Agent: {
  2126. null: true,
  2127. },
  2128. },
  2129. },
  2130. pending_migration: false,
  2131. position: 30,
  2132. )
  2133. ObjectManager::Attribute.add(
  2134. object: 'Ticket',
  2135. name: 'state_id',
  2136. display: 'State',
  2137. data_type: 'select',
  2138. data_option: {
  2139. relation: 'TicketState',
  2140. nulloption: true,
  2141. multiple: false,
  2142. null: false,
  2143. default: 2,
  2144. translate: true,
  2145. filter: [1, 2, 3, 4, 7],
  2146. },
  2147. editable: false,
  2148. active: true,
  2149. screens: {
  2150. create_middle: {
  2151. Agent: {
  2152. null: false,
  2153. item_class: 'column',
  2154. },
  2155. Customer: {
  2156. item_class: 'column',
  2157. nulloption: false,
  2158. null: true,
  2159. filter: [1, 4],
  2160. default: 1,
  2161. },
  2162. },
  2163. edit: {
  2164. Agent: {
  2165. nulloption: false,
  2166. null: false,
  2167. filter: [2, 3, 4, 7],
  2168. },
  2169. Customer: {
  2170. nulloption: false,
  2171. null: true,
  2172. filter: [2, 4],
  2173. default: 2,
  2174. },
  2175. },
  2176. },
  2177. pending_migration: false,
  2178. position: 40,
  2179. )
  2180. ObjectManager::Attribute.add(
  2181. object: 'Ticket',
  2182. name: 'pending_time',
  2183. display: 'Pending till',
  2184. data_type: 'datetime',
  2185. data_option: {
  2186. future: true,
  2187. past: false,
  2188. diff: 24,
  2189. null: true,
  2190. translate: true,
  2191. required_if: {
  2192. state_id: [3, 7]
  2193. },
  2194. shown_if: {
  2195. state_id: [3, 7]
  2196. },
  2197. },
  2198. editable: false,
  2199. active: true,
  2200. screens: {
  2201. create_middle: {
  2202. '-all-' => {
  2203. null: false,
  2204. item_class: 'column',
  2205. },
  2206. },
  2207. edit: {
  2208. Agent: {
  2209. null: false,
  2210. },
  2211. },
  2212. },
  2213. pending_migration: false,
  2214. position: 41,
  2215. )
  2216. ObjectManager::Attribute.add(
  2217. object: 'Ticket',
  2218. name: 'priority_id',
  2219. display: 'Priority',
  2220. data_type: 'select',
  2221. data_option: {
  2222. relation: 'TicketPriority',
  2223. nulloption: true,
  2224. multiple: false,
  2225. null: false,
  2226. default: 2,
  2227. translate: true,
  2228. },
  2229. editable: false,
  2230. active: true,
  2231. screens: {
  2232. create_middle: {
  2233. Agent: {
  2234. null: false,
  2235. item_class: 'column',
  2236. },
  2237. },
  2238. edit: {
  2239. Agent: {
  2240. null: false,
  2241. nulloption: false,
  2242. },
  2243. },
  2244. },
  2245. pending_migration: false,
  2246. position: 80,
  2247. )
  2248. ObjectManager::Attribute.add(
  2249. object: 'Ticket',
  2250. name: 'tags',
  2251. display: 'Tags',
  2252. data_type: 'tag',
  2253. data_option: {
  2254. type: 'text',
  2255. null: true,
  2256. translate: false,
  2257. },
  2258. editable: false,
  2259. active: true,
  2260. screens: {
  2261. create_bottom: {
  2262. Agent: {
  2263. null: true,
  2264. },
  2265. },
  2266. edit: {},
  2267. },
  2268. pending_migration: false,
  2269. position: 900,
  2270. )
  2271. ObjectManager::Attribute.add(
  2272. object: 'TicketArticle',
  2273. name: 'type_id',
  2274. display: 'Type',
  2275. data_type: 'select',
  2276. data_option: {
  2277. relation: 'TicketArticleType',
  2278. nulloption: false,
  2279. multiple: false,
  2280. null: false,
  2281. default: 9,
  2282. translate: true,
  2283. },
  2284. editable: false,
  2285. active: true,
  2286. screens: {
  2287. create_middle: {},
  2288. edit: {
  2289. Agent: {
  2290. null: false,
  2291. },
  2292. },
  2293. },
  2294. pending_migration: false,
  2295. position: 100,
  2296. )
  2297. ObjectManager::Attribute.add(
  2298. object: 'TicketArticle',
  2299. name: 'internal',
  2300. display: 'Visibility',
  2301. data_type: 'select',
  2302. data_option: {
  2303. options: { true: 'internal', false: 'public' },
  2304. nulloption: false,
  2305. multiple: false,
  2306. null: true,
  2307. default: false,
  2308. translate: true,
  2309. },
  2310. editable: false,
  2311. active: true,
  2312. screens: {
  2313. create_middle: {},
  2314. edit: {
  2315. Agent: {
  2316. null: false,
  2317. },
  2318. },
  2319. },
  2320. pending_migration: false,
  2321. position: 200,
  2322. )
  2323. ObjectManager::Attribute.add(
  2324. object: 'TicketArticle',
  2325. name: 'to',
  2326. display: 'To',
  2327. data_type: 'input',
  2328. data_option: {
  2329. type: 'text',
  2330. maxlength: 1000,
  2331. null: true,
  2332. },
  2333. editable: false,
  2334. active: true,
  2335. screens: {
  2336. create_middle: {},
  2337. edit: {
  2338. Agent: {
  2339. null: true,
  2340. },
  2341. },
  2342. },
  2343. pending_migration: false,
  2344. position: 300,
  2345. )
  2346. ObjectManager::Attribute.add(
  2347. object: 'TicketArticle',
  2348. name: 'cc',
  2349. display: 'Cc',
  2350. data_type: 'input',
  2351. data_option: {
  2352. type: 'text',
  2353. maxlength: 1000,
  2354. null: true,
  2355. },
  2356. editable: false,
  2357. active: true,
  2358. screens: {
  2359. create_phone_in: {},
  2360. create_phone_out: {},
  2361. create_email_out: {
  2362. '-all-' => {
  2363. null: true,
  2364. }
  2365. },
  2366. create_middle: {},
  2367. edit: {
  2368. Agent: {
  2369. null: true,
  2370. },
  2371. },
  2372. },
  2373. pending_migration: false,
  2374. position: 400,
  2375. )
  2376. ObjectManager::Attribute.add(
  2377. object: 'TicketArticle',
  2378. name: 'body',
  2379. display: 'Text',
  2380. data_type: 'richtext',
  2381. data_option: {
  2382. type: 'richtext',
  2383. maxlength: 20_000,
  2384. upload: true,
  2385. rows: 8,
  2386. null: true,
  2387. },
  2388. editable: false,
  2389. active: true,
  2390. screens: {
  2391. create_top: {
  2392. '-all-' => {
  2393. null: false,
  2394. },
  2395. },
  2396. edit: {
  2397. Agent: {
  2398. null: true,
  2399. },
  2400. Customer: {
  2401. null: false,
  2402. },
  2403. },
  2404. },
  2405. pending_migration: false,
  2406. position: 600,
  2407. )
  2408. ObjectManager::Attribute.add(
  2409. object: 'User',
  2410. name: 'login',
  2411. display: 'Login',
  2412. data_type: 'input',
  2413. data_option: {
  2414. type: 'text',
  2415. maxlength: 100,
  2416. null: true,
  2417. autocapitalize: false,
  2418. item_class: 'formGroup--halfSize',
  2419. },
  2420. editable: false,
  2421. active: true,
  2422. screens: {
  2423. signup: {},
  2424. invite_agent: {},
  2425. edit: {},
  2426. view: {
  2427. '-all-' => {
  2428. shown: false,
  2429. },
  2430. },
  2431. },
  2432. pending_migration: false,
  2433. position: 100,
  2434. )
  2435. ObjectManager::Attribute.add(
  2436. object: 'User',
  2437. name: 'firstname',
  2438. display: 'Firstname',
  2439. data_type: 'input',
  2440. data_option: {
  2441. type: 'text',
  2442. maxlength: 150,
  2443. null: false,
  2444. item_class: 'formGroup--halfSize',
  2445. },
  2446. editable: false,
  2447. active: true,
  2448. screens: {
  2449. signup: {
  2450. '-all-' => {
  2451. null: false,
  2452. },
  2453. },
  2454. invite_agent: {
  2455. '-all-' => {
  2456. null: false,
  2457. },
  2458. },
  2459. edit: {
  2460. '-all-' => {
  2461. null: false,
  2462. },
  2463. },
  2464. view: {
  2465. '-all-' => {
  2466. shown: true,
  2467. },
  2468. },
  2469. },
  2470. pending_migration: false,
  2471. position: 200,
  2472. )
  2473. ObjectManager::Attribute.add(
  2474. object: 'User',
  2475. name: 'lastname',
  2476. display: 'Lastname',
  2477. data_type: 'input',
  2478. data_option: {
  2479. type: 'text',
  2480. maxlength: 150,
  2481. null: false,
  2482. item_class: 'formGroup--halfSize',
  2483. },
  2484. editable: false,
  2485. active: true,
  2486. screens: {
  2487. signup: {
  2488. '-all-' => {
  2489. null: false,
  2490. },
  2491. },
  2492. invite_agent: {
  2493. '-all-' => {
  2494. null: false,
  2495. },
  2496. },
  2497. edit: {
  2498. '-all-' => {
  2499. null: false,
  2500. },
  2501. },
  2502. view: {
  2503. '-all-' => {
  2504. shown: true,
  2505. },
  2506. },
  2507. },
  2508. pending_migration: false,
  2509. position: 300,
  2510. )
  2511. ObjectManager::Attribute.add(
  2512. object: 'User',
  2513. name: 'email',
  2514. display: 'Email',
  2515. data_type: 'input',
  2516. data_option: {
  2517. type: 'email',
  2518. maxlength: 150,
  2519. null: false,
  2520. item_class: 'formGroup--halfSize',
  2521. },
  2522. editable: false,
  2523. active: true,
  2524. screens: {
  2525. signup: {
  2526. '-all-' => {
  2527. null: false,
  2528. },
  2529. },
  2530. invite_agent: {
  2531. '-all-' => {
  2532. null: false,
  2533. },
  2534. },
  2535. edit: {
  2536. '-all-' => {
  2537. null: false,
  2538. },
  2539. },
  2540. view: {
  2541. '-all-' => {
  2542. shown: true,
  2543. },
  2544. },
  2545. },
  2546. pending_migration: false,
  2547. position: 400,
  2548. )
  2549. ObjectManager::Attribute.add(
  2550. object: 'User',
  2551. name: 'web',
  2552. display: 'Web',
  2553. data_type: 'input',
  2554. data_option: {
  2555. type: 'url',
  2556. maxlength: 250,
  2557. null: true,
  2558. item_class: 'formGroup--halfSize',
  2559. },
  2560. editable: false,
  2561. active: true,
  2562. screens: {
  2563. signup: {},
  2564. invite_agent: {},
  2565. edit: {
  2566. '-all-' => {
  2567. null: true,
  2568. },
  2569. },
  2570. view: {
  2571. '-all-' => {
  2572. shown: true,
  2573. },
  2574. },
  2575. },
  2576. pending_migration: false,
  2577. position: 500,
  2578. )
  2579. ObjectManager::Attribute.add(
  2580. object: 'User',
  2581. name: 'phone',
  2582. display: 'Phone',
  2583. data_type: 'input',
  2584. data_option: {
  2585. type: 'phone',
  2586. maxlength: 100,
  2587. null: true,
  2588. item_class: 'formGroup--halfSize',
  2589. },
  2590. editable: false,
  2591. active: true,
  2592. screens: {
  2593. signup: {},
  2594. invite_agent: {},
  2595. edit: {
  2596. '-all-' => {
  2597. null: true,
  2598. },
  2599. },
  2600. view: {
  2601. '-all-' => {
  2602. shown: true,
  2603. },
  2604. },
  2605. },
  2606. pending_migration: false,
  2607. position: 600,
  2608. )
  2609. ObjectManager::Attribute.add(
  2610. object: 'User',
  2611. name: 'mobile',
  2612. display: 'Mobile',
  2613. data_type: 'input',
  2614. data_option: {
  2615. type: 'phone',
  2616. maxlength: 100,
  2617. null: true,
  2618. item_class: 'formGroup--halfSize',
  2619. },
  2620. editable: false,
  2621. active: true,
  2622. screens: {
  2623. signup: {},
  2624. invite_agent: {},
  2625. edit: {
  2626. '-all-' => {
  2627. null: true,
  2628. },
  2629. },
  2630. view: {
  2631. '-all-' => {
  2632. shown: true,
  2633. },
  2634. },
  2635. },
  2636. pending_migration: false,
  2637. position: 700,
  2638. )
  2639. ObjectManager::Attribute.add(
  2640. object: 'User',
  2641. name: 'fax',
  2642. display: 'Fax',
  2643. data_type: 'input',
  2644. data_option: {
  2645. type: 'phone',
  2646. maxlength: 100,
  2647. null: true,
  2648. item_class: 'formGroup--halfSize',
  2649. },
  2650. editable: false,
  2651. active: true,
  2652. screens: {
  2653. signup: {},
  2654. invite_agent: {},
  2655. edit: {
  2656. '-all-' => {
  2657. null: true,
  2658. },
  2659. },
  2660. view: {
  2661. '-all-' => {
  2662. shown: true,
  2663. },
  2664. },
  2665. },
  2666. pending_migration: false,
  2667. position: 800,
  2668. )
  2669. ObjectManager::Attribute.add(
  2670. object: 'User',
  2671. name: 'organization_id',
  2672. display: 'Organization',
  2673. data_type: 'autocompletion_ajax',
  2674. data_option: {
  2675. multiple: false,
  2676. nulloption: true,
  2677. null: true,
  2678. relation: 'Organization',
  2679. item_class: 'formGroup--halfSize',
  2680. },
  2681. editable: false,
  2682. active: true,
  2683. screens: {
  2684. signup: {},
  2685. invite_agent: {},
  2686. edit: {
  2687. '-all-' => {
  2688. null: true,
  2689. },
  2690. },
  2691. view: {
  2692. '-all-' => {
  2693. shown: true,
  2694. },
  2695. },
  2696. },
  2697. pending_migration: false,
  2698. position: 900,
  2699. )
  2700. ObjectManager::Attribute.add(
  2701. object: 'User',
  2702. name: 'department',
  2703. display: 'Department',
  2704. data_type: 'input',
  2705. data_option: {
  2706. type: 'text',
  2707. maxlength: 200,
  2708. null: true,
  2709. item_class: 'formGroup--halfSize',
  2710. },
  2711. editable: false,
  2712. active: true,
  2713. screens: {
  2714. signup: {},
  2715. invite_agent: {},
  2716. edit: {
  2717. '-all-' => {
  2718. null: true,
  2719. },
  2720. },
  2721. view: {
  2722. '-all-' => {
  2723. shown: true,
  2724. },
  2725. },
  2726. },
  2727. pending_migration: false,
  2728. position: 1000,
  2729. )
  2730. ObjectManager::Attribute.add(
  2731. object: 'User',
  2732. name: 'street',
  2733. display: 'Street',
  2734. data_type: 'input',
  2735. data_option: {
  2736. type: 'text',
  2737. maxlength: 100,
  2738. null: true,
  2739. },
  2740. editable: false,
  2741. active: true,
  2742. screens: {
  2743. signup: {},
  2744. invite_agent: {},
  2745. edit: {
  2746. '-all-' => {
  2747. null: true,
  2748. },
  2749. },
  2750. view: {
  2751. '-all-' => {
  2752. shown: true,
  2753. },
  2754. },
  2755. },
  2756. pending_migration: false,
  2757. position: 1100,
  2758. )
  2759. ObjectManager::Attribute.add(
  2760. object: 'User',
  2761. name: 'zip',
  2762. display: 'Zip',
  2763. data_type: 'input',
  2764. data_option: {
  2765. type: 'text',
  2766. maxlength: 100,
  2767. null: true,
  2768. item_class: 'formGroup--halfSize',
  2769. },
  2770. editable: false,
  2771. active: true,
  2772. screens: {
  2773. signup: {},
  2774. invite_agent: {},
  2775. edit: {
  2776. '-all-' => {
  2777. null: true,
  2778. },
  2779. },
  2780. view: {
  2781. '-all-' => {
  2782. shown: true,
  2783. },
  2784. },
  2785. },
  2786. pending_migration: false,
  2787. position: 1200,
  2788. )
  2789. ObjectManager::Attribute.add(
  2790. object: 'User',
  2791. name: 'city',
  2792. display: 'City',
  2793. data_type: 'input',
  2794. data_option: {
  2795. type: 'text',
  2796. maxlength: 100,
  2797. null: true,
  2798. item_class: 'formGroup--halfSize',
  2799. },
  2800. editable: false,
  2801. active: true,
  2802. screens: {
  2803. signup: {},
  2804. invite_agent: {},
  2805. edit: {
  2806. '-all-' => {
  2807. null: true,
  2808. },
  2809. },
  2810. view: {
  2811. '-all-' => {
  2812. shown: true,
  2813. },
  2814. },
  2815. },
  2816. pending_migration: false,
  2817. position: 1300,
  2818. )
  2819. ObjectManager::Attribute.add(
  2820. object: 'User',
  2821. name: 'address',
  2822. display: 'Address',
  2823. data_type: 'textarea',
  2824. data_option: {
  2825. type: 'text',
  2826. maxlength: 500,
  2827. null: true,
  2828. item_class: 'formGroup--halfSize',
  2829. },
  2830. editable: false,
  2831. active: true,
  2832. screens: {
  2833. signup: {},
  2834. invite_agent: {},
  2835. edit: {
  2836. '-all-' => {
  2837. null: true,
  2838. },
  2839. },
  2840. view: {
  2841. '-all-' => {
  2842. shown: true,
  2843. },
  2844. },
  2845. },
  2846. pending_migration: false,
  2847. position: 1350,
  2848. )
  2849. ObjectManager::Attribute.add(
  2850. object: 'User',
  2851. name: 'password',
  2852. display: 'Password',
  2853. data_type: 'input',
  2854. data_option: {
  2855. type: 'password',
  2856. maxlength: 100,
  2857. null: true,
  2858. autocomplete: 'off',
  2859. item_class: 'formGroup--halfSize',
  2860. },
  2861. editable: false,
  2862. active: true,
  2863. screens: {
  2864. signup: {
  2865. '-all-' => {
  2866. null: false,
  2867. },
  2868. },
  2869. invite_agent: {},
  2870. edit: {
  2871. Admin: {
  2872. null: true,
  2873. },
  2874. },
  2875. view: {}
  2876. },
  2877. pending_migration: false,
  2878. position: 1400,
  2879. )
  2880. ObjectManager::Attribute.add(
  2881. object: 'User',
  2882. name: 'vip',
  2883. display: 'VIP',
  2884. data_type: 'boolean',
  2885. data_option: {
  2886. null: true,
  2887. default: false,
  2888. item_class: 'formGroup--halfSize',
  2889. options: {
  2890. false: 'no',
  2891. true: 'yes',
  2892. },
  2893. translate: true,
  2894. },
  2895. editable: false,
  2896. active: true,
  2897. screens: {
  2898. edit: {
  2899. Admin: {
  2900. null: true,
  2901. },
  2902. Agent: {
  2903. null: true,
  2904. },
  2905. },
  2906. view: {
  2907. '-all-' => {
  2908. shown: false,
  2909. },
  2910. },
  2911. },
  2912. pending_migration: false,
  2913. position: 1490,
  2914. )
  2915. ObjectManager::Attribute.add(
  2916. object: 'User',
  2917. name: 'note',
  2918. display: 'Note',
  2919. data_type: 'richtext',
  2920. data_option: {
  2921. type: 'text',
  2922. maxlength: 250,
  2923. null: true,
  2924. note: 'Notes are visible to agents only, never to customers.',
  2925. },
  2926. editable: false,
  2927. active: true,
  2928. screens: {
  2929. signup: {},
  2930. invite_agent: {},
  2931. edit: {
  2932. '-all-' => {
  2933. null: true,
  2934. },
  2935. },
  2936. view: {
  2937. '-all-' => {
  2938. shown: true,
  2939. },
  2940. },
  2941. },
  2942. pending_migration: false,
  2943. position: 1500,
  2944. )
  2945. ObjectManager::Attribute.add(
  2946. object: 'User',
  2947. name: 'role_ids',
  2948. display: 'Roles',
  2949. data_type: 'checkbox',
  2950. data_option: {
  2951. multiple: true,
  2952. null: false,
  2953. relation: 'Role',
  2954. },
  2955. editable: false,
  2956. active: true,
  2957. screens: {
  2958. signup: {},
  2959. invite_agent: {},
  2960. edit: {
  2961. Admin: {
  2962. null: false,
  2963. },
  2964. },
  2965. view: {
  2966. '-all-' => {
  2967. shown: false,
  2968. },
  2969. },
  2970. },
  2971. pending_migration: false,
  2972. position: 1600,
  2973. )
  2974. ObjectManager::Attribute.add(
  2975. object: 'User',
  2976. name: 'group_ids',
  2977. display: 'Groups',
  2978. data_type: 'checkbox',
  2979. data_option: {
  2980. multiple: true,
  2981. null: true,
  2982. relation: 'Group',
  2983. },
  2984. editable: false,
  2985. active: true,
  2986. screens: {
  2987. signup: {},
  2988. invite_agent: {
  2989. '-all-' => {
  2990. null: false,
  2991. },
  2992. },
  2993. edit: {
  2994. Admin: {
  2995. null: true,
  2996. },
  2997. },
  2998. view: {
  2999. '-all-' => {
  3000. shown: false,
  3001. },
  3002. },
  3003. },
  3004. pending_migration: false,
  3005. position: 1700,
  3006. )
  3007. ObjectManager::Attribute.add(
  3008. object: 'User',
  3009. name: 'active',
  3010. display: 'Active',
  3011. data_type: 'active',
  3012. data_option: {
  3013. default: true,
  3014. },
  3015. editable: false,
  3016. active: true,
  3017. screens: {
  3018. signup: {},
  3019. invite_agent: {},
  3020. edit: {
  3021. Admin: {
  3022. null: false,
  3023. },
  3024. },
  3025. view: {
  3026. '-all-' => {
  3027. shown: false,
  3028. },
  3029. },
  3030. },
  3031. pending_migration: false,
  3032. position: 1800,
  3033. )
  3034. ObjectManager::Attribute.add(
  3035. object: 'Organization',
  3036. name: 'name',
  3037. display: 'Name',
  3038. data_type: 'input',
  3039. data_option: {
  3040. type: 'text',
  3041. maxlength: 150,
  3042. null: false,
  3043. item_class: 'formGroup--halfSize',
  3044. },
  3045. editable: false,
  3046. active: true,
  3047. screens: {
  3048. edit: {
  3049. '-all-' => {
  3050. null: false,
  3051. },
  3052. },
  3053. view: {
  3054. '-all-' => {
  3055. shown: true,
  3056. },
  3057. },
  3058. },
  3059. pending_migration: false,
  3060. position: 200,
  3061. )
  3062. ObjectManager::Attribute.add(
  3063. object: 'Organization',
  3064. name: 'shared',
  3065. display: 'Shared organization',
  3066. data_type: 'boolean',
  3067. data_option: {
  3068. maxlength: 250,
  3069. null: true,
  3070. default: true,
  3071. note: 'Customers in the organization can view each other items.',
  3072. item_class: 'formGroup--halfSize',
  3073. options: {
  3074. true: 'Yes',
  3075. false: 'No',
  3076. }
  3077. },
  3078. editable: false,
  3079. active: true,
  3080. screens: {
  3081. edit: {
  3082. Admin: {
  3083. null: false,
  3084. },
  3085. },
  3086. view: {
  3087. '-all-' => {
  3088. shown: true,
  3089. },
  3090. },
  3091. },
  3092. pending_migration: false,
  3093. position: 1400,
  3094. )
  3095. ObjectManager::Attribute.add(
  3096. object: 'Organization',
  3097. name: 'note',
  3098. display: 'Note',
  3099. data_type: 'richtext',
  3100. data_option: {
  3101. type: 'text',
  3102. maxlength: 250,
  3103. null: true,
  3104. note: 'Notes are visible to agents only, never to customers.',
  3105. },
  3106. editable: false,
  3107. active: true,
  3108. screens: {
  3109. edit: {
  3110. '-all-' => {
  3111. null: true,
  3112. },
  3113. },
  3114. view: {
  3115. '-all-' => {
  3116. shown: true,
  3117. },
  3118. },
  3119. },
  3120. pending_migration: false,
  3121. position: 1500,
  3122. )
  3123. ObjectManager::Attribute.add(
  3124. object: 'Organization',
  3125. name: 'active',
  3126. display: 'Active',
  3127. data_type: 'active',
  3128. data_option: {
  3129. default: true,
  3130. },
  3131. editable: false,
  3132. active: true,
  3133. screens: {
  3134. edit: {
  3135. Admin: {
  3136. null: false,
  3137. },
  3138. },
  3139. view: {
  3140. '-all-' => {
  3141. shown: false,
  3142. },
  3143. },
  3144. },
  3145. pending_migration: false,
  3146. position: 1800,
  3147. )
  3148. Scheduler.create_if_not_exists(
  3149. name: 'Process pending tickets',
  3150. method: 'Ticket.process_pending',
  3151. period: 60 * 15,
  3152. prio: 1,
  3153. active: true,
  3154. )
  3155. Scheduler.create_if_not_exists(
  3156. name: 'Import OTRS diff load',
  3157. method: 'Import::OTRS.diff_worker',
  3158. period: 60 * 3,
  3159. prio: 1,
  3160. active: true,
  3161. updated_by_id: 1,
  3162. created_by_id: 1,
  3163. )
  3164. Scheduler.create_if_not_exists(
  3165. name: 'Check Channels',
  3166. method: 'Channel.fetch',
  3167. period: 30,
  3168. prio: 1,
  3169. active: true,
  3170. updated_by_id: 1,
  3171. created_by_id: 1,
  3172. )
  3173. Scheduler.create_if_not_exists(
  3174. name: 'Check streams for Channel ',
  3175. method: 'Channel.stream',
  3176. period: 60,
  3177. prio: 1,
  3178. active: true,
  3179. updated_by_id: 1,
  3180. created_by_id: 1,
  3181. )
  3182. Scheduler.create_if_not_exists(
  3183. name: 'Generate Session data',
  3184. method: 'Sessions.jobs',
  3185. period: 60,
  3186. prio: 1,
  3187. active: true,
  3188. updated_by_id: 1,
  3189. created_by_id: 1,
  3190. )
  3191. Scheduler.create_if_not_exists(
  3192. name: 'Cleanup expired sessions',
  3193. method: 'SessionHelper.cleanup_expired',
  3194. period: 60 * 60 * 12,
  3195. prio: 2,
  3196. active: true,
  3197. updated_by_id: 1,
  3198. created_by_id: 1,
  3199. )
  3200. Scheduler.create_if_not_exists(
  3201. name: 'Delete old activity stream entries.',
  3202. method: 'ActivityStream.cleanup',
  3203. period: 1.day,
  3204. prio: 2,
  3205. active: true,
  3206. updated_by_id: 1,
  3207. created_by_id: 1,
  3208. )
  3209. Scheduler.create_if_not_exists(
  3210. name: 'Delete old entries.',
  3211. method: 'RecentView.cleanup',
  3212. period: 1.day,
  3213. prio: 2,
  3214. active: true,
  3215. updated_by_id: 1,
  3216. created_by_id: 1,
  3217. )
  3218. Scheduler.create_or_update(
  3219. name: 'Delete old online notification entries.',
  3220. method: 'OnlineNotification.cleanup',
  3221. period: 2.hours,
  3222. prio: 2,
  3223. active: true,
  3224. updated_by_id: 1,
  3225. created_by_id: 1,
  3226. )
  3227. Scheduler.create_or_update(
  3228. name: 'Delete old token entries.',
  3229. method: 'Token.cleanup',
  3230. period: 30.days,
  3231. prio: 2,
  3232. active: true,
  3233. updated_by_id: 1,
  3234. created_by_id: 1,
  3235. )
  3236. Scheduler.create_or_update(
  3237. name: 'Closed chat sessions where participients are offline.',
  3238. method: 'Chat.cleanup_close',
  3239. period: 60 * 15,
  3240. prio: 2,
  3241. active: true,
  3242. updated_by_id: 1,
  3243. created_by_id: 1,
  3244. )
  3245. Scheduler.create_or_update(
  3246. name: 'Cleanup closed sessions.',
  3247. method: 'Chat.cleanup',
  3248. period: 5.days,
  3249. prio: 2,
  3250. active: true,
  3251. updated_by_id: 1,
  3252. created_by_id: 1,
  3253. )
  3254. # install locales and translations
  3255. Locale.create_if_not_exists(
  3256. locale: 'en-us',
  3257. alias: 'en',
  3258. name: 'English (United States)',
  3259. )
  3260. Locale.load
  3261. Translation.load
  3262. Calendar.init_setup
  3263. # install all packages in auto_install
  3264. Package.auto_install