ivan-lednev / obsidian-task-archiver

Archive completed tasks in your Obsidian vault (plus other org-mode-like features)
MIT License
116 stars 12 forks source link

MetadataService additionalMetadataBeforeArchiving is overriden by rules #67

Open atagulalan opened 1 year ago

atagulalan commented 1 year ago

MetadataService.ts has additionalMetadataBeforeArchiving object, but it is overridden by the rule parameter. These are the lines affecting:

https://github.com/ivan-lednev/obsidian-task-archiver/blob/a8146552ebdf897d115e1d8b1b95af89fdf3184b/src/services/MetadataService.ts#L17-L20

And as you can see from this image, dateFormat is overridden by default config.

image

Just by swapping the order, dateFormat would be gotten from the right field.

Steps to Reproduce:

  1. Enable "Append some metadata to task before archiving"
  2. Click "Configure variables"
  3. Change date format to "YYMMDD" or something more bizzare
  4. Call command "Archive tasks in this file"

Expected Behavior: Respect configured date format variable when adding metadata.

Actual Behavior: It gives output with date format "YYYY-MM-DD".

Additional Information: Archiver version is 0.26.1