{"action":"opened","number":1087,"pull_request":{"url":"https://api.github.com/repos/monicahq/monica/pulls/1087","id":178745073,"html_url":"https://github.com/monicahq/monica/pull/1087","diff_url":"https://github.com/monicahq/monica/pull/1087.diff","patch_url":"https://github.com/monicahq/monica/pull/1087.patch","issue_url":"https://api.github.com/repos/monicahq/monica/issues/1087","number":1087,"state":"open","locked":false,"title":"[wip]  Set journal entry from activities based on when they happened","user":{"login":"rolisz","id":426313,"avatar_url":"https://avatars0.githubusercontent.com/u/426313?v=4","gravatar_id":"","url":"https://api.github.com/users/rolisz","html_url":"https://github.com/rolisz","followers_url":"https://api.github.com/users/rolisz/followers","following_url":"https://api.github.com/users/rolisz/following{/other_user}","gists_url":"https://api.github.com/users/rolisz/gists{/gist_id}","starred_url":"https://api.github.com/users/rolisz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolisz/subscriptions","organizations_url":"https://api.github.com/users/rolisz/orgs","repos_url":"https://api.github.com/users/rolisz/repos","events_url":"https://api.github.com/users/rolisz/events{/privacy}","received_events_url":"https://api.github.com/users/rolisz/received_events","type":"User","site_admin":false},"body":"As per #982, the journal entries should be order by when the activities happened, not when they were added.\r\n\r\nThis is my first contribution to Monica and my first time working with PHP in a long time, so there might be better ways to do this and I'm open to suggestions.\r\n\r\n### Checklist\r\n\r\n#### Before submitting the PR\r\n- [ ] Read the [CONTRIBUTING document](https://github.com/monicahq/monica/blob/master/CONTRIBUTING.md) before submitting your PR.\r\n- [ ] If the PR is related to an issue or fix one, don't forget to indicate it.\r\n- [ ] Make sure that the change you propose is the smallest possible.\r\n- [ ] Screenshots are included if the PR changes the UI.\r\n- [ ] If you change the UI, make sure the user experience is consistent with the current interface.\r\n\r\n#### Code-related tasks\r\n- [ ] Tests added for this feature/bug.\r\n- [ ] Impact on the seeders.\r\n- [ ] Impact on the API.\r\n\r\n#### If the code changes the SQL schema\r\n- [ ] Impact on account export.\r\n- [ ] Impact on importing data with `vCard` and `.csv` files.\r\n- [ ] Impact on account reset and deletion.\r\n\r\n#### Other tasks\r\n- [ ] [CHANGELOG](https://github.com/monicahq/monica/blob/master/CHANGELOG) entry added, if necessary, under `UNRELEASED`.\r\n- [ ] [CONTRIBUTORS](https://github.com/monicahq/monica/blob/master/CONTRIBUTORS) entry added, if necessary.\r\n- [ ] If it's relevant, add the documentation about your feature in the README file.\r\n- [ ] Indicate `[wip]` in the title of the PR it is is not final yet. Remove `[wip]` when ready. Otherwise the PR will be considered complete and rejected if it's not working.\r\n","created_at":"2018-04-01T20:03:38Z","updated_at":"2018-04-01T20:03:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/monicahq/monica/pulls/1087/commits","review_comments_url":"https://api.github.com/repos/monicahq/monica/pulls/1087/comments","review_comment_url":"https://api.github.com/repos/monicahq/monica/pulls/comments{/number}","comments_url":"https://api.github.com/repos/monicahq/monica/issues/1087/comments","statuses_url":"https://api.github.com/repos/monicahq/monica/statuses/d7e9b35b1e69f704a2c6b59111a8ff4834f38cc2","head":{"label":"rolisz:fix_journal_order","ref":"fix_journal_order","sha":"d7e9b35b1e69f704a2c6b59111a8ff4834f38cc2","user":{"login":"rolisz","id":426313,"avatar_url":"https://avatars0.githubusercontent.com/u/426313?v=4","gravatar_id":"","url":"https://api.github.com/users/rolisz","html_url":"https://github.com/rolisz","followers_url":"https://api.github.com/users/rolisz/followers","following_url":"https://api.github.com/users/rolisz/following{/other_user}","gists_url":"https://api.github.com/users/rolisz/gists{/gist_id}","starred_url":"https://api.github.com/users/rolisz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolisz/subscriptions","organizations_url":"https://api.github.com/users/rolisz/orgs","repos_url":"https://api.github.com/users/rolisz/repos","events_url":"https://api.github.com/users/rolisz/events{/privacy}","received_events_url":"https://api.github.com/users/rolisz/received_events","type":"User","site_admin":false},"repo":{"id":127558892,"name":"monica","full_name":"rolisz/monica","owner":{"login":"rolisz","id":426313,"avatar_url":"https://avatars0.githubusercontent.com/u/426313?v=4","gravatar_id":"","url":"https://api.github.com/users/rolisz","html_url":"https://github.com/rolisz","followers_url":"https://api.github.com/users/rolisz/followers","following_url":"https://api.github.com/users/rolisz/following{/other_user}","gists_url":"https://api.github.com/users/rolisz/gists{/gist_id}","starred_url":"https://api.github.com/users/rolisz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolisz/subscriptions","organizations_url":"https://api.github.com/users/rolisz/orgs","repos_url":"https://api.github.com/users/rolisz/repos","events_url":"https://api.github.com/users/rolisz/events{/privacy}","received_events_url":"https://api.github.com/users/rolisz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rolisz/monica","description":"Intuitive web application to remember everything about your friends and family.","fork":true,"url":"https://api.github.com/repos/rolisz/monica","forks_url":"https://api.github.com/repos/rolisz/monica/forks","keys_url":"https://api.github.com/repos/rolisz/monica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rolisz/monica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rolisz/monica/teams","hooks_url":"https://api.github.com/repos/rolisz/monica/hooks","issue_events_url":"https://api.github.com/repos/rolisz/monica/issues/events{/number}","events_url":"https://api.github.com/repos/rolisz/monica/events","assignees_url":"https://api.github.com/repos/rolisz/monica/assignees{/user}","branches_url":"https://api.github.com/repos/rolisz/monica/branches{/branch}","tags_url":"https://api.github.com/repos/rolisz/monica/tags","blobs_url":"https://api.github.com/repos/rolisz/monica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rolisz/monica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rolisz/monica/git/refs{/sha}","trees_url":"https://api.github.com/repos/rolisz/monica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rolisz/monica/statuses/{sha}","languages_url":"https://api.github.com/repos/rolisz/monica/languages","stargazers_url":"https://api.github.com/repos/rolisz/monica/stargazers","contributors_url":"https://api.github.com/repos/rolisz/monica/contributors","subscribers_url":"https://api.github.com/repos/rolisz/monica/subscribers","subscription_url":"https://api.github.com/repos/rolisz/monica/subscription","commits_url":"https://api.github.com/repos/rolisz/monica/commits{/sha}","git_commits_url":"https://api.github.com/repos/rolisz/monica/git/commits{/sha}","comments_url":"https://api.github.com/repos/rolisz/monica/comments{/number}","issue_comment_url":"https://api.github.com/repos/rolisz/monica/issues/comments{/number}","contents_url":"https://api.github.com/repos/rolisz/monica/contents/{+path}","compare_url":"https://api.github.com/repos/rolisz/monica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rolisz/monica/merges","archive_url":"https://api.github.com/repos/rolisz/monica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rolisz/monica/downloads","issues_url":"https://api.github.com/repos/rolisz/monica/issues{/number}","pulls_url":"https://api.github.com/repos/rolisz/monica/pulls{/number}","milestones_url":"https://api.github.com/repos/rolisz/monica/milestones{/number}","notifications_url":"https://api.github.com/repos/rolisz/monica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rolisz/monica/labels{/name}","releases_url":"https://api.github.com/repos/rolisz/monica/releases{/id}","deployments_url":"https://api.github.com/repos/rolisz/monica/deployments","created_at":"2018-03-31T18:16:58Z","updated_at":"2018-03-31T18:17:01Z","pushed_at":"2018-04-01T20:01:43Z","git_url":"git://github.com/rolisz/monica.git","ssh_url":"git@github.com:rolisz/monica.git","clone_url":"https://github.com/rolisz/monica.git","svn_url":"https://github.com/rolisz/monica","homepage":"https://monicahq.com","size":43243,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"monicahq:master","ref":"master","sha":"e009e4026f8b4a74bfc99416ff65bf7ba2395d11","user":{"login":"monicahq","id":25832602,"avatar_url":"https://avatars3.githubusercontent.com/u/25832602?v=4","gravatar_id":"","url":"https://api.github.com/users/monicahq","html_url":"https://github.com/monicahq","followers_url":"https://api.github.com/users/monicahq/followers","following_url":"https://api.github.com/users/monicahq/following{/other_user}","gists_url":"https://api.github.com/users/monicahq/gists{/gist_id}","starred_url":"https://api.github.com/users/monicahq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monicahq/subscriptions","organizations_url":"https://api.github.com/users/monicahq/orgs","repos_url":"https://api.github.com/users/monicahq/repos","events_url":"https://api.github.com/users/monicahq/events{/privacy}","received_events_url":"https://api.github.com/users/monicahq/received_events","type":"Organization","site_admin":false},"repo":{"id":82238168,"name":"monica","full_name":"monicahq/monica","owner":{"login":"monicahq","id":25832602,"avatar_url":"https://avatars3.githubusercontent.com/u/25832602?v=4","gravatar_id":"","url":"https://api.github.com/users/monicahq","html_url":"https://github.com/monicahq","followers_url":"https://api.github.com/users/monicahq/followers","following_url":"https://api.github.com/users/monicahq/following{/other_user}","gists_url":"https://api.github.com/users/monicahq/gists{/gist_id}","starred_url":"https://api.github.com/users/monicahq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monicahq/subscriptions","organizations_url":"https://api.github.com/users/monicahq/orgs","repos_url":"https://api.github.com/users/monicahq/repos","events_url":"https://api.github.com/users/monicahq/events{/privacy}","received_events_url":"https://api.github.com/users/monicahq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/monicahq/monica","description":"Intuitive web application to remember everything about your friends and family.","fork":false,"url":"https://api.github.com/repos/monicahq/monica","forks_url":"https://api.github.com/repos/monicahq/monica/forks","keys_url":"https://api.github.com/repos/monicahq/monica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/monicahq/monica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/monicahq/monica/teams","hooks_url":"https://api.github.com/repos/monicahq/monica/hooks","issue_events_url":"https://api.github.com/repos/monicahq/monica/issues/events{/number}","events_url":"https://api.github.com/repos/monicahq/monica/events","assignees_url":"https://api.github.com/repos/monicahq/monica/assignees{/user}","branches_url":"https://api.github.com/repos/monicahq/monica/branches{/branch}","tags_url":"https://api.github.com/repos/monicahq/monica/tags","blobs_url":"https://api.github.com/repos/monicahq/monica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/monicahq/monica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/monicahq/monica/git/refs{/sha}","trees_url":"https://api.github.com/repos/monicahq/monica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/monicahq/monica/statuses/{sha}","languages_url":"https://api.github.com/repos/monicahq/monica/languages","stargazers_url":"https://api.github.com/repos/monicahq/monica/stargazers","contributors_url":"https://api.github.com/repos/monicahq/monica/contributors","subscribers_url":"https://api.github.com/repos/monicahq/monica/subscribers","subscription_url":"https://api.github.com/repos/monicahq/monica/subscription","commits_url":"https://api.github.com/repos/monicahq/monica/commits{/sha}","git_commits_url":"https://api.github.com/repos/monicahq/monica/git/commits{/sha}","comments_url":"https://api.github.com/repos/monicahq/monica/comments{/number}","issue_comment_url":"https://api.github.com/repos/monicahq/monica/issues/comments{/number}","contents_url":"https://api.github.com/repos/monicahq/monica/contents/{+path}","compare_url":"https://api.github.com/repos/monicahq/monica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/monicahq/monica/merges","archive_url":"https://api.github.com/repos/monicahq/monica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/monicahq/monica/downloads","issues_url":"https://api.github.com/repos/monicahq/monica/issues{/number}","pulls_url":"https://api.github.com/repos/monicahq/monica/pulls{/number}","milestones_url":"https://api.github.com/repos/monicahq/monica/milestones{/number}","notifications_url":"https://api.github.com/repos/monicahq/monica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/monicahq/monica/labels{/name}","releases_url":"https://api.github.com/repos/monicahq/monica/releases{/id}","deployments_url":"https://api.github.com/repos/monicahq/monica/deployments","created_at":"2017-02-17T00:02:58Z","updated_at":"2018-04-01T19:55:20Z","pushed_at":"2018-04-01T19:57:34Z","git_url":"git://github.com/monicahq/monica.git","ssh_url":"git@github.com:monicahq/monica.git","clone_url":"https://github.com/monicahq/monica.git","svn_url":"https://github.com/monicahq/monica","homepage":"https://monicahq.com","size":44319,"stargazers_count":4239,"watchers_count":4239,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":481,"mirror_url":null,"archived":false,"open_issues_count":230,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":481,"open_issues":230,"watchers":4239,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/monicahq/monica/pulls/1087"},"html":{"href":"https://github.com/monicahq/monica/pull/1087"},"issue":{"href":"https://api.github.com/repos/monicahq/monica/issues/1087"},"comments":{"href":"https://api.github.com/repos/monicahq/monica/issues/1087/comments"},"review_comments":{"href":"https://api.github.com/repos/monicahq/monica/pulls/1087/comments"},"review_comment":{"href":"https://api.github.com/repos/monicahq/monica/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/monicahq/monica/pulls/1087/commits"},"statuses":{"href":"https://api.github.com/repos/monicahq/monica/statuses/d7e9b35b1e69f704a2c6b59111a8ff4834f38cc2"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":7,"deletions":3,"changed_files":4}}
{"actor":{"display_login":"rolisz"}}