Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

[BUG] Holiday should be user specific, not environment variable specific  #107

@etagwerker

Description

@etagwerker

Before we start...:

  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I'm reporting the issue to the correct repository (for multi-repository projects)

Branch/Commit:

main branch.

Expected behavior:

A Noko user should not get an email notification if it is a local holiday in their current country.

Actual behavior:

A Noko user will get an email notification if it is a local holiday in their current country.

Steps to reproduce:

  1. Step 1: Wait for a holiday in your country
  2. Step 2: Don't log any time
  3. Step 3: Get an email notification

Context and environment:

The root cause is pretty straightforward:

pecas/app/models/user.rb

Lines 20 to 22 in 4843103

def self.holiday?
ENV["COUNTRY_CODE"] && Holidays.on(Date.today, ENV["COUNTRY_CODE"]).any?
end

I will abide by the code of conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issueGood to get started with your contributions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions