{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/1632","labels_url":"https://api.github.com/repos/magento/magento2/issues/1632/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/1632/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/1632/events","html_url":"https://github.com/magento/magento2/issues/1632","id":99803817,"number":1632,"title":"How to copy custom data from quote to order and order item?","user":{"login":"FireKirin","id":2336560,"avatar_url":"https://avatars.githubusercontent.com/u/2336560?v=3","gravatar_id":"","url":"https://api.github.com/users/FireKirin","html_url":"https://github.com/FireKirin","followers_url":"https://api.github.com/users/FireKirin/followers","following_url":"https://api.github.com/users/FireKirin/following{/other_user}","gists_url":"https://api.github.com/users/FireKirin/gists{/gist_id}","starred_url":"https://api.github.com/users/FireKirin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FireKirin/subscriptions","organizations_url":"https://api.github.com/users/FireKirin/orgs","repos_url":"https://api.github.com/users/FireKirin/repos","events_url":"https://api.github.com/users/FireKirin/events{/privacy}","received_events_url":"https://api.github.com/users/FireKirin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magento/magento2/labels/acknowledged","name":"acknowledged","color":"02d7e1"},{"url":"https://api.github.com/repos/magento/magento2/labels/bug","name":"bug","color":"eb6420"},{"url":"https://api.github.com/repos/magento/magento2/labels/CS","name":"CS","color":"fad8c7"},{"url":"https://api.github.com/repos/magento/magento2/labels/needs%20update","name":"needs update","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-08-08T13:49:58Z","updated_at":"2015-10-02T08:53:36Z","closed_at":"2015-10-02T08:53:36Z","body":"I am building a custom module in magento 2 that have a custom discount. I am trying to copy the discount from quote, quote item to order and order item.\r\nIn magento 1, I declare in config.xml like this:\r\n \r\n\r\n    <fieldsets>\r\n            <sales_convert_quote_address>\r\n                <custom_discount_amount><to_order>*</to_order></custome_discount_amount>\r\n                <base_custom_discount_amount><to_order>*</to_order></base_custome_discount_amount>\r\n            </sales_convert_quote_address>\r\n            <sales_convert_quote_item>\r\n                <custome_discount_amount><to_order_item>*</to_order_item></custome_discount_amount>\r\n                <base_custom_discount_amount><to_order_item>*</to_order_item></base_custom_discount_amount>\r\n            </sales_convert_quote_item>\r\n        </fieldsets> \r\n\r\nand my custom discount amount was copied to tables: sales_flat_order and sales_flat_order_item as expected.\r\n\r\nIn Magento 2, I created a file name: fieldset.xml with this code:\r\n\r\n    <config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n        xsi:noNamespaceSchemaLocation=\"../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd\">\r\n    <scope id=\"global\">\r\n        <fieldset id=\"sales_convert_quote_item\">\r\n            <field name=\"custom_discount_amount\">\r\n                <aspect name=\"to_order_item\" />\r\n            </field>\r\n            <field name=\"base_custom_discount_amount\">\r\n                <aspect name=\"to_order_item\" />\r\n            </field>\r\n        </fieldset>         \r\n          <fieldset id=\"sales_convert_quote_address\">\r\n            <field name=\"custom_discount_amount\">\r\n                <aspect name=\"to_order\" />\r\n            </field>\r\n            <field name=\"base_custom_discount_amount\">\r\n                <aspect name=\"to_order\" />\r\n            </field>\r\n        </fieldset>   \r\n    </scope>\r\n</config>\r\nbut there is no success.\r\nWhat else I need to do in magento 2 to make it works? Can you guys please help me?"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/144962599","html_url":"https://github.com/magento/magento2/issues/1632#issuecomment-144962599","issue_url":"https://api.github.com/repos/magento/magento2/issues/1632","id":144962599,"user":{"login":"okorshenko","id":7325075,"avatar_url":"https://avatars.githubusercontent.com/u/7325075?v=3","gravatar_id":"","url":"https://api.github.com/users/okorshenko","html_url":"https://github.com/okorshenko","followers_url":"https://api.github.com/users/okorshenko/followers","following_url":"https://api.github.com/users/okorshenko/following{/other_user}","gists_url":"https://api.github.com/users/okorshenko/gists{/gist_id}","starred_url":"https://api.github.com/users/okorshenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okorshenko/subscriptions","organizations_url":"https://api.github.com/users/okorshenko/orgs","repos_url":"https://api.github.com/users/okorshenko/repos","events_url":"https://api.github.com/users/okorshenko/events{/privacy}","received_events_url":"https://api.github.com/users/okorshenko/received_events","type":"User","site_admin":false},"created_at":"2015-10-02T08:53:36Z","updated_at":"2015-10-02T08:53:36Z","body":"@FireKirin , Please, let us know if you still have an issue"}}