object_manager_attributes.rb 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. ObjectManager::Attribute.add(
  3. force: true,
  4. object: 'Ticket',
  5. name: 'number',
  6. display: '#',
  7. data_type: 'input',
  8. data_option: {
  9. type: 'text',
  10. readonly: 1,
  11. null: true,
  12. maxlength: 60,
  13. width: '68px',
  14. },
  15. editable: false,
  16. active: true,
  17. screens: {
  18. create_top: {},
  19. edit: {},
  20. },
  21. to_create: false,
  22. to_migrate: false,
  23. to_delete: false,
  24. position: 5,
  25. )
  26. ObjectManager::Attribute.add(
  27. force: true,
  28. object: 'Ticket',
  29. name: 'title',
  30. display: __('Title'),
  31. data_type: 'input',
  32. data_option: {
  33. type: 'text',
  34. maxlength: 200,
  35. null: false,
  36. translate: false,
  37. },
  38. editable: false,
  39. active: true,
  40. screens: {
  41. create_top: {
  42. '-all-' => {
  43. null: false,
  44. },
  45. },
  46. edit: {},
  47. },
  48. to_create: false,
  49. to_migrate: false,
  50. to_delete: false,
  51. position: 8,
  52. )
  53. ObjectManager::Attribute.add(
  54. force: true,
  55. object: 'Ticket',
  56. name: 'customer_id',
  57. display: __('Customer'),
  58. data_type: 'user_autocompletion',
  59. data_option: {
  60. relation: 'User',
  61. autocapitalize: false,
  62. multiple: false,
  63. guess: true,
  64. null: false,
  65. limit: 200,
  66. placeholder: __('Enter Person or Organization/Company'),
  67. minLengt: 2,
  68. translate: false,
  69. permission: ['ticket.agent'],
  70. },
  71. editable: false,
  72. active: true,
  73. screens: {
  74. create_top: {
  75. '-all-' => {
  76. null: false,
  77. },
  78. },
  79. edit: {},
  80. },
  81. to_create: false,
  82. to_migrate: false,
  83. to_delete: false,
  84. position: 10,
  85. )
  86. ObjectManager::Attribute.add(
  87. force: true,
  88. object: 'Ticket',
  89. name: 'organization_id',
  90. display: 'Organization',
  91. data_type: 'autocompletion_ajax_customer_organization',
  92. data_option: {
  93. relation: 'Organization',
  94. autocapitalize: false,
  95. multiple: false,
  96. null: true,
  97. translate: false,
  98. permission: ['ticket.agent', 'ticket.customer'],
  99. },
  100. editable: false,
  101. active: true,
  102. screens: {
  103. create_top: {
  104. '-all-' => {
  105. null: false,
  106. },
  107. },
  108. edit: {},
  109. },
  110. to_create: false,
  111. to_migrate: false,
  112. to_delete: false,
  113. position: 12,
  114. )
  115. ObjectManager::Attribute.add(
  116. force: true,
  117. object: 'Ticket',
  118. name: 'type',
  119. display: __('Type'),
  120. data_type: 'select',
  121. data_option: {
  122. default: '',
  123. options: {
  124. 'Incident' => __('Incident'),
  125. 'Problem' => __('Problem'),
  126. 'Request for Change' => __('Request for Change'),
  127. },
  128. nulloption: true,
  129. multiple: false,
  130. null: true,
  131. translate: true,
  132. },
  133. editable: true,
  134. active: false,
  135. screens: {
  136. create_middle: {
  137. '-all-' => {
  138. null: false,
  139. item_class: 'column',
  140. },
  141. },
  142. edit: {
  143. 'ticket.agent' => {
  144. null: false,
  145. },
  146. },
  147. },
  148. to_create: false,
  149. to_migrate: false,
  150. to_delete: false,
  151. position: 20,
  152. )
  153. ObjectManager::Attribute.add(
  154. force: true,
  155. object: 'Ticket',
  156. name: 'group_id',
  157. display: __('Group'),
  158. data_type: 'select',
  159. data_option: {
  160. default: '',
  161. relation: 'Group',
  162. relation_condition: { access: 'full' },
  163. nulloption: true,
  164. multiple: false,
  165. null: false,
  166. translate: false,
  167. only_shown_if_selectable: true,
  168. permission: ['ticket.agent', 'ticket.customer'],
  169. },
  170. editable: false,
  171. active: true,
  172. screens: {
  173. create_middle: {
  174. '-all-' => {
  175. null: false,
  176. item_class: 'column',
  177. },
  178. },
  179. edit: {
  180. 'ticket.agent' => {
  181. null: false,
  182. },
  183. },
  184. },
  185. to_create: false,
  186. to_migrate: false,
  187. to_delete: false,
  188. position: 25,
  189. )
  190. ObjectManager::Attribute.add(
  191. force: true,
  192. object: 'Ticket',
  193. name: 'owner_id',
  194. display: __('Owner'),
  195. data_type: 'select',
  196. data_option: {
  197. default: '',
  198. relation: 'User',
  199. relation_condition: { roles: 'Agent' },
  200. nulloption: true,
  201. multiple: false,
  202. null: true,
  203. translate: false,
  204. permission: ['ticket.agent'],
  205. },
  206. editable: false,
  207. active: true,
  208. screens: {
  209. create_middle: {
  210. '-all-' => {
  211. null: true,
  212. item_class: 'column',
  213. },
  214. },
  215. edit: {
  216. '-all-' => {
  217. null: true,
  218. },
  219. },
  220. },
  221. to_create: false,
  222. to_migrate: false,
  223. to_delete: false,
  224. position: 30,
  225. )
  226. ObjectManager::Attribute.add(
  227. force: true,
  228. object: 'Ticket',
  229. name: 'state_id',
  230. display: __('State'),
  231. data_type: 'select',
  232. data_option: {
  233. relation: 'TicketState',
  234. nulloption: true,
  235. multiple: false,
  236. null: false,
  237. default: Ticket::State.find_by(default_follow_up: true).id,
  238. translate: true,
  239. filter: Ticket::State.by_category(:viewable).pluck(:id),
  240. },
  241. editable: false,
  242. active: true,
  243. screens: {
  244. create_middle: {
  245. 'ticket.agent' => {
  246. null: false,
  247. item_class: 'column',
  248. filter: Ticket::State.by_category(:viewable_agent_new).pluck(:id),
  249. },
  250. 'ticket.customer' => {
  251. item_class: 'column',
  252. nulloption: false,
  253. null: true,
  254. filter: Ticket::State.by_category(:viewable_customer_new).pluck(:id),
  255. default: Ticket::State.find_by(default_create: true).id,
  256. },
  257. },
  258. edit: {
  259. 'ticket.agent' => {
  260. nulloption: false,
  261. null: false,
  262. filter: Ticket::State.by_category(:viewable_agent_edit).pluck(:id),
  263. },
  264. 'ticket.customer' => {
  265. nulloption: false,
  266. null: true,
  267. filter: Ticket::State.by_category(:viewable_customer_edit).pluck(:id),
  268. default: Ticket::State.find_by(default_follow_up: true).id,
  269. },
  270. },
  271. },
  272. to_create: false,
  273. to_migrate: false,
  274. to_delete: false,
  275. position: 40,
  276. )
  277. ObjectManager::Attribute.add(
  278. force: true,
  279. object: 'Ticket',
  280. name: 'pending_time',
  281. display: __('Pending till'),
  282. data_type: 'datetime',
  283. data_option: {
  284. future: true,
  285. past: false,
  286. diff: nil,
  287. null: true,
  288. translate: true,
  289. permission: %w[ticket.agent],
  290. },
  291. editable: false,
  292. active: true,
  293. screens: {
  294. create_middle: {
  295. '-all-' => {
  296. null: false,
  297. item_class: 'column',
  298. },
  299. },
  300. edit: {
  301. '-all-' => {
  302. null: false,
  303. },
  304. },
  305. },
  306. to_create: false,
  307. to_migrate: false,
  308. to_delete: false,
  309. position: 41,
  310. )
  311. ObjectManager::Attribute.add(
  312. force: true,
  313. object: 'Ticket',
  314. name: 'priority_id',
  315. display: __('Priority'),
  316. data_type: 'select',
  317. data_option: {
  318. relation: 'TicketPriority',
  319. nulloption: false,
  320. multiple: false,
  321. null: false,
  322. default: Ticket::Priority.find_by(default_create: true).id,
  323. translate: true,
  324. },
  325. editable: false,
  326. active: true,
  327. screens: {
  328. create_middle: {
  329. 'ticket.agent' => {
  330. null: false,
  331. item_class: 'column',
  332. },
  333. },
  334. edit: {
  335. 'ticket.agent' => {
  336. null: false,
  337. },
  338. },
  339. },
  340. to_create: false,
  341. to_migrate: false,
  342. to_delete: false,
  343. position: 80,
  344. )
  345. ObjectManager::Attribute.add(
  346. force: true,
  347. object: 'Ticket',
  348. name: 'tags',
  349. display: __('Tags'),
  350. data_type: 'tag',
  351. data_option: {
  352. type: 'text',
  353. null: true,
  354. translate: false,
  355. },
  356. editable: false,
  357. active: true,
  358. screens: {
  359. create_bottom: {
  360. 'ticket.agent' => {
  361. null: true,
  362. },
  363. },
  364. edit: {},
  365. },
  366. to_create: false,
  367. to_migrate: false,
  368. to_delete: false,
  369. position: 900,
  370. )
  371. ObjectManager::Attribute.add(
  372. force: true,
  373. object: 'TicketArticle',
  374. name: 'type_id',
  375. display: __('Type'),
  376. data_type: 'select',
  377. data_option: {
  378. relation: 'TicketArticleType',
  379. nulloption: false,
  380. multiple: false,
  381. null: false,
  382. default: Ticket::Article::Type.lookup(name: 'note').id,
  383. translate: true,
  384. },
  385. editable: false,
  386. active: true,
  387. screens: {
  388. create_middle: {},
  389. edit: {
  390. 'ticket.agent' => {
  391. null: false,
  392. },
  393. },
  394. },
  395. to_create: false,
  396. to_migrate: false,
  397. to_delete: false,
  398. position: 100,
  399. )
  400. ObjectManager::Attribute.add(
  401. force: true,
  402. object: 'TicketArticle',
  403. name: 'internal',
  404. display: __('Visibility'),
  405. data_type: 'select',
  406. data_option: {
  407. options: {
  408. true: 'internal',
  409. false: 'public'
  410. },
  411. nulloption: false,
  412. multiple: false,
  413. null: true,
  414. default: false,
  415. translate: true,
  416. },
  417. editable: false,
  418. active: true,
  419. screens: {
  420. create_middle: {},
  421. edit: {
  422. 'ticket.agent' => {
  423. null: false,
  424. },
  425. },
  426. },
  427. to_create: false,
  428. to_migrate: false,
  429. to_delete: false,
  430. position: 200,
  431. )
  432. ObjectManager::Attribute.add(
  433. force: true,
  434. object: 'TicketArticle',
  435. name: 'to',
  436. display: __('To'),
  437. data_type: 'input',
  438. data_option: {
  439. type: 'text',
  440. maxlength: 1000,
  441. null: true,
  442. },
  443. editable: false,
  444. active: true,
  445. screens: {
  446. create_middle: {},
  447. edit: {
  448. 'ticket.agent' => {
  449. null: true,
  450. },
  451. },
  452. },
  453. to_create: false,
  454. to_migrate: false,
  455. to_delete: false,
  456. position: 300,
  457. )
  458. ObjectManager::Attribute.add(
  459. force: true,
  460. object: 'TicketArticle',
  461. name: 'cc',
  462. display: __('CC'),
  463. data_type: 'input',
  464. data_option: {
  465. type: 'text',
  466. maxlength: 1000,
  467. null: true,
  468. },
  469. editable: false,
  470. active: true,
  471. screens: {
  472. create_top: {},
  473. create_middle: {},
  474. edit: {
  475. 'ticket.agent' => {
  476. null: true,
  477. },
  478. },
  479. },
  480. to_create: false,
  481. to_migrate: false,
  482. to_delete: false,
  483. position: 400,
  484. )
  485. ObjectManager::Attribute.add(
  486. force: true,
  487. object: 'TicketArticle',
  488. name: 'body',
  489. display: __('Text'),
  490. data_type: 'richtext',
  491. data_option: {
  492. type: 'richtext',
  493. maxlength: 150_000,
  494. upload: true,
  495. rows: 8,
  496. null: true,
  497. },
  498. editable: false,
  499. active: true,
  500. screens: {
  501. create_top: {
  502. '-all-' => {
  503. null: false,
  504. },
  505. },
  506. edit: {
  507. '-all-' => {
  508. null: true,
  509. },
  510. },
  511. },
  512. to_create: false,
  513. to_migrate: false,
  514. to_delete: false,
  515. position: 600,
  516. )
  517. ObjectManager::Attribute.add(
  518. force: true,
  519. object: 'User',
  520. name: 'login',
  521. display: __('Login'),
  522. data_type: 'input',
  523. data_option: {
  524. type: 'text',
  525. maxlength: 100,
  526. null: true,
  527. autocapitalize: false,
  528. item_class: 'formGroup--halfSize',
  529. },
  530. editable: false,
  531. active: true,
  532. screens: {
  533. signup: {},
  534. invite_agent: {},
  535. invite_customer: {},
  536. edit: {},
  537. view: {
  538. '-all-' => {
  539. shown: false,
  540. },
  541. },
  542. },
  543. to_create: false,
  544. to_migrate: false,
  545. to_delete: false,
  546. position: 100,
  547. )
  548. ObjectManager::Attribute.add(
  549. force: true,
  550. object: 'User',
  551. name: 'firstname',
  552. display: __('First name'),
  553. data_type: 'input',
  554. data_option: {
  555. type: 'text',
  556. maxlength: 150,
  557. null: true,
  558. item_class: 'formGroup--halfSize',
  559. },
  560. editable: false,
  561. active: true,
  562. screens: {
  563. signup: {
  564. '-all-' => {
  565. null: true,
  566. },
  567. },
  568. invite_agent: {
  569. '-all-' => {
  570. null: true,
  571. },
  572. },
  573. invite_customer: {
  574. '-all-' => {
  575. null: true,
  576. },
  577. },
  578. edit: {
  579. '-all-' => {
  580. null: true,
  581. },
  582. },
  583. create: {
  584. '-all-' => {
  585. null: true,
  586. },
  587. },
  588. view: {
  589. '-all-' => {
  590. shown: true,
  591. },
  592. },
  593. },
  594. to_create: false,
  595. to_migrate: false,
  596. to_delete: false,
  597. position: 200,
  598. )
  599. ObjectManager::Attribute.add(
  600. force: true,
  601. object: 'User',
  602. name: 'lastname',
  603. display: __('Last name'),
  604. data_type: 'input',
  605. data_option: {
  606. type: 'text',
  607. maxlength: 150,
  608. null: true,
  609. item_class: 'formGroup--halfSize',
  610. },
  611. editable: false,
  612. active: true,
  613. screens: {
  614. signup: {
  615. '-all-' => {
  616. null: true,
  617. },
  618. },
  619. invite_agent: {
  620. '-all-' => {
  621. null: true,
  622. },
  623. },
  624. invite_customer: {
  625. '-all-' => {
  626. null: true,
  627. },
  628. },
  629. edit: {
  630. '-all-' => {
  631. null: true,
  632. },
  633. },
  634. create: {
  635. '-all-' => {
  636. null: true,
  637. },
  638. },
  639. view: {
  640. '-all-' => {
  641. shown: true,
  642. },
  643. },
  644. },
  645. to_create: false,
  646. to_migrate: false,
  647. to_delete: false,
  648. position: 300,
  649. )
  650. ObjectManager::Attribute.add(
  651. force: true,
  652. object: 'User',
  653. name: 'email',
  654. display: __('Email'),
  655. data_type: 'input',
  656. data_option: {
  657. type: 'email',
  658. maxlength: 150,
  659. null: true,
  660. item_class: 'formGroup--halfSize',
  661. },
  662. editable: false,
  663. active: true,
  664. screens: {
  665. signup: {
  666. '-all-' => {
  667. null: true,
  668. },
  669. },
  670. invite_agent: {
  671. '-all-' => {
  672. null: true,
  673. },
  674. },
  675. invite_customer: {
  676. '-all-' => {
  677. null: true,
  678. },
  679. },
  680. edit: {
  681. '-all-' => {
  682. null: true,
  683. },
  684. },
  685. create: {
  686. '-all-' => {
  687. null: true,
  688. },
  689. },
  690. view: {
  691. '-all-' => {
  692. shown: true,
  693. },
  694. },
  695. },
  696. to_create: false,
  697. to_migrate: false,
  698. to_delete: false,
  699. position: 400,
  700. )
  701. ObjectManager::Attribute.add(
  702. force: true,
  703. object: 'User',
  704. name: 'web',
  705. display: __('Web'),
  706. data_type: 'input',
  707. data_option: {
  708. type: 'url',
  709. maxlength: 250,
  710. null: true,
  711. item_class: 'formGroup--halfSize',
  712. },
  713. editable: false,
  714. active: true,
  715. screens: {
  716. signup: {},
  717. invite_agent: {},
  718. invite_customer: {},
  719. edit: {
  720. '-all-' => {
  721. null: true,
  722. },
  723. },
  724. create: {
  725. '-all-' => {
  726. null: true,
  727. },
  728. },
  729. view: {
  730. '-all-' => {
  731. shown: true,
  732. },
  733. },
  734. },
  735. to_create: false,
  736. to_migrate: false,
  737. to_delete: false,
  738. position: 500,
  739. )
  740. ObjectManager::Attribute.add(
  741. force: true,
  742. object: 'User',
  743. name: 'phone',
  744. display: __('Phone'),
  745. data_type: 'input',
  746. data_option: {
  747. type: 'tel',
  748. maxlength: 100,
  749. null: true,
  750. item_class: 'formGroup--halfSize',
  751. },
  752. editable: false,
  753. active: true,
  754. screens: {
  755. signup: {},
  756. invite_agent: {},
  757. invite_customer: {},
  758. edit: {
  759. '-all-' => {
  760. null: true,
  761. },
  762. },
  763. create: {
  764. '-all-' => {
  765. null: true,
  766. },
  767. },
  768. view: {
  769. '-all-' => {
  770. shown: true,
  771. },
  772. },
  773. },
  774. to_create: false,
  775. to_migrate: false,
  776. to_delete: false,
  777. position: 600,
  778. )
  779. ObjectManager::Attribute.add(
  780. force: true,
  781. object: 'User',
  782. name: 'mobile',
  783. display: __('Mobile'),
  784. data_type: 'input',
  785. data_option: {
  786. type: 'tel',
  787. maxlength: 100,
  788. null: true,
  789. item_class: 'formGroup--halfSize',
  790. },
  791. editable: false,
  792. active: true,
  793. screens: {
  794. signup: {},
  795. invite_agent: {},
  796. invite_customer: {},
  797. edit: {
  798. '-all-' => {
  799. null: true,
  800. },
  801. },
  802. create: {
  803. '-all-' => {
  804. null: true,
  805. },
  806. },
  807. view: {
  808. '-all-' => {
  809. shown: true,
  810. },
  811. },
  812. },
  813. to_create: false,
  814. to_migrate: false,
  815. to_delete: false,
  816. position: 700,
  817. )
  818. ObjectManager::Attribute.add(
  819. force: true,
  820. object: 'User',
  821. name: 'fax',
  822. display: __('Fax'),
  823. data_type: 'input',
  824. data_option: {
  825. type: 'tel',
  826. maxlength: 100,
  827. null: true,
  828. item_class: 'formGroup--halfSize',
  829. },
  830. editable: false,
  831. active: true,
  832. screens: {
  833. signup: {},
  834. invite_agent: {},
  835. invite_customer: {},
  836. edit: {
  837. '-all-' => {
  838. null: true,
  839. },
  840. },
  841. create: {
  842. '-all-' => {
  843. null: true,
  844. },
  845. },
  846. view: {
  847. '-all-' => {
  848. shown: true,
  849. },
  850. },
  851. },
  852. to_create: false,
  853. to_migrate: false,
  854. to_delete: false,
  855. position: 800,
  856. )
  857. ObjectManager::Attribute.add(
  858. force: true,
  859. object: 'User',
  860. name: 'organization_id',
  861. display: __('Organization'),
  862. data_type: 'autocompletion_ajax',
  863. data_option: {
  864. multiple: false,
  865. nulloption: true,
  866. null: true,
  867. relation: 'Organization',
  868. item_class: 'formGroup--halfSize',
  869. },
  870. editable: false,
  871. active: true,
  872. screens: {
  873. signup: {},
  874. invite_agent: {},
  875. invite_customer: {
  876. '-all-' => {
  877. null: true,
  878. },
  879. },
  880. edit: {
  881. '-all-' => {
  882. null: true,
  883. },
  884. },
  885. create: {
  886. '-all-' => {
  887. null: true,
  888. },
  889. },
  890. view: {
  891. '-all-' => {
  892. shown: true,
  893. },
  894. },
  895. },
  896. to_create: false,
  897. to_migrate: false,
  898. to_delete: false,
  899. position: 900,
  900. )
  901. ObjectManager::Attribute.add(
  902. force: true,
  903. object: 'User',
  904. name: 'organization_ids',
  905. display: __('Secondary organizations'),
  906. data_type: 'autocompletion_ajax',
  907. data_option: {
  908. multiple: true,
  909. nulloption: true,
  910. null: true,
  911. relation: 'Organization',
  912. item_class: 'formGroup--halfSize',
  913. display_limit: 3,
  914. },
  915. editable: false,
  916. active: true,
  917. screens: {
  918. signup: {},
  919. invite_agent: {},
  920. invite_customer: {
  921. '-all-' => {
  922. null: true,
  923. },
  924. },
  925. edit: {
  926. '-all-' => {
  927. null: true,
  928. },
  929. },
  930. create: {
  931. '-all-' => {
  932. null: true,
  933. },
  934. },
  935. view: {
  936. '-all-' => {
  937. shown: true,
  938. },
  939. },
  940. },
  941. to_create: false,
  942. to_migrate: false,
  943. to_delete: false,
  944. position: 901,
  945. )
  946. ObjectManager::Attribute.add(
  947. force: true,
  948. object: 'User',
  949. name: 'department',
  950. display: __('Department'),
  951. data_type: 'input',
  952. data_option: {
  953. type: 'text',
  954. maxlength: 200,
  955. null: true,
  956. item_class: 'formGroup--halfSize',
  957. },
  958. editable: true,
  959. active: true,
  960. screens: {
  961. signup: {},
  962. invite_agent: {},
  963. invite_customer: {},
  964. edit: {
  965. '-all-' => {
  966. null: true,
  967. },
  968. },
  969. create: {
  970. '-all-' => {
  971. null: true,
  972. },
  973. },
  974. view: {
  975. '-all-' => {
  976. shown: true,
  977. },
  978. },
  979. },
  980. to_create: false,
  981. to_migrate: false,
  982. to_delete: false,
  983. position: 1000,
  984. )
  985. ObjectManager::Attribute.add(
  986. force: true,
  987. object: 'User',
  988. name: 'street',
  989. display: __('Street'),
  990. data_type: 'input',
  991. data_option: {
  992. type: 'text',
  993. maxlength: 100,
  994. null: true,
  995. },
  996. editable: true,
  997. active: false,
  998. screens: {
  999. signup: {},
  1000. invite_agent: {},
  1001. invite_customer: {},
  1002. edit: {
  1003. '-all-' => {
  1004. null: true,
  1005. },
  1006. },
  1007. create: {
  1008. '-all-' => {
  1009. null: true,
  1010. },
  1011. },
  1012. view: {
  1013. '-all-' => {
  1014. shown: true,
  1015. },
  1016. },
  1017. },
  1018. to_create: false,
  1019. to_migrate: false,
  1020. to_delete: false,
  1021. position: 1100,
  1022. )
  1023. ObjectManager::Attribute.add(
  1024. force: true,
  1025. object: 'User',
  1026. name: 'zip',
  1027. display: __('Zip'),
  1028. data_type: 'input',
  1029. data_option: {
  1030. type: 'text',
  1031. maxlength: 100,
  1032. null: true,
  1033. item_class: 'formGroup--halfSize',
  1034. },
  1035. editable: true,
  1036. active: false,
  1037. screens: {
  1038. signup: {},
  1039. invite_agent: {},
  1040. invite_customer: {},
  1041. edit: {
  1042. '-all-' => {
  1043. null: true,
  1044. },
  1045. },
  1046. create: {
  1047. '-all-' => {
  1048. null: true,
  1049. },
  1050. },
  1051. view: {
  1052. '-all-' => {
  1053. shown: true,
  1054. },
  1055. },
  1056. },
  1057. to_create: false,
  1058. to_migrate: false,
  1059. to_delete: false,
  1060. position: 1200,
  1061. )
  1062. ObjectManager::Attribute.add(
  1063. force: true,
  1064. object: 'User',
  1065. name: 'city',
  1066. display: __('City'),
  1067. data_type: 'input',
  1068. data_option: {
  1069. type: 'text',
  1070. maxlength: 100,
  1071. null: true,
  1072. item_class: 'formGroup--halfSize',
  1073. },
  1074. editable: true,
  1075. active: false,
  1076. screens: {
  1077. signup: {},
  1078. invite_agent: {},
  1079. invite_customer: {},
  1080. edit: {
  1081. '-all-' => {
  1082. null: true,
  1083. },
  1084. },
  1085. create: {
  1086. '-all-' => {
  1087. null: true,
  1088. },
  1089. },
  1090. view: {
  1091. '-all-' => {
  1092. shown: true,
  1093. },
  1094. },
  1095. },
  1096. to_create: false,
  1097. to_migrate: false,
  1098. to_delete: false,
  1099. position: 1300,
  1100. )
  1101. ObjectManager::Attribute.add(
  1102. force: true,
  1103. object: 'User',
  1104. name: 'country',
  1105. display: __('Country'),
  1106. data_type: 'input',
  1107. data_option: {
  1108. type: 'text',
  1109. maxlength: 100,
  1110. null: true,
  1111. item_class: 'formGroup--halfSize',
  1112. },
  1113. editable: true,
  1114. active: false,
  1115. screens: {
  1116. signup: {},
  1117. invite_agent: {},
  1118. invite_customer: {},
  1119. edit: {
  1120. '-all-' => {
  1121. null: true,
  1122. },
  1123. },
  1124. create: {
  1125. '-all-' => {
  1126. null: true,
  1127. },
  1128. },
  1129. view: {
  1130. '-all-' => {
  1131. shown: true,
  1132. },
  1133. },
  1134. },
  1135. to_create: false,
  1136. to_migrate: false,
  1137. to_delete: false,
  1138. position: 1325,
  1139. )
  1140. ObjectManager::Attribute.add(
  1141. force: true,
  1142. object: 'User',
  1143. name: 'address',
  1144. display: __('Address'),
  1145. data_type: 'textarea',
  1146. data_option: {
  1147. type: 'text',
  1148. maxlength: 500,
  1149. null: true,
  1150. item_class: 'formGroup--halfSize',
  1151. },
  1152. editable: true,
  1153. active: true,
  1154. screens: {
  1155. signup: {},
  1156. invite_agent: {},
  1157. invite_customer: {},
  1158. edit: {
  1159. '-all-' => {
  1160. null: true,
  1161. },
  1162. },
  1163. create: {
  1164. '-all-' => {
  1165. null: true,
  1166. },
  1167. },
  1168. view: {
  1169. '-all-' => {
  1170. shown: true,
  1171. },
  1172. },
  1173. },
  1174. to_create: false,
  1175. to_migrate: false,
  1176. to_delete: false,
  1177. position: 1350,
  1178. )
  1179. ObjectManager::Attribute.add(
  1180. force: true,
  1181. object: 'User',
  1182. name: 'password',
  1183. display: __('Password'),
  1184. data_type: 'input',
  1185. data_option: {
  1186. type: 'password',
  1187. # password length is capped at 1000 in PasswordPolicy::MaxLength::MAX_LENGTH
  1188. # if user copy-pastes a very long string
  1189. # this ensures that max length check is triggered preventing saving of truncated password
  1190. maxlength: 1001,
  1191. null: true,
  1192. autocomplete: 'new-password',
  1193. item_class: 'formGroup--halfSize',
  1194. },
  1195. editable: false,
  1196. active: true,
  1197. screens: {
  1198. signup: {
  1199. '-all-' => {
  1200. null: false,
  1201. },
  1202. },
  1203. invite_agent: {},
  1204. invite_customer: {},
  1205. edit: {
  1206. 'admin.user' => {
  1207. null: true,
  1208. },
  1209. },
  1210. create: {
  1211. '-all-' => {
  1212. null: true,
  1213. },
  1214. },
  1215. view: {}
  1216. },
  1217. to_create: false,
  1218. to_migrate: false,
  1219. to_delete: false,
  1220. position: 1400,
  1221. )
  1222. ObjectManager::Attribute.add(
  1223. force: true,
  1224. object: 'User',
  1225. name: 'vip',
  1226. display: __('VIP'),
  1227. data_type: 'boolean',
  1228. data_option: {
  1229. null: true,
  1230. default: false,
  1231. item_class: 'formGroup--halfSize',
  1232. options: {
  1233. false: 'no',
  1234. true: 'yes',
  1235. },
  1236. translate: true,
  1237. permission: ['admin.user', 'ticket.agent'],
  1238. },
  1239. editable: false,
  1240. active: true,
  1241. screens: {
  1242. edit: {
  1243. '-all-' => {
  1244. null: true,
  1245. },
  1246. },
  1247. create: {
  1248. '-all-' => {
  1249. null: true,
  1250. },
  1251. },
  1252. view: {
  1253. '-all-' => {
  1254. shown: false,
  1255. },
  1256. },
  1257. },
  1258. to_create: false,
  1259. to_migrate: false,
  1260. to_delete: false,
  1261. position: 1490,
  1262. )
  1263. ObjectManager::Attribute.add(
  1264. force: true,
  1265. object: 'User',
  1266. name: 'note',
  1267. display: __('Note'),
  1268. data_type: 'richtext',
  1269. data_option: {
  1270. type: 'text',
  1271. maxlength: 5000,
  1272. null: true,
  1273. note: __('Notes are visible to agents only, never to customers.'),
  1274. },
  1275. editable: false,
  1276. active: true,
  1277. screens: {
  1278. signup: {},
  1279. invite_agent: {},
  1280. invite_customer: {
  1281. '-all-' => {
  1282. null: true,
  1283. },
  1284. },
  1285. edit: {
  1286. '-all-' => {
  1287. null: true,
  1288. },
  1289. },
  1290. create: {
  1291. '-all-' => {
  1292. null: true,
  1293. },
  1294. },
  1295. view: {
  1296. '-all-' => {
  1297. shown: true,
  1298. },
  1299. },
  1300. },
  1301. to_create: false,
  1302. to_migrate: false,
  1303. to_delete: false,
  1304. position: 1500,
  1305. )
  1306. ObjectManager::Attribute.add(
  1307. force: true,
  1308. object: 'User',
  1309. name: 'role_ids',
  1310. display: __('Permissions'),
  1311. data_type: 'user_permission',
  1312. data_option: {
  1313. null: false,
  1314. item_class: 'checkbox',
  1315. permission: ['admin.user'],
  1316. },
  1317. editable: false,
  1318. active: true,
  1319. screens: {
  1320. signup: {},
  1321. invite_agent: {
  1322. '-all-' => {
  1323. null: false,
  1324. default: [Role.lookup(name: 'Agent').id],
  1325. },
  1326. },
  1327. invite_customer: {},
  1328. edit: {
  1329. '-all-' => {
  1330. null: true,
  1331. },
  1332. },
  1333. create: {
  1334. '-all-' => {
  1335. null: true,
  1336. },
  1337. },
  1338. view: {
  1339. '-all-' => {
  1340. shown: false,
  1341. },
  1342. },
  1343. },
  1344. to_create: false,
  1345. to_migrate: false,
  1346. to_delete: false,
  1347. position: 1600,
  1348. )
  1349. ObjectManager::Attribute.add(
  1350. force: true,
  1351. object: 'User',
  1352. name: 'active',
  1353. display: __('Active'),
  1354. data_type: 'active',
  1355. data_option: {
  1356. null: true,
  1357. default: true,
  1358. permission: ['admin.user', 'ticket.agent'],
  1359. },
  1360. editable: false,
  1361. active: true,
  1362. screens: {
  1363. signup: {},
  1364. invite_agent: {},
  1365. invite_customer: {},
  1366. edit: {
  1367. '-all-' => {
  1368. null: false,
  1369. },
  1370. },
  1371. create: {
  1372. '-all-' => {
  1373. null: false,
  1374. },
  1375. },
  1376. view: {
  1377. '-all-' => {
  1378. shown: false,
  1379. },
  1380. },
  1381. },
  1382. to_create: false,
  1383. to_migrate: false,
  1384. to_delete: false,
  1385. position: 1800,
  1386. )
  1387. ObjectManager::Attribute.add(
  1388. force: true,
  1389. object: 'Organization',
  1390. name: 'name',
  1391. display: __('Name'),
  1392. data_type: 'input',
  1393. data_option: {
  1394. type: 'text',
  1395. maxlength: 150,
  1396. null: false,
  1397. item_class: 'formGroup--halfSize',
  1398. },
  1399. editable: false,
  1400. active: true,
  1401. screens: {
  1402. edit: {
  1403. '-all-' => {
  1404. null: false,
  1405. },
  1406. },
  1407. create: {
  1408. '-all-' => {
  1409. null: false,
  1410. },
  1411. },
  1412. view: {
  1413. 'ticket.agent' => {
  1414. shown: true,
  1415. },
  1416. 'ticket.customer' => {
  1417. shown: true,
  1418. },
  1419. },
  1420. },
  1421. to_create: false,
  1422. to_migrate: false,
  1423. to_delete: false,
  1424. position: 200,
  1425. )
  1426. ObjectManager::Attribute.add(
  1427. force: true,
  1428. object: 'Organization',
  1429. name: 'shared',
  1430. display: __('Shared organization'),
  1431. data_type: 'boolean',
  1432. data_option: {
  1433. null: true,
  1434. default: true,
  1435. note: __("Customers in the organization can view each other's items."),
  1436. item_class: 'formGroup--halfSize',
  1437. options: {
  1438. true: 'yes',
  1439. false: 'no',
  1440. },
  1441. translate: true,
  1442. permission: ['admin.organization'],
  1443. },
  1444. editable: false,
  1445. active: true,
  1446. screens: {
  1447. edit: {
  1448. '-all-' => {
  1449. null: false,
  1450. },
  1451. },
  1452. create: {
  1453. '-all-' => {
  1454. null: false,
  1455. },
  1456. },
  1457. view: {
  1458. 'ticket.agent' => {
  1459. shown: true,
  1460. },
  1461. 'ticket.customer' => {
  1462. shown: false,
  1463. },
  1464. },
  1465. },
  1466. to_create: false,
  1467. to_migrate: false,
  1468. to_delete: false,
  1469. position: 1400,
  1470. )
  1471. ObjectManager::Attribute.add(
  1472. force: true,
  1473. object: 'Organization',
  1474. name: 'domain_assignment',
  1475. display: __('Domain based assignment'),
  1476. data_type: 'boolean',
  1477. data_option: {
  1478. null: true,
  1479. default: false,
  1480. note: __('Assign users based on user domain.'),
  1481. item_class: 'formGroup--halfSize',
  1482. options: {
  1483. true: 'yes',
  1484. false: 'no',
  1485. },
  1486. translate: true,
  1487. permission: ['admin.organization'],
  1488. },
  1489. editable: false,
  1490. active: true,
  1491. screens: {
  1492. edit: {
  1493. '-all-' => {
  1494. null: false,
  1495. },
  1496. },
  1497. create: {
  1498. '-all-' => {
  1499. null: false,
  1500. },
  1501. },
  1502. view: {
  1503. 'ticket.agent' => {
  1504. shown: true,
  1505. },
  1506. 'ticket.customer' => {
  1507. shown: false,
  1508. },
  1509. },
  1510. },
  1511. to_create: false,
  1512. to_migrate: false,
  1513. to_delete: false,
  1514. position: 1410,
  1515. )
  1516. ObjectManager::Attribute.add(
  1517. force: true,
  1518. object: 'Organization',
  1519. name: 'domain',
  1520. display: __('Domain'),
  1521. data_type: 'input',
  1522. data_option: {
  1523. type: 'text',
  1524. maxlength: 150,
  1525. null: true,
  1526. item_class: 'formGroup--halfSize',
  1527. },
  1528. editable: false,
  1529. active: true,
  1530. screens: {
  1531. edit: {
  1532. '-all-' => {
  1533. null: true,
  1534. },
  1535. },
  1536. create: {
  1537. '-all-' => {
  1538. null: true,
  1539. },
  1540. },
  1541. view: {
  1542. 'ticket.agent' => {
  1543. shown: true,
  1544. },
  1545. 'ticket.customer' => {
  1546. shown: false,
  1547. },
  1548. },
  1549. },
  1550. to_create: false,
  1551. to_migrate: false,
  1552. to_delete: false,
  1553. position: 1420,
  1554. )
  1555. ObjectManager::Attribute.add(
  1556. force: true,
  1557. object: 'Organization',
  1558. name: 'note',
  1559. display: __('Note'),
  1560. data_type: 'richtext',
  1561. data_option: {
  1562. type: 'text',
  1563. maxlength: 5000,
  1564. null: true,
  1565. note: __('Notes are visible to agents only, never to customers.'),
  1566. },
  1567. editable: false,
  1568. active: true,
  1569. screens: {
  1570. edit: {
  1571. '-all-' => {
  1572. null: true,
  1573. },
  1574. },
  1575. create: {
  1576. '-all-' => {
  1577. null: true,
  1578. },
  1579. },
  1580. view: {
  1581. 'ticket.agent' => {
  1582. shown: true,
  1583. },
  1584. 'ticket.customer' => {
  1585. shown: false,
  1586. },
  1587. },
  1588. },
  1589. to_create: false,
  1590. to_migrate: false,
  1591. to_delete: false,
  1592. position: 1500,
  1593. )
  1594. ObjectManager::Attribute.add(
  1595. force: true,
  1596. object: 'Organization',
  1597. name: 'active',
  1598. display: __('Active'),
  1599. data_type: 'active',
  1600. data_option: {
  1601. null: true,
  1602. default: true,
  1603. permission: ['admin.organization'],
  1604. },
  1605. editable: false,
  1606. active: true,
  1607. screens: {
  1608. edit: {
  1609. '-all-' => {
  1610. null: false,
  1611. },
  1612. },
  1613. create: {
  1614. '-all-' => {
  1615. null: false,
  1616. },
  1617. },
  1618. view: {
  1619. 'ticket.agent' => {
  1620. shown: true,
  1621. },
  1622. 'ticket.customer' => {
  1623. shown: false,
  1624. },
  1625. },
  1626. },
  1627. to_create: false,
  1628. to_migrate: false,
  1629. to_delete: false,
  1630. position: 1800,
  1631. )
  1632. ObjectManager::Attribute.add(
  1633. force: true,
  1634. object: 'Group',
  1635. name: 'name',
  1636. display: __('Name'),
  1637. data_type: 'input',
  1638. data_option: {
  1639. type: 'text',
  1640. maxlength: 150,
  1641. null: false,
  1642. },
  1643. editable: false,
  1644. active: true,
  1645. screens: {
  1646. create: {
  1647. '-all-' => {
  1648. null: false,
  1649. },
  1650. },
  1651. edit: {
  1652. '-all-' => {
  1653. null: false,
  1654. },
  1655. },
  1656. view: {
  1657. '-all-' => {
  1658. shown: true,
  1659. },
  1660. },
  1661. },
  1662. to_create: false,
  1663. to_migrate: false,
  1664. to_delete: false,
  1665. position: 200,
  1666. )
  1667. ObjectManager::Attribute.add(
  1668. force: true,
  1669. object: 'Group',
  1670. name: 'assignment_timeout',
  1671. display: __('Assignment Timeout'),
  1672. data_type: 'integer',
  1673. data_option: {
  1674. maxlength: 150,
  1675. null: true,
  1676. note: __('Assignment timeout in minutes if assigned agent is not working on it. Ticket will be shown as unassigend.'),
  1677. min: 0,
  1678. max: 999_999,
  1679. },
  1680. editable: false,
  1681. active: true,
  1682. screens: {
  1683. create: {
  1684. '-all-' => {
  1685. null: true,
  1686. },
  1687. },
  1688. edit: {
  1689. '-all-' => {
  1690. null: true,
  1691. },
  1692. },
  1693. },
  1694. to_create: false,
  1695. to_migrate: false,
  1696. to_delete: false,
  1697. position: 300,
  1698. )
  1699. ObjectManager::Attribute.add(
  1700. force: true,
  1701. object: 'Group',
  1702. name: 'follow_up_possible',
  1703. display: __('Follow-up possible'),
  1704. data_type: 'select',
  1705. data_option: {
  1706. default: 'yes',
  1707. options: {
  1708. yes: 'yes',
  1709. new_ticket: 'do not reopen Ticket but create new Ticket'
  1710. },
  1711. null: false,
  1712. note: __('Follow-up for closed ticket possible or not.'),
  1713. translate: true
  1714. },
  1715. editable: false,
  1716. active: true,
  1717. screens: {
  1718. create: {
  1719. '-all-' => {
  1720. null: false,
  1721. },
  1722. },
  1723. edit: {
  1724. '-all-' => {
  1725. null: false,
  1726. },
  1727. },
  1728. },
  1729. to_create: false,
  1730. to_migrate: false,
  1731. to_delete: false,
  1732. position: 400,
  1733. )
  1734. ObjectManager::Attribute.add(
  1735. force: true,
  1736. object: 'Group',
  1737. name: 'follow_up_assignment',
  1738. display: __('Assign Follow-Ups'),
  1739. data_type: 'select',
  1740. data_option: {
  1741. default: 'true',
  1742. options: {
  1743. true: 'yes',
  1744. false: 'no',
  1745. },
  1746. null: false,
  1747. note: __('Assign follow-up to latest agent again.'),
  1748. translate: true
  1749. },
  1750. editable: false,
  1751. active: true,
  1752. screens: {
  1753. create: {
  1754. '-all-' => {
  1755. null: false,
  1756. },
  1757. },
  1758. edit: {
  1759. '-all-' => {
  1760. null: false,
  1761. },
  1762. },
  1763. },
  1764. to_create: false,
  1765. to_migrate: false,
  1766. to_delete: false,
  1767. position: 500,
  1768. )
  1769. ObjectManager::Attribute.add(
  1770. force: true,
  1771. object: 'Group',
  1772. name: 'email_address_id',
  1773. display: __('Email'),
  1774. data_type: 'select',
  1775. data_option: {
  1776. default: '',
  1777. multiple: false,
  1778. null: true,
  1779. relation: 'EmailAddress',
  1780. nulloption: true,
  1781. do_not_log: true,
  1782. },
  1783. editable: false,
  1784. active: true,
  1785. screens: {
  1786. create: {
  1787. '-all-' => {
  1788. null: true,
  1789. },
  1790. },
  1791. edit: {
  1792. '-all-' => {
  1793. null: true,
  1794. },
  1795. },
  1796. },
  1797. to_create: false,
  1798. to_migrate: false,
  1799. to_delete: false,
  1800. position: 600,
  1801. )
  1802. ObjectManager::Attribute.add(
  1803. force: true,
  1804. object: 'Group',
  1805. name: 'signature_id',
  1806. display: __('Signature'),
  1807. data_type: 'select',
  1808. data_option: {
  1809. default: '',
  1810. multiple: false,
  1811. null: true,
  1812. relation: 'Signature',
  1813. nulloption: true,
  1814. do_not_log: true,
  1815. },
  1816. editable: false,
  1817. active: true,
  1818. screens: {
  1819. create: {
  1820. '-all-' => {
  1821. null: true,
  1822. },
  1823. },
  1824. edit: {
  1825. '-all-' => {
  1826. null: true,
  1827. },
  1828. },
  1829. },
  1830. to_create: false,
  1831. to_migrate: false,
  1832. to_delete: false,
  1833. position: 600,
  1834. )
  1835. ObjectManager::Attribute.add(
  1836. force: true,
  1837. object: 'Group',
  1838. name: 'shared_drafts',
  1839. display: __('Shared Drafts'),
  1840. data_type: 'active',
  1841. data_option: {
  1842. null: false,
  1843. default: true,
  1844. permission: ['admin.group'],
  1845. },
  1846. editable: false,
  1847. active: true,
  1848. screens: {
  1849. create: {
  1850. '-all-' => {
  1851. null: true,
  1852. },
  1853. },
  1854. edit: {
  1855. '-all-': {
  1856. null: false,
  1857. },
  1858. },
  1859. view: {
  1860. '-all-' => {
  1861. shown: false,
  1862. },
  1863. },
  1864. },
  1865. to_create: false,
  1866. to_migrate: false,
  1867. to_delete: false,
  1868. position: 1400,
  1869. )
  1870. ObjectManager::Attribute.add(
  1871. force: true,
  1872. object: 'Group',
  1873. name: 'note',
  1874. display: __('Note'),
  1875. data_type: 'richtext',
  1876. data_option: {
  1877. type: 'text',
  1878. maxlength: 250,
  1879. null: true,
  1880. note: __('Notes are visible to agents only, never to customers.'),
  1881. },
  1882. editable: false,
  1883. active: true,
  1884. screens: {
  1885. create: {
  1886. '-all-' => {
  1887. null: true,
  1888. },
  1889. },
  1890. edit: {
  1891. '-all-' => {
  1892. null: true,
  1893. },
  1894. },
  1895. view: {
  1896. '-all-' => {
  1897. shown: true,
  1898. },
  1899. },
  1900. },
  1901. to_create: false,
  1902. to_migrate: false,
  1903. to_delete: false,
  1904. position: 1500,
  1905. )
  1906. ObjectManager::Attribute.add(
  1907. force: true,
  1908. object: 'Group',
  1909. name: 'active',
  1910. display: __('Active'),
  1911. data_type: 'active',
  1912. data_option: {
  1913. null: true,
  1914. default: true,
  1915. permission: ['admin.group'],
  1916. },
  1917. editable: false,
  1918. active: true,
  1919. screens: {
  1920. create: {
  1921. '-all-' => {
  1922. null: true,
  1923. },
  1924. },
  1925. edit: {
  1926. '-all-': {
  1927. null: false,
  1928. },
  1929. },
  1930. view: {
  1931. '-all-' => {
  1932. shown: false,
  1933. },
  1934. },
  1935. },
  1936. to_create: false,
  1937. to_migrate: false,
  1938. to_delete: false,
  1939. position: 1800,
  1940. )