object_manager_attributes.rb 32 KB

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