NotePlan / NotePlan/plugins

Task Sweeper is not moving instead of rescheduling tasks

Offen
#236 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@nmn arbeitet bereits daran.

Seit 28.6.2022.

Vorherrschende Sprache
JavaScript
Sterne
204
Forks
82
Ø Merge
22 Std. 27 Min.
Gemergte PRs (30 T.)
3

Beschreibung

Describe the bug
The sweepTask-command part of the Task Sweeper plugin is ignoring the moveType-setting of the command. If it is set for reschedule it still moving tasks from previous Calendar Notes tot he current note by deleting them from the old notes and adding them to the current note. While the expected behaviour would be to mark the tasks in the old notes as rescheduled to today instead.

To Reproduce
Steps to reproduce the behavior:

  1. Make sure you have multiple tasks on yesterday Calendar Note
  2. Go to Today's note
  3. Type /todayStart (while using the Journal template below)
  4. See the tasks being moved instead of reschduled

Expected behavior
Able to reschedule tasks and move to today's Calendar Note. By using [>]

Screenshots
None

System

  • Device: Mac
  • OS: macOS 12.2.1
  • NotePlan Version 3.4 (736)
  • Plugin Name & Version
    Daily Journal v0.11.4
    Task Automation v1.5.1
    Task Sweeper v1.4.3

Additional context
Used Daily Journal Template:

# Daily Note Template
---
## Journal

### Tasks
{{sweepTasks({limit:{ "unit": "day", "num": 7 }, includeHeadings: false, requireConfirmation: false, moveType: 'reschedule'})}}

### Today's Events
{{events({template:"- *|TITLE|* (*|START|*-*|END|*)", allday_template:"- *|TITLE|*", includeHeadings: false})}}

### Important
{{listMatchingEvents()}}

## Research Topics
- [ ] 16:00 - 17:30 Research monorepo #monorepo

### Media
> {{quote()}}

### Weather
 {{weather()}}

Plugin Console Log

