{"action":"created","issue":{"url":"https://api.github.com/repos/fago/rules/issues/178","labels_url":"https://api.github.com/repos/fago/rules/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/fago/rules/issues/178/comments","events_url":"https://api.github.com/repos/fago/rules/issues/178/events","html_url":"https://github.com/fago/rules/pull/178","id":69136252,"number":178,"title":"page redirect action 2471641","user":{"login":"bbujisic","id":1785801,"avatar_url":"https://avatars.githubusercontent.com/u/1785801?v=3","gravatar_id":"","url":"https://api.github.com/users/bbujisic","html_url":"https://github.com/bbujisic","followers_url":"https://api.github.com/users/bbujisic/followers","following_url":"https://api.github.com/users/bbujisic/following{/other_user}","gists_url":"https://api.github.com/users/bbujisic/gists{/gist_id}","starred_url":"https://api.github.com/users/bbujisic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbujisic/subscriptions","organizations_url":"https://api.github.com/users/bbujisic/orgs","repos_url":"https://api.github.com/users/bbujisic/repos","events_url":"https://api.github.com/users/bbujisic/events{/privacy}","received_events_url":"https://api.github.com/users/bbujisic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-17T13:13:30Z","updated_at":"2015-06-07T11:33:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fago/rules/pulls/178","html_url":"https://github.com/fago/rules/pull/178","diff_url":"https://github.com/fago/rules/pull/178.diff","patch_url":"https://github.com/fago/rules/pull/178.patch"},"body":"See https://www.drupal.org/node/2471641\r\n\r\nThere is a pretty large list of todo's:\r\n* We need a \"restriction\" context.\r\n* ~~We need an \"optional\" context~~ We have required=false now.\r\n* We need a \"defaultValue\" context.\r\n* There should be a line of code preventing redirection rule from being executed on rules admin pages (in order not to lock out admins). But we still do not have the URL to rules admin page...\r\n* Lines 124-128 of src/Plugin/Action/SystemPageRedirect.php are absolutely untested and I have no idea if they are going to work.\r\n* Lines 131-133 of src/Plugin/Action/SystemPageRedirect.php are also untested and I have no idea if they are going to work.\r\n* More test scenarios might be needed."},"comment":{"url":"https://api.github.com/repos/fago/rules/issues/comments/109741222","html_url":"https://github.com/fago/rules/pull/178#issuecomment-109741222","issue_url":"https://api.github.com/repos/fago/rules/issues/178","id":109741222,"user":{"login":"bbujisic","id":1785801,"avatar_url":"https://avatars.githubusercontent.com/u/1785801?v=3","gravatar_id":"","url":"https://api.github.com/users/bbujisic","html_url":"https://github.com/bbujisic","followers_url":"https://api.github.com/users/bbujisic/followers","following_url":"https://api.github.com/users/bbujisic/following{/other_user}","gists_url":"https://api.github.com/users/bbujisic/gists{/gist_id}","starred_url":"https://api.github.com/users/bbujisic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbujisic/subscriptions","organizations_url":"https://api.github.com/users/bbujisic/orgs","repos_url":"https://api.github.com/users/bbujisic/repos","events_url":"https://api.github.com/users/bbujisic/events{/privacy}","received_events_url":"https://api.github.com/users/bbujisic/received_events","type":"User","site_admin":false},"created_at":"2015-06-07T11:33:04Z","updated_at":"2015-06-07T11:33:04Z","body":"Update: I cloned the way core Drupal\\action\\Plugin\\Action\\GotoAction adds redirection listeners.\r\n\r\nTests are a little bit ugly because they only assert if response listener exists in event dispatcher. I have no idea how to access the RedirectResponse object within the listener to assert if response is ok.\r\n\r\nHelp please? "}}