dgroup/lazylead

View on GitHub
lib/messages/illegal_duedate_change.erb

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html lang="en">
<head>
  <style>
    /* CSS styles taken from https://github.com/yegor256/tacit */
    th {
      font-weight: 600
    }

    table tr {
      border-bottom-width: 2.16px
    }

    table tr th {
      border-bottom-width: 2.16px
    }

    table tr td, table tr th {
      overflow: hidden;
      padding: 5.4px 3.6px
    }

    a {
      color: #275a90;
      text-decoration: none
    }

    a:hover {
      text-decoration: underline
    }

    pre, code, kbd, samp, var, output {
      font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
      font-size: 13px
    }

    pre code {
      background: none;
      border: 0;
      line-height: 29.7px;
      padding: 0
    }

    code, kbd {
      background: #daf1e0;
      border-radius: 3.6px;
      color: #2a6f3b;
      display: inline-block;
      line-height: 18px;
      padding: 3.6px 6.3px 2.7px
    }

    * {
      border: 0;
      border-collapse: separate;
      border-spacing: 0;
      box-sizing: border-box;
      margin: 0;
      max-width: 100%;
      padding: 0;
      vertical-align: baseline;
      font-family: system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
      font-size: 13px;
      font-stretch: normal;
      font-style: normal;
      font-weight: 400;
      line-height: 29.7px
    }

    html, body {
      width: 100%
    }

    html {
      height: 100%
    }

    body {
      background: #fff;
      color: #1a1919;
      padding: 36px
    }
  </style>
  <title>Not authorized "Assignee" change</title>
</head>
<body>
<p>Hi,</p>

<p>The <span style='font-weight:bold'>'Duedate'</span> for the following
  ticket(s) changed by not authorized person(s):</p>
<table summary="ticket(s) where duedate changed">
  <tr>
    <th id="key">Key</th>
    <th id="priority">Priority</th>
    <th id="when">When</th>
    <th id="who">Who</th>
    <th id="to">To</th>
    <th id="assignee">Assignee</th>
    <th id="reporter">Reporter</th>
    <th id="summary">Summary</th>
  </tr>
  <% dues.each do |d| %>
    <tr>
      <td><a href='<%= d.issue.url %>'><%= d.issue.key %></a></td>
      <td><%= d.issue.priority %></td>
      <td><%= d.when.to_date %></td>
      <td><span style='color: red'><%= d.last.name %></span> (<%= d.last.id %>)</td>
      <td><span style='color: red'><%= d.issue.duedate %></span></td>
      <td><%= d.issue.assignee.name %></td>
      <td><%= d.issue.reporter.name %></td>
      <td><%= d.issue.summary %></td>
    </tr>
  <% end %>
</table>

<p>Authorized person(s) are: <code><%= allowed %></code>.</p>

<p>Posted by
  <a href="https://github.com/dgroup/lazylead">lazylead v<%= version %></a>.
</p>
</body>
</html>