From 97ddd0982b3f02bae4d2c187ee4448093e0c9578 Mon Sep 17 00:00:00 2001 From: marvin78 Date: Fri, 24 Mar 2023 07:54:41 +0000 Subject: [PATCH] 98_todoist.pm: bugfix for titles as params git-svn-id: https://svn.fhem.de/fhem/trunk@27352 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/98_todoist.pm | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 9dc4cd920..172be56b3 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 98_todoist: title by params - feature: 72_FRITZBOX: IP/URL um reinen DNS (ohne Domain) erweitert - bugfix: 93_DbRep: fix Perl Warnings - bugfix: 72_FRITZBOX: Pruefung Attr FritzBoxIP um URL erweitert diff --git a/fhem/FHEM/98_todoist.pm b/fhem/FHEM/98_todoist.pm index 5f7835a66..addb1874f 100644 --- a/fhem/FHEM/98_todoist.pm +++ b/fhem/FHEM/98_todoist.pm @@ -17,7 +17,7 @@ eval "use Date::Parse;1" or $missingModule .= "Date::Parse "; ####################### # Global variables -my $version = "1.3.15"; +my $version = "1.3.17"; my $apiUrl = "https://api.todoist.com/sync/v9/"; my $srandUsed; @@ -399,7 +399,10 @@ sub todoist_UpdateTask($$$) { ## use task content elsif (@temp && $temp[0] =~ /title/i) { $title = encode_utf8($temp[1]); - $title = $h->{"title"} if ($h->{"title"}); + $taskId = $hash->{helper}{"TITLES"}{$title} if ($hash->{helper}{"TITLES"}); + } + elsif (defined($h->{"title"}) || defined($h->{"TITLE"}) || defined($h->{"Title"})) { + $title = $h->{"title"} if ($h->{"title"}); $title = $h->{"TITLE"} if ($h->{"TITLE"}); $title = $h->{"Title"} if ($h->{"Title"}); $taskId = $hash->{helper}{"TITLES"}{$title} if ($hash->{helper}{"TITLES"});