object_manager_attributes.rb 39 KB

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