{"action":"opened","issue":{"url":"https://api.github.com/repos/moqui/moqui-framework/issues/346","repository_url":"https://api.github.com/repos/moqui/moqui-framework","labels_url":"https://api.github.com/repos/moqui/moqui-framework/issues/346/labels{/name}","comments_url":"https://api.github.com/repos/moqui/moqui-framework/issues/346/comments","events_url":"https://api.github.com/repos/moqui/moqui-framework/issues/346/events","html_url":"https://github.com/moqui/moqui-framework/issues/346","id":393124490,"node_id":"MDU6SXNzdWUzOTMxMjQ0OTA=","number":346,"title":"Is a warning necessary when deleting old promotions (FindPromotion.xml)?","user":{"login":"fizzyduck","id":46020783,"node_id":"MDQ6VXNlcjQ2MDIwNzgz","avatar_url":"https://avatars1.githubusercontent.com/u/46020783?v=4","gravatar_id":"","url":"https://api.github.com/users/fizzyduck","html_url":"https://github.com/fizzyduck","followers_url":"https://api.github.com/users/fizzyduck/followers","following_url":"https://api.github.com/users/fizzyduck/following{/other_user}","gists_url":"https://api.github.com/users/fizzyduck/gists{/gist_id}","starred_url":"https://api.github.com/users/fizzyduck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fizzyduck/subscriptions","organizations_url":"https://api.github.com/users/fizzyduck/orgs","repos_url":"https://api.github.com/users/fizzyduck/repos","events_url":"https://api.github.com/users/fizzyduck/events{/privacy}","received_events_url":"https://api.github.com/users/fizzyduck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-20T16:40:14Z","updated_at":"2018-12-20T16:40:14Z","closed_at":null,"author_association":"NONE","body":"Firstly, apologies for not raising this on the SimpleScreens repo - it doesn't have an issue tracker.\r\n\r\nI noticed a comment in [FindPromotion.xml](https://github.com/moqui/SimpleScreens/blob/b9fe1123ede76124bd0ed94614ff4627b44dce56/screen/SimpleScreens/ProductStore/Promotion/FindPromotion.xml#L98) which suggests that deletion of promotions hasn't been implemented due to the need for a service which can see if a Promotion has been previously used.\r\n\r\nIs a link to the promotion that was applied actually stored anywhere? I notice when looking at a created Order that the detail of the Promotion has been applied as it was set up at the time and the textual details are recorded in the Order, but a link to the Promotion is not (which seems correct to me).\r\n\r\nAdditionally, given it is possible to retrospectively change the details of a Promotion after it has been applied to an Order and this will only affect new Orders made after that change, then we should consider that a Promotion is something that is applied as a \"rubber stamp\". Its details should be copied in to the Order (the text and formula that were present in the Promotion at the time) and then no longer be associated with the Promotion object.\r\n\r\nI am quite new to the architecture so may well have missed something obvious - apologies if that is the case."}}
{"actor":{"display_login":"fizzyduck"}}