From 28d87861ccfafcc455d45b09fdac612e6ca458ec Mon Sep 17 00:00:00 2001 From: flight16 Date: Sat, 23 May 2015 15:19:48 +0900 Subject: [PATCH] Merged PR --- .../entries/044F3747A38546168B572C2E3F217FA2.doentry | 2 +- features/regression.feature | 9 +++++++++ jrnl/DayOneJournal.py | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry b/features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry index 2bb8e3c3..1ac26242 100644 --- a/features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry +++ b/features/data/journals/dayone.dayone/entries/044F3747A38546168B572C2E3F217FA2.doentry @@ -24,7 +24,7 @@ Tags work - play + PLaY Time Zone America/Los_Angeles diff --git a/features/regression.feature b/features/regression.feature index 102566b2..727f7c27 100644 --- a/features/regression.feature +++ b/features/regression.feature @@ -69,3 +69,12 @@ Feature: Zapped bugs should stay dead. 2014-04-24 09:00 Ran 6.2 miles today in 1:02:03. | I'm feeling sore because I forgot to stretch. """ + + Scenario: DayOne tag searching should work with tags containing a mixture of upper and lower case. + # https://github.com/maebert/jrnl/issues/354 + Given we use the config "dayone.yaml" + When we run "jrnl @plAy" + Then the output should contain + """ + 2013-05-17 11:39 This entry has tags! + """ diff --git a/jrnl/DayOneJournal.py b/jrnl/DayOneJournal.py index 8c5ea427..9e988f78 100644 --- a/jrnl/DayOneJournal.py +++ b/jrnl/DayOneJournal.py @@ -50,7 +50,7 @@ class DayOne(Journal.Journal): date = date + timezone.utcoffset(date, is_dst=False) entry = Entry.Entry(self, date, text=dict_entry['Entry Text'], starred=dict_entry["Starred"]) entry.uuid = dict_entry["UUID"] - entry._tags = [self.config['tagsymbols'][0] + tag for tag in dict_entry.get("Tags", [])] + entry._tags = [self.config['tagsymbols'][0] + tag.lower() for tag in dict_entry.get("Tags", [])] self.entries.append(entry) self.sort()