object_manager_attributes.rb 32 KB

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