object_manager_attributes.rb 42 KB

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