{"action":"created","comment":{"url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls/comments/114309634","pull_request_review_id":35763617,"id":114309634,"diff_hunk":"@@ -443,4 +457,66 @@ private void notificarHomologacao(AcaoExtensao acaoExtensao) {\n \t\tenviarEmail(emailCoordenador);\n \t}\n \n+\t/**\n+\t * Envia um e-mail informando ao parecerista/relator \n+\t * que o prazo para emissão do parecer se encerra em um dia.\n+\t */\n+\t@Override\n+\tpublic void notificarPareceristaRelatorPrazo(Date dataHoje) {\n+\t\tdataHoje = formataData(dataHoje);\n+\t\tList<AcaoExtensao> acoesAguardandoParecer =\n+\t\t\t\tacaoRepository.findByStatusAndParecerTecnico_prazo(Status.AGUARDANDO_PARECER_TECNICO, dataHoje);\n+\t\tacoesAguardandoParecer.addAll(\n+\t\t\t\tacaoRepository.findByStatusAndParecerRelator_prazo(Status.AGUARDANDO_PARECER_RELATOR, dataHoje));\n+\t\t\n+\t\tif (!acoesAguardandoParecer.isEmpty()) {\n+\t\t\tMimeMessage mimeMessage;\n+\t\t\tMimeMessageHelper mensagem;\n+\t\t\tString destinatario = null;\n+\t\t\tString assuntoEmail = null;\n+\t\t\tString texto = null;\n+\t\t\tfor (AcaoExtensao acao : acoesAguardandoParecer) {\n+\t\t\t\tmimeMessage = mailSender.createMimeMessage();\n+\t\t\t\tmensagem = new MimeMessageHelper(mimeMessage, \"UTF-8\");\n+\t\t\t\t\n+\t\t\t\t// Set destinatario\n+\t\t\t\tif (acao.getStatus().equals(Status.AGUARDANDO_PARECER_TECNICO)) {\n+\t\t\t\t\tdestinatario = acao.getParecerTecnico().getResponsavel().getEmail();\n+\t\t\t\t} else {\n+\t\t\t\t\tdestinatario = acao.getParecerRelator().getResponsavel().getEmail();\n+\t\t\t\t}\n+\t\t\t\t\n+\t\t\t\t// Set assunto do email\n+\t\t\t\tassuntoEmail = ASSUNTO_EMAIL.replaceAll(EMAIL_TITULO_ACAO, acao.getTitulo());\n+\t\t\t\t\n+\t\t\t\t// Set corpo do email\n+\t\t\t\ttexto = EMAIL_PARECERISTA_PRAZO.replaceAll(EMAIL_PRAZO,\n+\t\t\t\t\t\tformatDate(Status.AGUARDANDO_PARECER_TECNICO.equals(acao.getStatus()) ? \n+\t\t\t\t\t\t\t\tacao.getParecerTecnico().getPrazo() :\n+\t\t\t\t\t\t\t\t\tacao.getParecerRelator().getPrazo()));\n+\t\t\t\t\n+\t\t\t\ttry {\n+\t\t\t\t\tmensagem.setTo(destinatario);\n+\t\t\t\t\tmensagem.setFrom(EMAIL_REMETENTE);\n+\t\t\t\t\tmensagem.setSubject(assuntoEmail);\n+\t\t\t\t\tmensagem.setText(texto, true);\n+\t\t\t\t} catch (MessagingException e) {\n+\t\t\t\t\te.printStackTrace();","path":"aplicacao/gpa-extensao/src/main/java/ufc/quixada/npi/gpa/service/impl/EmailServiceImpl.java","position":115,"original_position":115,"commit_id":"96c9934b300c2821e8a29332a7a3e7437929544e","original_commit_id":"96c9934b300c2821e8a29332a7a3e7437929544e","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars2.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Avoid printStackTrace(); use a logger call instead.](https://www.codacy.com/app/NPI-UFC/gpa-extensao/pullRequest?prid=631611)","created_at":"2017-05-02T12:48:29Z","updated_at":"2017-05-02T12:48:29Z","html_url":"https://github.com/npi-ufc-qxd/gpa-extensao/pull/204#discussion_r114309634","pull_request_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls/204","_links":{"self":{"href":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls/comments/114309634"},"html":{"href":"https://github.com/npi-ufc-qxd/gpa-extensao/pull/204#discussion_r114309634"},"pull_request":{"href":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls/204"}}},"pull_request":{"url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls/204","id":118540458,"html_url":"https://github.com/npi-ufc-qxd/gpa-extensao/pull/204","diff_url":"https://github.com/npi-ufc-qxd/gpa-extensao/pull/204.diff","patch_url":"https://github.com/npi-ufc-qxd/gpa-extensao/pull/204.patch","issue_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/issues/204","number":204,"state":"open","locked":false,"title":"#183 enviar email de notificacao do parecer","user":{"login":"gustavoaires","id":9198150,"avatar_url":"https://avatars2.githubusercontent.com/u/9198150?v=3","gravatar_id":"","url":"https://api.github.com/users/gustavoaires","html_url":"https://github.com/gustavoaires","followers_url":"https://api.github.com/users/gustavoaires/followers","following_url":"https://api.github.com/users/gustavoaires/following{/other_user}","gists_url":"https://api.github.com/users/gustavoaires/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavoaires/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavoaires/subscriptions","organizations_url":"https://api.github.com/users/gustavoaires/orgs","repos_url":"https://api.github.com/users/gustavoaires/repos","events_url":"https://api.github.com/users/gustavoaires/events{/privacy}","received_events_url":"https://api.github.com/users/gustavoaires/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-05-02T12:02:11Z","updated_at":"2017-05-02T12:48:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b76045cdbbcc0cb46c12f3021952a2c65eae77b3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls/204/commits","review_comments_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls/204/comments","review_comment_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls/comments{/number}","comments_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/issues/204/comments","statuses_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/statuses/96c9934b300c2821e8a29332a7a3e7437929544e","head":{"label":"npi-ufc-qxd:#183_enviar_email_de_notificacao_do_parecer","ref":"#183_enviar_email_de_notificacao_do_parecer","sha":"96c9934b300c2821e8a29332a7a3e7437929544e","user":{"login":"npi-ufc-qxd","id":6740262,"avatar_url":"https://avatars2.githubusercontent.com/u/6740262?v=3","gravatar_id":"","url":"https://api.github.com/users/npi-ufc-qxd","html_url":"https://github.com/npi-ufc-qxd","followers_url":"https://api.github.com/users/npi-ufc-qxd/followers","following_url":"https://api.github.com/users/npi-ufc-qxd/following{/other_user}","gists_url":"https://api.github.com/users/npi-ufc-qxd/gists{/gist_id}","starred_url":"https://api.github.com/users/npi-ufc-qxd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npi-ufc-qxd/subscriptions","organizations_url":"https://api.github.com/users/npi-ufc-qxd/orgs","repos_url":"https://api.github.com/users/npi-ufc-qxd/repos","events_url":"https://api.github.com/users/npi-ufc-qxd/events{/privacy}","received_events_url":"https://api.github.com/users/npi-ufc-qxd/received_events","type":"Organization","site_admin":false},"repo":{"id":56873258,"name":"gpa-extensao","full_name":"npi-ufc-qxd/gpa-extensao","owner":{"login":"npi-ufc-qxd","id":6740262,"avatar_url":"https://avatars2.githubusercontent.com/u/6740262?v=3","gravatar_id":"","url":"https://api.github.com/users/npi-ufc-qxd","html_url":"https://github.com/npi-ufc-qxd","followers_url":"https://api.github.com/users/npi-ufc-qxd/followers","following_url":"https://api.github.com/users/npi-ufc-qxd/following{/other_user}","gists_url":"https://api.github.com/users/npi-ufc-qxd/gists{/gist_id}","starred_url":"https://api.github.com/users/npi-ufc-qxd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npi-ufc-qxd/subscriptions","organizations_url":"https://api.github.com/users/npi-ufc-qxd/orgs","repos_url":"https://api.github.com/users/npi-ufc-qxd/repos","events_url":"https://api.github.com/users/npi-ufc-qxd/events{/privacy}","received_events_url":"https://api.github.com/users/npi-ufc-qxd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/npi-ufc-qxd/gpa-extensao","description":"Sistema de Gestão de Ações de Extensão do Campus da UFC em Quixadá","fork":false,"url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao","forks_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/forks","keys_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/keys{/key_id}","collaborators_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/teams","hooks_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/hooks","issue_events_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/issues/events{/number}","events_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/events","assignees_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/assignees{/user}","branches_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/branches{/branch}","tags_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/tags","blobs_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/git/refs{/sha}","trees_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/git/trees{/sha}","statuses_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/statuses/{sha}","languages_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/languages","stargazers_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/stargazers","contributors_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/contributors","subscribers_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/subscribers","subscription_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/subscription","commits_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/commits{/sha}","git_commits_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/git/commits{/sha}","comments_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/comments{/number}","issue_comment_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/issues/comments{/number}","contents_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/contents/{+path}","compare_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/compare/{base}...{head}","merges_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/merges","archive_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/downloads","issues_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/issues{/number}","pulls_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls{/number}","milestones_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/milestones{/number}","notifications_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/labels{/name}","releases_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/releases{/id}","deployments_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/deployments","created_at":"2016-04-22T17:25:31Z","updated_at":"2017-04-03T14:01:10Z","pushed_at":"2017-05-02T12:48:14Z","git_url":"git://github.com/npi-ufc-qxd/gpa-extensao.git","ssh_url":"git@github.com:npi-ufc-qxd/gpa-extensao.git","clone_url":"https://github.com/npi-ufc-qxd/gpa-extensao.git","svn_url":"https://github.com/npi-ufc-qxd/gpa-extensao","homepage":null,"size":30108,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":17,"forks":1,"open_issues":17,"watchers":0,"default_branch":"master"}},"base":{"label":"npi-ufc-qxd:master","ref":"master","sha":"5ac95648de758243ee170a77e6a801df91f2207f","user":{"login":"npi-ufc-qxd","id":6740262,"avatar_url":"https://avatars2.githubusercontent.com/u/6740262?v=3","gravatar_id":"","url":"https://api.github.com/users/npi-ufc-qxd","html_url":"https://github.com/npi-ufc-qxd","followers_url":"https://api.github.com/users/npi-ufc-qxd/followers","following_url":"https://api.github.com/users/npi-ufc-qxd/following{/other_user}","gists_url":"https://api.github.com/users/npi-ufc-qxd/gists{/gist_id}","starred_url":"https://api.github.com/users/npi-ufc-qxd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npi-ufc-qxd/subscriptions","organizations_url":"https://api.github.com/users/npi-ufc-qxd/orgs","repos_url":"https://api.github.com/users/npi-ufc-qxd/repos","events_url":"https://api.github.com/users/npi-ufc-qxd/events{/privacy}","received_events_url":"https://api.github.com/users/npi-ufc-qxd/received_events","type":"Organization","site_admin":false},"repo":{"id":56873258,"name":"gpa-extensao","full_name":"npi-ufc-qxd/gpa-extensao","owner":{"login":"npi-ufc-qxd","id":6740262,"avatar_url":"https://avatars2.githubusercontent.com/u/6740262?v=3","gravatar_id":"","url":"https://api.github.com/users/npi-ufc-qxd","html_url":"https://github.com/npi-ufc-qxd","followers_url":"https://api.github.com/users/npi-ufc-qxd/followers","following_url":"https://api.github.com/users/npi-ufc-qxd/following{/other_user}","gists_url":"https://api.github.com/users/npi-ufc-qxd/gists{/gist_id}","starred_url":"https://api.github.com/users/npi-ufc-qxd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npi-ufc-qxd/subscriptions","organizations_url":"https://api.github.com/users/npi-ufc-qxd/orgs","repos_url":"https://api.github.com/users/npi-ufc-qxd/repos","events_url":"https://api.github.com/users/npi-ufc-qxd/events{/privacy}","received_events_url":"https://api.github.com/users/npi-ufc-qxd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/npi-ufc-qxd/gpa-extensao","description":"Sistema de Gestão de Ações de Extensão do Campus da UFC em Quixadá","fork":false,"url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao","forks_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/forks","keys_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/keys{/key_id}","collaborators_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/teams","hooks_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/hooks","issue_events_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/issues/events{/number}","events_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/events","assignees_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/assignees{/user}","branches_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/branches{/branch}","tags_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/tags","blobs_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/git/refs{/sha}","trees_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/git/trees{/sha}","statuses_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/statuses/{sha}","languages_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/languages","stargazers_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/stargazers","contributors_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/contributors","subscribers_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/subscribers","subscription_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/subscription","commits_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/commits{/sha}","git_commits_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/git/commits{/sha}","comments_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/comments{/number}","issue_comment_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/issues/comments{/number}","contents_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/contents/{+path}","compare_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/compare/{base}...{head}","merges_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/merges","archive_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/downloads","issues_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/issues{/number}","pulls_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls{/number}","milestones_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/milestones{/number}","notifications_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/labels{/name}","releases_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/releases{/id}","deployments_url":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/deployments","created_at":"2016-04-22T17:25:31Z","updated_at":"2017-04-03T14:01:10Z","pushed_at":"2017-05-02T12:48:14Z","git_url":"git://github.com/npi-ufc-qxd/gpa-extensao.git","ssh_url":"git@github.com:npi-ufc-qxd/gpa-extensao.git","clone_url":"https://github.com/npi-ufc-qxd/gpa-extensao.git","svn_url":"https://github.com/npi-ufc-qxd/gpa-extensao","homepage":null,"size":30108,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":17,"forks":1,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls/204"},"html":{"href":"https://github.com/npi-ufc-qxd/gpa-extensao/pull/204"},"issue":{"href":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/issues/204"},"comments":{"href":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/issues/204/comments"},"review_comments":{"href":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls/204/comments"},"review_comment":{"href":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/pulls/204/commits"},"statuses":{"href":"https://api.github.com/repos/npi-ufc-qxd/gpa-extensao/statuses/96c9934b300c2821e8a29332a7a3e7437929544e"}}}}
{"actor":{"display_login":"codacy-bot"}}