obsidian-task-archiver icon indicating copy to clipboard operation
obsidian-task-archiver copied to clipboard

MetadataService additionalMetadataBeforeArchiving is overriden by rules

Open atagulalan opened this issue 9 months ago • 0 comments

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

atagulalan avatar Oct 18 '23 12:10 atagulalan