{"action":"created","comment":{"url":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/comments/30061865","id":30061865,"diff_hunk":"@@ -993,14 +993,19 @@ function lookupByEmailHeaders(&$mailinfo, &$seen=false) {\n                 //Lookup by ticket number\n                 && ($ticket = Ticket::lookupByNumber($match[1]))\n                 //Lookup the user using the email address\n-                && ($user = User::lookup(array('emails__address' => $mailinfo['email'])))) {\n+                && ($user = User::lookup(array('emails__address' => $mailinfo['email'])))\n+                && ($staff = Staff::getIdByEmail($mailinfo['email']))) {","path":"include/class.thread.php","position":null,"original_position":6,"commit_id":"ed4c570672550930096e46ed30f713ef372ab365","original_commit_id":"78cea991e404be0b29a9065e646158c51e33abc9","user":{"login":"hawkhead99","id":1635142,"avatar_url":"https://avatars.githubusercontent.com/u/1635142?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkhead99","html_url":"https://github.com/hawkhead99","followers_url":"https://api.github.com/users/hawkhead99/followers","following_url":"https://api.github.com/users/hawkhead99/following{/other_user}","gists_url":"https://api.github.com/users/hawkhead99/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkhead99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkhead99/subscriptions","organizations_url":"https://api.github.com/users/hawkhead99/orgs","repos_url":"https://api.github.com/users/hawkhead99/repos","events_url":"https://api.github.com/users/hawkhead99/events{/privacy}","received_events_url":"https://api.github.com/users/hawkhead99/received_events","type":"User","site_admin":false},"body":"I just re-commited.  The new commit accounts for both scenarios (when the staff might have a user ID in the system and when they do not)","created_at":"2015-05-11T17:34:38Z","updated_at":"2015-05-11T17:34:38Z","html_url":"https://github.com/osTicket/osTicket-1.8/pull/2041#discussion_r30061865","pull_request_url":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2041","_links":{"self":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/comments/30061865"},"html":{"href":"https://github.com/osTicket/osTicket-1.8/pull/2041#discussion_r30061865"},"pull_request":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2041"}}},"pull_request":{"url":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2041","id":35131948,"html_url":"https://github.com/osTicket/osTicket-1.8/pull/2041","diff_url":"https://github.com/osTicket/osTicket-1.8/pull/2041.diff","patch_url":"https://github.com/osTicket/osTicket-1.8/pull/2041.patch","issue_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/2041","number":2041,"state":"open","locked":false,"title":"Fix for staff submitting ticket by email","user":{"login":"hawkhead99","id":1635142,"avatar_url":"https://avatars.githubusercontent.com/u/1635142?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkhead99","html_url":"https://github.com/hawkhead99","followers_url":"https://api.github.com/users/hawkhead99/followers","following_url":"https://api.github.com/users/hawkhead99/following{/other_user}","gists_url":"https://api.github.com/users/hawkhead99/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkhead99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkhead99/subscriptions","organizations_url":"https://api.github.com/users/hawkhead99/orgs","repos_url":"https://api.github.com/users/hawkhead99/repos","events_url":"https://api.github.com/users/hawkhead99/events{/privacy}","received_events_url":"https://api.github.com/users/hawkhead99/received_events","type":"User","site_admin":false},"body":"I noticed there is a bug when class.thread.php has to fall back to the ticket number in the subject line.  If the user is a staff member and they send a note to a ticket via email without including the existing thread (just the ticket number), it will create a new ticket because the fall back logic does not account for staff...  This fix would correct that\r\n\r\nTested locally","created_at":"2015-05-11T14:23:40Z","updated_at":"2015-05-11T17:34:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"848bfda02d378a335893acac5aa7c200b6fd08fd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2041/commits","review_comments_url":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2041/comments","review_comment_url":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/comments{/number}","comments_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/2041/comments","statuses_url":"https://api.github.com/repos/osTicket/osTicket-1.8/statuses/ed4c570672550930096e46ed30f713ef372ab365","head":{"label":"hawkhead99:patch-1","ref":"patch-1","sha":"ed4c570672550930096e46ed30f713ef372ab365","user":{"login":"hawkhead99","id":1635142,"avatar_url":"https://avatars.githubusercontent.com/u/1635142?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkhead99","html_url":"https://github.com/hawkhead99","followers_url":"https://api.github.com/users/hawkhead99/followers","following_url":"https://api.github.com/users/hawkhead99/following{/other_user}","gists_url":"https://api.github.com/users/hawkhead99/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkhead99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkhead99/subscriptions","organizations_url":"https://api.github.com/users/hawkhead99/orgs","repos_url":"https://api.github.com/users/hawkhead99/repos","events_url":"https://api.github.com/users/hawkhead99/events{/privacy}","received_events_url":"https://api.github.com/users/hawkhead99/received_events","type":"User","site_admin":false},"repo":{"id":35428237,"name":"osTicket-1.8","full_name":"hawkhead99/osTicket-1.8","owner":{"login":"hawkhead99","id":1635142,"avatar_url":"https://avatars.githubusercontent.com/u/1635142?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkhead99","html_url":"https://github.com/hawkhead99","followers_url":"https://api.github.com/users/hawkhead99/followers","following_url":"https://api.github.com/users/hawkhead99/following{/other_user}","gists_url":"https://api.github.com/users/hawkhead99/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkhead99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkhead99/subscriptions","organizations_url":"https://api.github.com/users/hawkhead99/orgs","repos_url":"https://api.github.com/users/hawkhead99/repos","events_url":"https://api.github.com/users/hawkhead99/events{/privacy}","received_events_url":"https://api.github.com/users/hawkhead99/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hawkhead99/osTicket-1.8","description":"The osTicket open source ticketing system official project repository, for versions 1.8 and later","fork":true,"url":"https://api.github.com/repos/hawkhead99/osTicket-1.8","forks_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/forks","keys_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/teams","hooks_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/hooks","issue_events_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/issues/events{/number}","events_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/events","assignees_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/assignees{/user}","branches_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/branches{/branch}","tags_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/tags","blobs_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/git/refs{/sha}","trees_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/statuses/{sha}","languages_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/languages","stargazers_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/stargazers","contributors_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/contributors","subscribers_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/subscribers","subscription_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/subscription","commits_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/commits{/sha}","git_commits_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/git/commits{/sha}","comments_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/comments{/number}","issue_comment_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/issues/comments{/number}","contents_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/contents/{+path}","compare_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/merges","archive_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/downloads","issues_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/issues{/number}","pulls_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/pulls{/number}","milestones_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/milestones{/number}","notifications_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/labels{/name}","releases_url":"https://api.github.com/repos/hawkhead99/osTicket-1.8/releases{/id}","created_at":"2015-05-11T14:15:06Z","updated_at":"2015-05-11T14:15:08Z","pushed_at":"2015-05-11T17:33:08Z","git_url":"git://github.com/hawkhead99/osTicket-1.8.git","ssh_url":"git@github.com:hawkhead99/osTicket-1.8.git","clone_url":"https://github.com/hawkhead99/osTicket-1.8.git","svn_url":"https://github.com/hawkhead99/osTicket-1.8","homepage":"osticket.com","size":31105,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"osTicket:develop","ref":"develop","sha":"df7c71c85e5a04975e9327982234146f54cb1bbd","user":{"login":"osTicket","id":371413,"avatar_url":"https://avatars.githubusercontent.com/u/371413?v=3","gravatar_id":"","url":"https://api.github.com/users/osTicket","html_url":"https://github.com/osTicket","followers_url":"https://api.github.com/users/osTicket/followers","following_url":"https://api.github.com/users/osTicket/following{/other_user}","gists_url":"https://api.github.com/users/osTicket/gists{/gist_id}","starred_url":"https://api.github.com/users/osTicket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osTicket/subscriptions","organizations_url":"https://api.github.com/users/osTicket/orgs","repos_url":"https://api.github.com/users/osTicket/repos","events_url":"https://api.github.com/users/osTicket/events{/privacy}","received_events_url":"https://api.github.com/users/osTicket/received_events","type":"Organization","site_admin":false},"repo":{"id":12063996,"name":"osTicket-1.8","full_name":"osTicket/osTicket-1.8","owner":{"login":"osTicket","id":371413,"avatar_url":"https://avatars.githubusercontent.com/u/371413?v=3","gravatar_id":"","url":"https://api.github.com/users/osTicket","html_url":"https://github.com/osTicket","followers_url":"https://api.github.com/users/osTicket/followers","following_url":"https://api.github.com/users/osTicket/following{/other_user}","gists_url":"https://api.github.com/users/osTicket/gists{/gist_id}","starred_url":"https://api.github.com/users/osTicket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osTicket/subscriptions","organizations_url":"https://api.github.com/users/osTicket/orgs","repos_url":"https://api.github.com/users/osTicket/repos","events_url":"https://api.github.com/users/osTicket/events{/privacy}","received_events_url":"https://api.github.com/users/osTicket/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/osTicket/osTicket-1.8","description":"The osTicket open source ticketing system official project repository, for versions 1.8 and later","fork":false,"url":"https://api.github.com/repos/osTicket/osTicket-1.8","forks_url":"https://api.github.com/repos/osTicket/osTicket-1.8/forks","keys_url":"https://api.github.com/repos/osTicket/osTicket-1.8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/osTicket/osTicket-1.8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/osTicket/osTicket-1.8/teams","hooks_url":"https://api.github.com/repos/osTicket/osTicket-1.8/hooks","issue_events_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/events{/number}","events_url":"https://api.github.com/repos/osTicket/osTicket-1.8/events","assignees_url":"https://api.github.com/repos/osTicket/osTicket-1.8/assignees{/user}","branches_url":"https://api.github.com/repos/osTicket/osTicket-1.8/branches{/branch}","tags_url":"https://api.github.com/repos/osTicket/osTicket-1.8/tags","blobs_url":"https://api.github.com/repos/osTicket/osTicket-1.8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/osTicket/osTicket-1.8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/osTicket/osTicket-1.8/git/refs{/sha}","trees_url":"https://api.github.com/repos/osTicket/osTicket-1.8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/osTicket/osTicket-1.8/statuses/{sha}","languages_url":"https://api.github.com/repos/osTicket/osTicket-1.8/languages","stargazers_url":"https://api.github.com/repos/osTicket/osTicket-1.8/stargazers","contributors_url":"https://api.github.com/repos/osTicket/osTicket-1.8/contributors","subscribers_url":"https://api.github.com/repos/osTicket/osTicket-1.8/subscribers","subscription_url":"https://api.github.com/repos/osTicket/osTicket-1.8/subscription","commits_url":"https://api.github.com/repos/osTicket/osTicket-1.8/commits{/sha}","git_commits_url":"https://api.github.com/repos/osTicket/osTicket-1.8/git/commits{/sha}","comments_url":"https://api.github.com/repos/osTicket/osTicket-1.8/comments{/number}","issue_comment_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/comments{/number}","contents_url":"https://api.github.com/repos/osTicket/osTicket-1.8/contents/{+path}","compare_url":"https://api.github.com/repos/osTicket/osTicket-1.8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/osTicket/osTicket-1.8/merges","archive_url":"https://api.github.com/repos/osTicket/osTicket-1.8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/osTicket/osTicket-1.8/downloads","issues_url":"https://api.github.com/repos/osTicket/osTicket-1.8/issues{/number}","pulls_url":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls{/number}","milestones_url":"https://api.github.com/repos/osTicket/osTicket-1.8/milestones{/number}","notifications_url":"https://api.github.com/repos/osTicket/osTicket-1.8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/osTicket/osTicket-1.8/labels{/name}","releases_url":"https://api.github.com/repos/osTicket/osTicket-1.8/releases{/id}","created_at":"2013-08-12T19:10:14Z","updated_at":"2015-05-09T00:57:13Z","pushed_at":"2015-05-11T17:33:10Z","git_url":"git://github.com/osTicket/osTicket-1.8.git","ssh_url":"git@github.com:osTicket/osTicket-1.8.git","clone_url":"https://github.com/osTicket/osTicket-1.8.git","svn_url":"https://github.com/osTicket/osTicket-1.8","homepage":"osticket.com","size":31105,"stargazers_count":345,"watchers_count":345,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":336,"mirror_url":null,"open_issues_count":748,"forks":336,"open_issues":748,"watchers":345,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2041"},"html":{"href":"https://github.com/osTicket/osTicket-1.8/pull/2041"},"issue":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/2041"},"comments":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/issues/2041/comments"},"review_comments":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2041/comments"},"review_comment":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/pulls/2041/commits"},"statuses":{"href":"https://api.github.com/repos/osTicket/osTicket-1.8/statuses/ed4c570672550930096e46ed30f713ef372ab365"}}}}