{"action":"created","comment":{"url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/comments/22572028","id":22572028,"diff_hunk":"@@ -0,0 +1,65 @@\n+﻿using System;\n+using System.Linq;\n+using Umbraco.Core;\n+using Umbraco.Core.Auditing;\n+using Umbraco.Core.Events;\n+using Umbraco.Core.Models;\n+using Umbraco.Core.Services;\n+\n+namespace Umbraco.Web.Strategies\n+{\n+    public sealed class RelateOnTrashHandler : ApplicationEventHandler\n+    {\n+        protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)","path":"src/Umbraco.Web/Strategies/RelateOnTrashHandler.cs","position":13,"original_position":13,"commit_id":"8a32f02781a67d4b9b7f7603c6f07759921d680e","original_commit_id":"8a32f02781a67d4b9b7f7603c6f07759921d680e","user":{"login":"sitereactor","id":1398823,"avatar_url":"https://avatars.githubusercontent.com/u/1398823?v=3","gravatar_id":"","url":"https://api.github.com/users/sitereactor","html_url":"https://github.com/sitereactor","followers_url":"https://api.github.com/users/sitereactor/followers","following_url":"https://api.github.com/users/sitereactor/following{/other_user}","gists_url":"https://api.github.com/users/sitereactor/gists{/gist_id}","starred_url":"https://api.github.com/users/sitereactor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sitereactor/subscriptions","organizations_url":"https://api.github.com/users/sitereactor/orgs","repos_url":"https://api.github.com/users/sitereactor/repos","events_url":"https://api.github.com/users/sitereactor/events{/privacy}","received_events_url":"https://api.github.com/users/sitereactor/received_events","type":"User","site_admin":false},"body":"One thing to consider with that is whether the creation of those relations should raise Saving/Saved events of its own, which isn't possible if its done at the repository level.\r\nMaybe its implicit that a specific relation is created during another operation, but it also means that you can't directly use it in something like Courier. Unless maybe you add additional info to the event args.\r\n\r\nJust something to consider - kinda related to the Macro thing I mentioned on Slack.","created_at":"2015-01-07T05:57:46Z","updated_at":"2015-01-07T05:57:46Z","html_url":"https://github.com/umbraco/Umbraco-CMS/pull/610#discussion_r22572028","pull_request_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/610","_links":{"self":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/comments/22572028"},"html":{"href":"https://github.com/umbraco/Umbraco-CMS/pull/610#discussion_r22572028"},"pull_request":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/610"}}},"pull_request":{"url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/610","id":26787800,"html_url":"https://github.com/umbraco/Umbraco-CMS/pull/610","diff_url":"https://github.com/umbraco/Umbraco-CMS/pull/610.diff","patch_url":"https://github.com/umbraco/Umbraco-CMS/pull/610.patch","issue_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/610","number":610,"state":"closed","locked":false,"title":"U4-337 Restore option in content recycle bin","user":{"login":"leekelleher","id":209066,"avatar_url":"https://avatars.githubusercontent.com/u/209066?v=3","gravatar_id":"","url":"https://api.github.com/users/leekelleher","html_url":"https://github.com/leekelleher","followers_url":"https://api.github.com/users/leekelleher/followers","following_url":"https://api.github.com/users/leekelleher/following{/other_user}","gists_url":"https://api.github.com/users/leekelleher/gists{/gist_id}","starred_url":"https://api.github.com/users/leekelleher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leekelleher/subscriptions","organizations_url":"https://api.github.com/users/leekelleher/orgs","repos_url":"https://api.github.com/users/leekelleher/repos","events_url":"https://api.github.com/users/leekelleher/events{/privacy}","received_events_url":"https://api.github.com/users/leekelleher/received_events","type":"User","site_admin":false},"body":"[U4-337 Restore option in recycle bin](http://issues.umbraco.org/issue/U4-337)\r\n\r\nWhen a content item is moved to trash, a relation is created between the node and it's (previous) parent node.  For items in the recycle-bin, a \"Restore\" option is available, which will notify the user to where the node can be restored to (e.g. underneath its previous parent).  Once a node is restored, the relation is removed from the database.\r\n\r\nThere are a couple things that may need to be discussed with the Core team:\r\n\r\n* Creating the new relation-type, should this be done as a version-specific database migration class? See commit eace046342ea83fe4e81286f487e02772f947ca0 for details\r\n* Language key entries - I've only done English GB & US, is there a process for translations? or should I just use Google Translate?\r\n\r\nIf and when we are happy with the approach, I can look to also apply the Restore option to the Media recycle-bin.","created_at":"2015-01-03T22:36:36Z","updated_at":"2015-01-07T05:57:46Z","closed_at":"2015-01-06T01:25:19Z","merged_at":null,"merge_commit_sha":"cb0b1075b0071bdb4d7a24415303f444bd5bbb29","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/610/commits","review_comments_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/610/comments","review_comment_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/comments/{number}","comments_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/610/comments","statuses_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/statuses/8a32f02781a67d4b9b7f7603c6f07759921d680e","head":{"label":"leekelleher:U4-337","ref":"U4-337","sha":"8a32f02781a67d4b9b7f7603c6f07759921d680e","user":{"login":"leekelleher","id":209066,"avatar_url":"https://avatars.githubusercontent.com/u/209066?v=3","gravatar_id":"","url":"https://api.github.com/users/leekelleher","html_url":"https://github.com/leekelleher","followers_url":"https://api.github.com/users/leekelleher/followers","following_url":"https://api.github.com/users/leekelleher/following{/other_user}","gists_url":"https://api.github.com/users/leekelleher/gists{/gist_id}","starred_url":"https://api.github.com/users/leekelleher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leekelleher/subscriptions","organizations_url":"https://api.github.com/users/leekelleher/orgs","repos_url":"https://api.github.com/users/leekelleher/repos","events_url":"https://api.github.com/users/leekelleher/events{/privacy}","received_events_url":"https://api.github.com/users/leekelleher/received_events","type":"User","site_admin":false},"repo":{"id":14136966,"name":"Umbraco-CMS","full_name":"leekelleher/Umbraco-CMS","owner":{"login":"leekelleher","id":209066,"avatar_url":"https://avatars.githubusercontent.com/u/209066?v=3","gravatar_id":"","url":"https://api.github.com/users/leekelleher","html_url":"https://github.com/leekelleher","followers_url":"https://api.github.com/users/leekelleher/followers","following_url":"https://api.github.com/users/leekelleher/following{/other_user}","gists_url":"https://api.github.com/users/leekelleher/gists{/gist_id}","starred_url":"https://api.github.com/users/leekelleher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leekelleher/subscriptions","organizations_url":"https://api.github.com/users/leekelleher/orgs","repos_url":"https://api.github.com/users/leekelleher/repos","events_url":"https://api.github.com/users/leekelleher/events{/privacy}","received_events_url":"https://api.github.com/users/leekelleher/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leekelleher/Umbraco-CMS","description":"The simple, flexible and friendly ASP.NET CMS used by more than 175.000 websites","fork":true,"url":"https://api.github.com/repos/leekelleher/Umbraco-CMS","forks_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/forks","keys_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/teams","hooks_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/hooks","issue_events_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/issues/events{/number}","events_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/events","assignees_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/assignees{/user}","branches_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/branches{/branch}","tags_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/tags","blobs_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/statuses/{sha}","languages_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/languages","stargazers_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/stargazers","contributors_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/contributors","subscribers_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/subscribers","subscription_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/subscription","commits_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/issues/comments/{number}","contents_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/contents/{+path}","compare_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/merges","archive_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/downloads","issues_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/issues{/number}","pulls_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/pulls{/number}","milestones_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/milestones{/number}","notifications_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/labels{/name}","releases_url":"https://api.github.com/repos/leekelleher/Umbraco-CMS/releases{/id}","created_at":"2013-11-05T09:21:59Z","updated_at":"2014-06-09T08:56:24Z","pushed_at":"2015-01-05T13:50:33Z","git_url":"git://github.com/leekelleher/Umbraco-CMS.git","ssh_url":"git@github.com:leekelleher/Umbraco-CMS.git","clone_url":"https://github.com/leekelleher/Umbraco-CMS.git","svn_url":"https://github.com/leekelleher/Umbraco-CMS","homepage":"http://umbraco.com","size":102427,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"7.2.0"}},"base":{"label":"umbraco:dev-v7","ref":"dev-v7","sha":"920084b7c3d79aedf3b2bb9642c093a87ccf389f","user":{"login":"umbraco","id":1419552,"avatar_url":"https://avatars.githubusercontent.com/u/1419552?v=3","gravatar_id":"","url":"https://api.github.com/users/umbraco","html_url":"https://github.com/umbraco","followers_url":"https://api.github.com/users/umbraco/followers","following_url":"https://api.github.com/users/umbraco/following{/other_user}","gists_url":"https://api.github.com/users/umbraco/gists{/gist_id}","starred_url":"https://api.github.com/users/umbraco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbraco/subscriptions","organizations_url":"https://api.github.com/users/umbraco/orgs","repos_url":"https://api.github.com/users/umbraco/repos","events_url":"https://api.github.com/users/umbraco/events{/privacy}","received_events_url":"https://api.github.com/users/umbraco/received_events","type":"Organization","site_admin":false},"repo":{"id":10601208,"name":"Umbraco-CMS","full_name":"umbraco/Umbraco-CMS","owner":{"login":"umbraco","id":1419552,"avatar_url":"https://avatars.githubusercontent.com/u/1419552?v=3","gravatar_id":"","url":"https://api.github.com/users/umbraco","html_url":"https://github.com/umbraco","followers_url":"https://api.github.com/users/umbraco/followers","following_url":"https://api.github.com/users/umbraco/following{/other_user}","gists_url":"https://api.github.com/users/umbraco/gists{/gist_id}","starred_url":"https://api.github.com/users/umbraco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umbraco/subscriptions","organizations_url":"https://api.github.com/users/umbraco/orgs","repos_url":"https://api.github.com/users/umbraco/repos","events_url":"https://api.github.com/users/umbraco/events{/privacy}","received_events_url":"https://api.github.com/users/umbraco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/umbraco/Umbraco-CMS","description":"The simple, flexible and friendly ASP.NET CMS used by more than 225.000 websites","fork":false,"url":"https://api.github.com/repos/umbraco/Umbraco-CMS","forks_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/forks","keys_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/teams","hooks_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/hooks","issue_events_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/events{/number}","events_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/events","assignees_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/assignees{/user}","branches_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/branches{/branch}","tags_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/tags","blobs_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/statuses/{sha}","languages_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/languages","stargazers_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/stargazers","contributors_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/contributors","subscribers_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/subscribers","subscription_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/subscription","commits_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/comments/{number}","contents_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/contents/{+path}","compare_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/merges","archive_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/downloads","issues_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues{/number}","pulls_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls{/number}","milestones_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/milestones{/number}","notifications_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/labels{/name}","releases_url":"https://api.github.com/repos/umbraco/Umbraco-CMS/releases{/id}","created_at":"2013-06-10T13:50:46Z","updated_at":"2015-01-07T04:36:26Z","pushed_at":"2015-01-07T04:54:13Z","git_url":"git://github.com/umbraco/Umbraco-CMS.git","ssh_url":"git@github.com:umbraco/Umbraco-CMS.git","clone_url":"https://github.com/umbraco/Umbraco-CMS.git","svn_url":"https://github.com/umbraco/Umbraco-CMS","homepage":"http://umbraco.com","size":274418,"stargazers_count":670,"watchers_count":670,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":544,"mirror_url":null,"open_issues_count":74,"forks":544,"open_issues":74,"watchers":670,"default_branch":"dev-v7"}},"_links":{"self":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/610"},"html":{"href":"https://github.com/umbraco/Umbraco-CMS/pull/610"},"issue":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/610"},"comments":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/issues/610/comments"},"review_comments":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/610/comments"},"review_comment":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/pulls/610/commits"},"statuses":{"href":"https://api.github.com/repos/umbraco/Umbraco-CMS/statuses/8a32f02781a67d4b9b7f7603c6f07759921d680e"}}}}