object_manager_attributes.rb 28 KB

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