object_manager_attributes.rb 28 KB

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