{"action":"created","comment":{"url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls/comments/44552547","id":44552547,"diff_hunk":"@@ -48,6 +57,27 @@ public static Double round(Double a) {\n         return Math.round(a * 100) / 100.0;\n     }\n \n+    public static void sendErrorEmail(String problemI18nKey, String counterName, Issue issue, String url) {\n+        ApplicationProperties applicationProperties = ComponentAccessor.getApplicationProperties();\n+        UserManager userManager = ComponentAccessor.getUserManager();\n+\n+        List<String> recipientKeys = new ArrayList<String>(Consts.NOTIFICATION_USER_KEYS);\n+        recipientKeys.add(issue.getProjectObject().getProjectLead().getKey());\n+        String issueUrl = applicationProperties.getString(APKeys.JIRA_BASEURL) + \"/browse/\" + issue.getKey();\n+\n+        for(String recipientKey : recipientKeys) {\n+            ApplicationUser recipient = userManager.getUserByKey(recipientKey);\n+            if (recipient == null)\n+                continue;\n+\n+            I18nHelper i18nHelper = ComponentAccessor.getI18nHelperFactory().getInstance(recipient);\n+            String problem = counterName == null ? i18nHelper.getText(problemI18nKey) : i18nHelper.getText(problemI18nKey, counterName);\n+            String body = i18nHelper.getText(\"ru.mail.jira.plugins.contentprojects.issue.functions.errorMailMessage\", problem, issueUrl, StringUtils.trimToEmpty(url));","path":"src/main/java/ru/mail/jira/plugins/contentprojects/issue/functions/AbstractFunctionFactory.java","position":48,"original_position":48,"commit_id":"52dd48208650d119980dcfdac52ba8cf5f4e7ab4","original_commit_id":"52dd48208650d119980dcfdac52ba8cf5f4e7ab4","user":{"login":"andreymolchanov","id":3244075,"avatar_url":"https://avatars.githubusercontent.com/u/3244075?v=3","gravatar_id":"","url":"https://api.github.com/users/andreymolchanov","html_url":"https://github.com/andreymolchanov","followers_url":"https://api.github.com/users/andreymolchanov/followers","following_url":"https://api.github.com/users/andreymolchanov/following{/other_user}","gists_url":"https://api.github.com/users/andreymolchanov/gists{/gist_id}","starred_url":"https://api.github.com/users/andreymolchanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreymolchanov/subscriptions","organizations_url":"https://api.github.com/users/andreymolchanov/orgs","repos_url":"https://api.github.com/users/andreymolchanov/repos","events_url":"https://api.github.com/users/andreymolchanov/events{/privacy}","received_events_url":"https://api.github.com/users/andreymolchanov/received_events","type":"User","site_admin":false},"body":"зачем ты делаешь trimToEmpty?","created_at":"2015-11-11T16:31:17Z","updated_at":"2015-11-11T16:31:17Z","html_url":"https://github.com/mailru/jira-plugins-contentprojects/pull/1#discussion_r44552547","pull_request_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls/comments/44552547"},"html":{"href":"https://github.com/mailru/jira-plugins-contentprojects/pull/1#discussion_r44552547"},"pull_request":{"href":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls/1","id":49245283,"html_url":"https://github.com/mailru/jira-plugins-contentprojects/pull/1","diff_url":"https://github.com/mailru/jira-plugins-contentprojects/pull/1.diff","patch_url":"https://github.com/mailru/jira-plugins-contentprojects/pull/1.patch","issue_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/issues/1","number":1,"state":"open","locked":false,"title":"Add apdate URL function and mail error notifications","user":{"login":"dariarostshina","id":13033838,"avatar_url":"https://avatars.githubusercontent.com/u/13033838?v=3","gravatar_id":"","url":"https://api.github.com/users/dariarostshina","html_url":"https://github.com/dariarostshina","followers_url":"https://api.github.com/users/dariarostshina/followers","following_url":"https://api.github.com/users/dariarostshina/following{/other_user}","gists_url":"https://api.github.com/users/dariarostshina/gists{/gist_id}","starred_url":"https://api.github.com/users/dariarostshina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dariarostshina/subscriptions","organizations_url":"https://api.github.com/users/dariarostshina/orgs","repos_url":"https://api.github.com/users/dariarostshina/repos","events_url":"https://api.github.com/users/dariarostshina/events{/privacy}","received_events_url":"https://api.github.com/users/dariarostshina/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-30T09:04:12Z","updated_at":"2015-11-11T16:31:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"873606cf660da63598d88e4dbd9fd0fd30c5abb5","assignee":{"login":"andreymolchanov","id":3244075,"avatar_url":"https://avatars.githubusercontent.com/u/3244075?v=3","gravatar_id":"","url":"https://api.github.com/users/andreymolchanov","html_url":"https://github.com/andreymolchanov","followers_url":"https://api.github.com/users/andreymolchanov/followers","following_url":"https://api.github.com/users/andreymolchanov/following{/other_user}","gists_url":"https://api.github.com/users/andreymolchanov/gists{/gist_id}","starred_url":"https://api.github.com/users/andreymolchanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreymolchanov/subscriptions","organizations_url":"https://api.github.com/users/andreymolchanov/orgs","repos_url":"https://api.github.com/users/andreymolchanov/repos","events_url":"https://api.github.com/users/andreymolchanov/events{/privacy}","received_events_url":"https://api.github.com/users/andreymolchanov/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls/1/commits","review_comments_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls/1/comments","review_comment_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/issues/1/comments","statuses_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/statuses/52dd48208650d119980dcfdac52ba8cf5f4e7ab4","head":{"label":"mailru:new-features","ref":"new-features","sha":"52dd48208650d119980dcfdac52ba8cf5f4e7ab4","user":{"login":"mailru","id":399923,"avatar_url":"https://avatars.githubusercontent.com/u/399923?v=3","gravatar_id":"","url":"https://api.github.com/users/mailru","html_url":"https://github.com/mailru","followers_url":"https://api.github.com/users/mailru/followers","following_url":"https://api.github.com/users/mailru/following{/other_user}","gists_url":"https://api.github.com/users/mailru/gists{/gist_id}","starred_url":"https://api.github.com/users/mailru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mailru/subscriptions","organizations_url":"https://api.github.com/users/mailru/orgs","repos_url":"https://api.github.com/users/mailru/repos","events_url":"https://api.github.com/users/mailru/events{/privacy}","received_events_url":"https://api.github.com/users/mailru/received_events","type":"Organization","site_admin":false},"repo":{"id":34399716,"name":"jira-plugins-contentprojects","full_name":"mailru/jira-plugins-contentprojects","owner":{"login":"mailru","id":399923,"avatar_url":"https://avatars.githubusercontent.com/u/399923?v=3","gravatar_id":"","url":"https://api.github.com/users/mailru","html_url":"https://github.com/mailru","followers_url":"https://api.github.com/users/mailru/followers","following_url":"https://api.github.com/users/mailru/following{/other_user}","gists_url":"https://api.github.com/users/mailru/gists{/gist_id}","starred_url":"https://api.github.com/users/mailru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mailru/subscriptions","organizations_url":"https://api.github.com/users/mailru/orgs","repos_url":"https://api.github.com/users/mailru/repos","events_url":"https://api.github.com/users/mailru/events{/privacy}","received_events_url":"https://api.github.com/users/mailru/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mailru/jira-plugins-contentprojects","description":"","fork":false,"url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects","forks_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/forks","keys_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/teams","hooks_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/hooks","issue_events_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/issues/events{/number}","events_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/events","assignees_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/assignees{/user}","branches_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/branches{/branch}","tags_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/tags","blobs_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/git/refs{/sha}","trees_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/statuses/{sha}","languages_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/languages","stargazers_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/stargazers","contributors_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/contributors","subscribers_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/subscribers","subscription_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/subscription","commits_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/commits{/sha}","git_commits_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/git/commits{/sha}","comments_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/comments{/number}","issue_comment_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/issues/comments{/number}","contents_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/contents/{+path}","compare_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/merges","archive_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/downloads","issues_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/issues{/number}","pulls_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls{/number}","milestones_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/milestones{/number}","notifications_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/labels{/name}","releases_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/releases{/id}","created_at":"2015-04-22T15:46:51Z","updated_at":"2015-09-03T16:07:42Z","pushed_at":"2015-11-05T14:16:45Z","git_url":"git://github.com/mailru/jira-plugins-contentprojects.git","ssh_url":"git@github.com:mailru/jira-plugins-contentprojects.git","clone_url":"https://github.com/mailru/jira-plugins-contentprojects.git","svn_url":"https://github.com/mailru/jira-plugins-contentprojects","homepage":null,"size":344,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"mailru:master","ref":"master","sha":"38f0229d8f6f5d064e32e4f41aa232d4e37bd1e0","user":{"login":"mailru","id":399923,"avatar_url":"https://avatars.githubusercontent.com/u/399923?v=3","gravatar_id":"","url":"https://api.github.com/users/mailru","html_url":"https://github.com/mailru","followers_url":"https://api.github.com/users/mailru/followers","following_url":"https://api.github.com/users/mailru/following{/other_user}","gists_url":"https://api.github.com/users/mailru/gists{/gist_id}","starred_url":"https://api.github.com/users/mailru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mailru/subscriptions","organizations_url":"https://api.github.com/users/mailru/orgs","repos_url":"https://api.github.com/users/mailru/repos","events_url":"https://api.github.com/users/mailru/events{/privacy}","received_events_url":"https://api.github.com/users/mailru/received_events","type":"Organization","site_admin":false},"repo":{"id":34399716,"name":"jira-plugins-contentprojects","full_name":"mailru/jira-plugins-contentprojects","owner":{"login":"mailru","id":399923,"avatar_url":"https://avatars.githubusercontent.com/u/399923?v=3","gravatar_id":"","url":"https://api.github.com/users/mailru","html_url":"https://github.com/mailru","followers_url":"https://api.github.com/users/mailru/followers","following_url":"https://api.github.com/users/mailru/following{/other_user}","gists_url":"https://api.github.com/users/mailru/gists{/gist_id}","starred_url":"https://api.github.com/users/mailru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mailru/subscriptions","organizations_url":"https://api.github.com/users/mailru/orgs","repos_url":"https://api.github.com/users/mailru/repos","events_url":"https://api.github.com/users/mailru/events{/privacy}","received_events_url":"https://api.github.com/users/mailru/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mailru/jira-plugins-contentprojects","description":"","fork":false,"url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects","forks_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/forks","keys_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/teams","hooks_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/hooks","issue_events_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/issues/events{/number}","events_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/events","assignees_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/assignees{/user}","branches_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/branches{/branch}","tags_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/tags","blobs_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/git/refs{/sha}","trees_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/statuses/{sha}","languages_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/languages","stargazers_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/stargazers","contributors_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/contributors","subscribers_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/subscribers","subscription_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/subscription","commits_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/commits{/sha}","git_commits_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/git/commits{/sha}","comments_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/comments{/number}","issue_comment_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/issues/comments{/number}","contents_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/contents/{+path}","compare_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/merges","archive_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/downloads","issues_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/issues{/number}","pulls_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls{/number}","milestones_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/milestones{/number}","notifications_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/labels{/name}","releases_url":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/releases{/id}","created_at":"2015-04-22T15:46:51Z","updated_at":"2015-09-03T16:07:42Z","pushed_at":"2015-11-05T14:16:45Z","git_url":"git://github.com/mailru/jira-plugins-contentprojects.git","ssh_url":"git@github.com:mailru/jira-plugins-contentprojects.git","clone_url":"https://github.com/mailru/jira-plugins-contentprojects.git","svn_url":"https://github.com/mailru/jira-plugins-contentprojects","homepage":null,"size":344,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls/1"},"html":{"href":"https://github.com/mailru/jira-plugins-contentprojects/pull/1"},"issue":{"href":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/issues/1"},"comments":{"href":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/mailru/jira-plugins-contentprojects/statuses/52dd48208650d119980dcfdac52ba8cf5f4e7ab4"}}}}