JSLog: Executing function 'todayStart'
JSLog: for '2022-03-08'
JSLog: getJournalSettings():
JSLog: 	dailyJournal settings from V2: {
  "reviewSectionHeading": "Journal",
  "templateTitle": "Daily Note Template",
  "moods": "🤩 Great,🙂 Good,😇 Blessed,🥱 Tired,😫 Stressed,😤 Frustrated,😔 Low,🥵 Sick,Other",
  "reviewQuestions": "@work(<int>)\n@fruitveg(<int>)\nMood:: <mood>\nGratitude:: <string>Not Great:: <string>"
}
JSLog: applyNamedTemplate: for template 'Daily Note Template'
JSLog: processTemplate() found tag sweepTasks({limit:{ "unit": "day", "num": 7 }, includeHeadings: false, requireConfirmation: false, moveType: 'reschedule'})
JSLog: processTag(sweepTasks({limit:{ "unit": "day", "num": 7 }, includeHeadings: false, requireConfirmation: false, moveType: 'reschedule'})) param:{limit:{ "unit": "day", "num": 7 }, includeHeadings: false, requireConfirmation: false, moveType: 'reschedule'}
JSLog: execTagListFunction() Tag matched "sweepTasks"
JSLog: 	getTagParamsFromString for 'limit' in '{limit:{ "unit": "day", "num": 7 }, includeHeadings: false, requireConfirmation: false, moveType: 'reschedule'}'
JSLog: 	--> {"unit":"day","num":7}
JSLog: 	getTagParamsFromString for 'includeHeadings' in '{limit:{ "unit": "day", "num": 7 }, includeHeadings: false, requireConfirmation: false, moveType: 'reschedule'}'
JSLog: 	--> false
JSLog: 	getTagParamsFromString for 'requireConfirmation' in '{limit:{ "unit": "day", "num": 7 }, includeHeadings: false, requireConfirmation: false, moveType: 'reschedule'}'
JSLog: 	--> false
JSLog: 	getTagParamsFromString for 'noteTypes' in '{limit:{ "unit": "day", "num": 7 }, includeHeadings: false, requireConfirmation: false, moveType: 'reschedule'}'
JSLog: 	--> undefined
JSLog: 	getTagParamsFromString for 'ignoreFolders' in '{limit:{ "unit": "day", "num": 7 }, includeHeadings: false, requireConfirmation: false, moveType: 'reschedule'}'
JSLog: 	--> undefined
JSLog: 	getTagParamsFromString for 'overdueOnly' in '{limit:{ "unit": "day", "num": 7 }, includeHeadings: false, requireConfirmation: false, moveType: 'reschedule'}'
JSLog: 	--> undefined
JSLog: 	getTagParamsFromString for 'moveType' in '{limit:{ "unit": "day", "num": 7 }, includeHeadings: false, requireConfirmation: false, moveType: 'reschedule'}'
JSLog: 	--> "reschedule"
JSLog: Running template command sweepAll with params: limit={"unit":"day","num":7} includeHeadings=false noteTypes=["note","calendar"] ignoreFolders:["📋 Templates"]
JSLog: Starting sweepAll overdueOnly:false requireUserAction:false periodToCheck:{"unit":"day","num":7} noteTypes: ["note","calendar"] returnValue:true ignoreFolders: ["📋 Templates"]
JSLog: 	Project Notes to search: 3
JSLog: Skipping note "📋 Templates/Daily Note Template.md" due to ignoreFolders param: ["📋 Templates"]
JSLog: Starting sweepNote for file: "xxx/How can we XX How can we document the different gothas.md" paragraphs:1 overdueOnly:false
JSLog: Starting sweepNote for file: "xxx/UI → geolocation.md" paragraphs:5 overdueOnly:false
JSLog: Looking for calendar notes now...
JSLog: 	Calendar Notes to search: 5
JSLog: ===
sweepAll: Calling sweepNote 20220301.md | Today is: 20220308.md
JSLog: Starting sweepNote for file: "20220301.md" paragraphs:18 overdueOnly:false
JSLog: ===
sweepAll: Calling sweepNote 20220302.md | Today is: 20220308.md
JSLog: Starting sweepNote for file: "20220302.md" paragraphs:19 overdueOnly:false
JSLog: ===
sweepAll: Calling sweepNote 20220303.md | Today is: 20220308.md
JSLog: Starting sweepNote for file: "20220303.md" paragraphs:20 overdueOnly:false
JSLog: ===
sweepAll: Calling sweepNote 20220304.md | Today is: 20220308.md
JSLog: Starting sweepNote for file: "20220304.md" paragraphs:19 overdueOnly:false
JSLog: ===
sweepAll: Calling sweepNote 20220307.md | Today is: 20220308.md
JSLog: Starting sweepNote for file: "20220307.md" paragraphs:36 overdueOnly:false
JSLog: 	sweepNote: file:"20220307.md" overdueOnly=false openTasks=16 overdueParagraphs:0 numTasksToMove=16
JSLog: 	sweepNote: move-ing  24 paragraphs; 16 tasks
JSLog: Finished sweepAll
JSLog: ---- execTagListFunction(sweepTasks) RESULT="* [ ] Improve Opentelemetry tracing
* [ ] Fix `unsafe-eval` for regenerator Appstore 
* [ ] Update `@xxx/yyyy` to use `esbuild` or SWC for building 
* [ ] Update metrics usage to use latest Metrics  API (0.27) 
* [ ] Write documentation about managing *feature flags*   #important
* [ ] XXXX
		* [ ] YYYY
* [ ] Fix system tests
	* [ ] Create fetchAllPages function
	* [ ] Implement mail checker node client 
	* [ ] ZZZZ
	* [ ] ZZZZ
* [ ] Find out why merging a PR happens directly and not when the full pipeline is completed (include children) #monorepo 
* [ ] ZZZZ
* [ ] How to import existing repositories into the shiny new monorepo? #monorepo 
* [ ] 16:00 - 17:30 Research monorepo #monorep"

