You are here

merci_line_item.yml in MERCI (Manage Equipment Reservations, Checkout and Inventory) 8.2

modules/merci_migration/migrations/merci_line_item.yml

File

modules/merci_migration/migrations/merci_line_item.yml
View source
  1. # modules/custom/merci/modules/merci_migration/migrations/merci_resource.yml
  2. id: merci_line_item
  3. label: Merci Line Item
  4. migration_group: Merci
  5. migration_tags:
  6. - Custom
  7. source:
  8. plugin: merci_line_item
  9. process:
  10. id: tnid
  11. langcode:
  12. plugin: default_value
  13. source: language
  14. default_value: en
  15. name: title
  16. user_id:
  17. -
  18. plugin: get
  19. source: node_uid
  20. -
  21. plugin: default_value
  22. default_value: 1
  23. field_reserved_for/target_id:
  24. -
  25. plugin: get
  26. source: node_uid
  27. -
  28. plugin: default_value
  29. default_value: 1
  30. field_checkout/value:
  31. -
  32. plugin: extract
  33. source: field_merci_date
  34. default: '2017-12-09 10:00:00'
  35. index:
  36. - '0'
  37. - value
  38. -
  39. plugin: format_date
  40. from_format: 'Y-m-d H:i:s'
  41. to_format: 'Y-m-d\TH:i:s'
  42. timezone: 'GMT'
  43. field_checkin/value:
  44. -
  45. plugin: extract
  46. source: field_merci_date
  47. default: '2017-12-09 10:00:00'
  48. index:
  49. - '0'
  50. - value2
  51. -
  52. plugin: format_date
  53. from_format: 'Y-m-d H:i:s'
  54. to_format: 'Y-m-d\TH:i:s'
  55. timezone: 'GMT'
  56. merci_reservation_date/value:
  57. -
  58. plugin: extract
  59. source: field_merci_date
  60. default: '2017-12-09 10:00:00'
  61. index:
  62. - '0'
  63. - value
  64. -
  65. plugin: format_date
  66. from_format: 'Y-m-d H:i:s'
  67. to_format: 'Y-m-d\TH:i:s'
  68. timezone: 'GMT'
  69. merci_reservation_date/end_value:
  70. -
  71. plugin: extract
  72. source: field_merci_date
  73. default: '2017-12-09 10:00:00'
  74. index:
  75. - '0'
  76. - value2
  77. -
  78. plugin: format_date
  79. from_format: 'Y-m-d H:i:s'
  80. to_format: 'Y-m-d\TH:i:s'
  81. timezone: 'GMT'
  82. 'merci_reservation_items/target_id':
  83. plugin: migration_lookup
  84. migration:
  85. - merci_resource
  86. source: merci_item_nid
  87. 'field_merci_bucket_item/target_id':
  88. plugin: migration_lookup
  89. migration: merci_bucket
  90. no_stub: true
  91. source: type
  92. field_reservation_status:
  93. plugin: static_map
  94. source: merci_reservation_status
  95. default_value: checked_in
  96. map:
  97. 1: unconfirmed
  98. 2: pending
  99. 3: checked_out
  100. 4: checked_in
  101. 5: canceled
  102. 6: denied
  103. 7: no_show
  104. destination:
  105. plugin: 'entity:merci_line_item'
  106. default_bundle: merci_reservation
  107. migration_dependencies:
  108. required:
  109. - merci_resource