{"action":"opened","issue":{"url":"https://api.github.com/repos/catapult-project/catapult/issues/2190","repository_url":"https://api.github.com/repos/catapult-project/catapult","labels_url":"https://api.github.com/repos/catapult-project/catapult/issues/2190/labels{/name}","comments_url":"https://api.github.com/repos/catapult-project/catapult/issues/2190/comments","events_url":"https://api.github.com/repos/catapult-project/catapult/issues/2190/events","html_url":"https://github.com/catapult-project/catapult/issues/2190","id":144367007,"number":2190,"title":"Add findEvents/findEventsNamed helpers to model","user":{"login":"eakuefner","id":75990,"avatar_url":"https://avatars.githubusercontent.com/u/75990?v=3","gravatar_id":"","url":"https://api.github.com/users/eakuefner","html_url":"https://github.com/eakuefner","followers_url":"https://api.github.com/users/eakuefner/followers","following_url":"https://api.github.com/users/eakuefner/following{/other_user}","gists_url":"https://api.github.com/users/eakuefner/gists{/gist_id}","starred_url":"https://api.github.com/users/eakuefner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eakuefner/subscriptions","organizations_url":"https://api.github.com/users/eakuefner/orgs","repos_url":"https://api.github.com/users/eakuefner/repos","events_url":"https://api.github.com/users/eakuefner/events{/privacy}","received_events_url":"https://api.github.com/users/eakuefner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/catapult-project/catapult/labels/Trace%20Model","name":"Trace Model","color":"fef2c0"}],"state":"open","locked":false,"assignee":{"login":"eakuefner","id":75990,"avatar_url":"https://avatars.githubusercontent.com/u/75990?v=3","gravatar_id":"","url":"https://api.github.com/users/eakuefner","html_url":"https://github.com/eakuefner","followers_url":"https://api.github.com/users/eakuefner/followers","following_url":"https://api.github.com/users/eakuefner/following{/other_user}","gists_url":"https://api.github.com/users/eakuefner/gists{/gist_id}","starred_url":"https://api.github.com/users/eakuefner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eakuefner/subscriptions","organizations_url":"https://api.github.com/users/eakuefner/orgs","repos_url":"https://api.github.com/users/eakuefner/repos","events_url":"https://api.github.com/users/eakuefner/events{/privacy}","received_events_url":"https://api.github.com/users/eakuefner/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/catapult-project/catapult/milestones/6","html_url":"https://github.com/catapult-project/catapult/milestones/M51","labels_url":"https://api.github.com/repos/catapult-project/catapult/milestones/6/labels","id":1343034,"number":6,"title":"M51","description":"","creator":{"login":"natduca","id":412396,"avatar_url":"https://avatars.githubusercontent.com/u/412396?v=3","gravatar_id":"","url":"https://api.github.com/users/natduca","html_url":"https://github.com/natduca","followers_url":"https://api.github.com/users/natduca/followers","following_url":"https://api.github.com/users/natduca/following{/other_user}","gists_url":"https://api.github.com/users/natduca/gists{/gist_id}","starred_url":"https://api.github.com/users/natduca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natduca/subscriptions","organizations_url":"https://api.github.com/users/natduca/orgs","repos_url":"https://api.github.com/users/natduca/repos","events_url":"https://api.github.com/users/natduca/events{/privacy}","received_events_url":"https://api.github.com/users/natduca/received_events","type":"User","site_admin":false},"open_issues":58,"closed_issues":25,"state":"open","created_at":"2015-10-07T16:07:09Z","updated_at":"2016-03-29T19:44:49Z","due_on":"2016-04-08T04:00:00Z","closed_at":null},"comments":0,"created_at":"2016-03-29T19:44:49Z","updated_at":"2016-03-29T19:44:49Z","closed_at":null,"body":"When writing metrics, one often wants only to iterate on events matching a predicate, or named a certain way. There's also the issue that frequently we want only to match the topmost slice that matches a predicate, so these helpers should have a strategy that avoids descending into children once a match has been found.\r\n\r\nThis work entails two parts:\r\n\r\n1. Add `eventPredicate` to all implementations `iterateAllEventsInThisContainer` and plumb it through to `iterateAllEvents` in `EventContainer`.\r\n2. Add `findEvents` and `findEventsNamed`.\r\n\r\n@natduca @fmeawad "}}