•  
      request #9221 Add the project and tracker name to the email subject for truncated emails
    Infos
    #9221
    Nandan Giri (girin)
    2016-07-06 15:18
    2016-06-03 16:23
    9502
    Details
    Add the project and tracker name to the email subject for truncated emails
    Add the project and tracker name to the email subject for truncated emails. Also added the project name in the regular tracker email.

    Patched in /usr/share/tuleap/src/common/mail/MailBuilder.php arounf line 56

    private function buildEmail(Project $project, Notification $notification, MailEnhancer $mail_enhancer, $email) {
    $mail = $this->getMailSender();
    $mail->setFrom(ForgeConfig::get('sys_noreply'));
    $mail->setTo($email);

    if ($project->getTruncatedEmailsUsage()) {
    $presenter = new MailPresenter(
    $notification->getServiceName(),
    $notification->getGotoLink(),
    ForgeConfig::get('sys_fullname')
    );

    /* Replace this with the following with the 2 lines after . The mail_enhacer adds the token information for replies
    $mail->setSubject($this->renderer->renderToString(self::TRUNCATED_SUBJECT_TEMPLATE, $presenter));
    */

    $mail_enhancer->enhanceMail($mail); /* allows for replying to the tracker when active */
    $mail->setSubject($project->getPublicName() . ' - ' .$notification->getSubject()); /* Add the project and tracker name to the subject */
    $mail->setBodyHtml($this->renderer->renderToString(self::TRUNCATED_BODY_TEMPLATE, $presenter));
    } else {
    $mail_enhancer->enhanceMail($mail);

    if ($notification->hasHTMLBody()) {
    $mail->setBodyHtml($notification->getHTMLBody());
    }

    if ($notification->hasTextBody()) {
    $mail->setBodyText($notification->getTextBody());
    }

    /* Replaced with the following line to add the project name
    $mail->setSubject($notification->getSubject());
    */
    $mail->setSubject($project->getPublicName() . ' - ' .$notification->getSubject());
    }

    return $mail;
    }
    Trackers
    8.15
    CentOS 6
    • [x] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Acknowledged
    Empty
    Attachments
    Empty
    References
    References list is empty

    Follow-ups

    User avatar
    Nandan Giri (girin)2016-07-06 15:18
    We found that the truncated emails were ignored.
    The Project name and tracker name, in our operations did not really violate any confidential technical information that would have been inside of the tracker artifact itself.
    But iot helped people prioritize and filter things they need to look at. We have many projects in tuleap and when you receive multiple tuleap emails, you do not know if they are things that really require your involvement or not.
    User avatar
    Thomas Gerbet (tgerbet)2016-06-03 16:38
    Hi,

    Adding the project and tracker name to the truncated email can already be considered like an information leak. I'm not sure this is something you want to have when you use the truncated emails to protect your confidentiality.

    What do you try to achieve with this change?

    • Status changed from New to Acknowledged