Skip to content

Button updateMetadata bindTarget should default to the active file, not the button file #342

@tim-barnes

Description

@tim-barnes

Please fill out these Check-boxes

  • I checked that the plugin is up to date
  • The issue persist with all other plugins and themes disabled

This Issue Occurs on

  • Windows
  • Linux
  • macOS
  • Android
  • iOS

Plugin Version

1.1.0

Describe the Issue

Run a 2 step button:

  1. Create a new file
  2. updateMetadata to add a new tag to the frontmatter

Steps to Reproduce

Example button (uses unique note creator core plugin) - similar behaviour with new note or templater:

label: New Example Note
hidden: false
tooltip: Create a new example note
id: newExampleTest
style: default
actions:
  - type: command
    command: zk-prefixer
  - type: updateMetadata
    bindTarget: tags
    evaluate: false
    value: "#example"

When run, the note containing the button gets the #example tag

Expected Behavior

The new note created at step 1 gets the updatedMetadata, ie the default bindTarget is the new file created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behavior caused by this plugin

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions