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

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

Open
3 tasks done
etagwerker opened this issue Jun 3, 2022 · 0 comments
Open
3 tasks done
Labels
bug good first issue Good to get started with your contributions

Comments

@etagwerker
Copy link
Member

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

@etagwerker etagwerker added bug good first issue Good to get started with your contributions labels Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug good first issue Good to get started with your contributions
Projects
None yet
Development

No branches or pull requests

1 participant