JSLog: processTemplate() found tag events({template:"- *|TITLE|* (*|START|*-*|END|*)", allday_template:"- *|TITLE|*", includeHeadings: false})
JSLog: processTag(events({template:"- *|TITLE|* (*|START|*-*|END|*)", allday_template:"- *|TITLE|*", includeHeadings: false})) param:{template:"- *|TITLE|* (*|START|*-*|END|*)", allday_template:"- *|TITLE|*", includeHeadings: false}
JSLog: execTagListFunction() Tag matched "events"
JSLog: listDaysEvents for 20220308 with paramString={template:"- *|TITLE|* (*|START|*-*|END|*)", allday_template:"- *|TITLE|*", includeHeadings: false}
JSLog: Start of getEventsSettings()
JSLog: 	events settings from V2: {
  "defaultEventDuration": 60,
  "calendarNameMappings": [
    "From;To"
  ],
  "addMatchingEvents": {
    "#webinar": "### *|TITLE|* (*|START|*)",
    "#meeting": "### *|TITLE|* (*|START|*)",
    "#holiday": "*|TITLE|*",
    "#important": "*|TITLE|* (important)"
  },
  "addEventID": true,
  "timeOptions": {
    "minute": "2-digit",
    "hour12": false,
    "hour": "2-digit"
  },
  "locale": "en-GB",
  "confirmEventCreation": false,
  "calendarToWriteTo": "mail@example.com",
  "removeTimeBlocksWhenProcessed": true,
  "eventsHeading": "### Events today",
  "calendarSet": [
    "mail@example.com"
  ],
  "processedTagName": "#event_created"
}
JSLog: 	getTagParamsFromString for 'template' in '{template:"- *|TITLE|* (*|START|*-*|END|*)", allday_template:"- *|TITLE|*", includeHeadings: false}'
JSLog: 	--> "- *|TITLE|* (*|START|*-*|END|*)"
JSLog: 	getTagParamsFromString for 'allday_template' in '{template:"- *|TITLE|* (*|START|*-*|END|*)", allday_template:"- *|TITLE|*", includeHeadings: false}'
JSLog: 	--> "- *|TITLE|*"
JSLog: 	getTagParamsFromString for 'includeHeadings' in '{template:"- *|TITLE|* (*|START|*-*|END|*)", allday_template:"- *|TITLE|*", includeHeadings: false}'
JSLog: 	--> false
JSLog: getEventsForDay: Tue Mar 08 2022 00:00:00 GMT+0000 (GMT) - Tue Mar 08 2022 23:59:59 GMT+0000 (GMT)
JSLog: 	retrieved 1 events from NP Calendar store
JSLog: 	1 Events kept after filtering with mail@example.com
JSLog: - Daily Stand Up (10:00-10:15)
JSLog: ---- execTagListFunction(events) RESULT="- Daily Stand Up (10:00-10:15)"

JSLog: processTemplate() found tag listMatchingEvents()
JSLog: processTag(listMatchingEvents()) param:
JSLog: execTagListFunction() Tag matched "listMatchingEvents"
JSLog: listMatchingDaysEvents for date 20220308:
JSLog: Start of getEventsSettings()
JSLog: 	events settings from V2: {
  "defaultEventDuration": 60,
  "calendarNameMappings": [
    "From;To"
  ],
  "addMatchingEvents": {
    "#webinar": "### *|TITLE|* (*|START|*)",
    "#meeting": "### *|TITLE|* (*|START|*)",
    "#holiday": "*|TITLE|*",
    "#important": "*|TITLE|* (important)"
  },
  "addEventID": true,
  "timeOptions": {
    "minute": "2-digit",
    "hour12": false,
    "hour": "2-digit"
  },
  "locale": "en-GB",
  "confirmEventCreation": false,
  "calendarToWriteTo": "mail@example.com",
  "removeTimeBlocksWhenProcessed": true,
  "eventsHeading": "### Events today",
  "calendarSet": [
    "mail@example.com"
  ],
  "processedTagName": "#event_created"
}
JSLog: 	From settings found 4 match strings to look for
JSLog: getEventsForDay: Tue Mar 08 2022 00:00:00 GMT+0000 (GMT) - Tue Mar 08 2022 23:59:59 GMT+0000 (GMT)
JSLog: 	retrieved 1 events from NP Calendar store
JSLog: 	1 Events kept after filtering with mail@example.com
JSLog: 
JSLog: ---- execTagListFunction(listMatchingEvents) RESULT=""

JSLog: processTemplate() found tag quote()
JSLog: processTag(quote()) param:
JSLog: execTagListFunction() Tag matched "quote"
JSLog: getDailyQuote() with :
JSLog: 	Config for 'quote': {"mode":"today","author":"aristotle","apiKey":"yyyy"}
JSLog: Before API call: https://zenquotes.io/api/today
JSLog: 	Humor isn't for everyone. It's only for people who want to have fun, enjoy life, and feel alive. - *Anne Wilson Schaef*
JSLog: ---- execTagListFunction(quote) RESULT="Humor isn't for everyone. It's only for people who want to have fun, enjoy life, and feel alive. - *Anne Wilson Schaef*"

JSLog: processTemplate() found tag weather()
JSLog: processTag(weather()) param:
JSLog: execTagListFunction() Tag matched "weather"
JSLog:     validateMinimumConfig: passed minimum validation spec
JSLog: 	Weather settings are {"openWeatherAPIKey":"xxxx","latPosition":51.51279,"longPosition":-0.09184,"openWeatherUnits":"metric"}
JSLog: 	getTagParamsFromString for 'template' in ''
JSLog: 	output template: 'Weather: |WEATHER_ICON| |DESCRIPTION| |LOW_TEMP||UNITS|-|HIGH_TEMP||UNITS|; Feels like: |FEELS_LIKE_LOW||UNITS|-|FEELS_LIKE_HIGH||UNITS|' ; about to call stringReplace
JSLog: ---- execTagListFunction(weather) RESULT="Weather: ☀️ Clear sky 2°C-10°C; Feels like: 6°C-7°C"

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.