Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Email instance view can show inconsistent open stats #122

Copy link
Copy link

Description

@cjg89
Issue body actions

Describe the bug

Email instance views can occasionally show inconsistent open counts on a single page load, due to {{instance.initial_opens}} being re-evaluated each time it's called.

<strong class="lead font-weight-black">{{instance.initial_opens}}</strong>
</div>
<div class="col-4 d-flex flex-column justify-content-between">
<h4 class="font-weight-bold small text-uppercase">Open Rate</h4>
<strong class="lead font-weight-black text-info-aw">{{instance.open_rate}}%</strong>
</div>
</div>
<p class="small pt-3 mb-3">Of the <strong>{{instance.recipient_details.count}}</strong> recipients, <strong >{{instance.initial_opens}}</strong> opened the email. An open rate of <strong>{{instance.open_rate}}%</strong>.</p>

{{instance.click_recipient_count}} likely has the same issue.

Steps to Reproduce

  1. Open an instance view of an email that's recently sent to a lot of people
  2. Refresh until something like this happens
    Screen Shot 2021-08-23 at 4 45 39 PM

Expected Behavior

Stats like this should be consistent wherever they're printed on the page.

Possible Fix

Look into caching/storing property values like this to prevent them from being looked up multiple times on load. lru caching, custom template variables, {% with %} usage could be worth looking into

Your environment:

n/a

Additional context

n/a

Reactions are currently unavailable

Metadata

Metadata

Labels

bugA problem with existing functionalityA problem with existing functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.