Tuesday, March 17, 2026

How to Wire Actions and Tags to my Status Tags

See: https://www.perplexity.ai/search/in-previous-conversations-abou-SJtDoN8WQVyCi0_HHSh4Bw#1

 You “wire” Actions & Tags to your status tags by creating one action per status (or one toggle action) and assigning each a shortcut and/or menu label that operates on the selected items. Below is a concrete pattern you can drop into Zotero and adapt to your status: tags. github+1

One‑click “set status” actions (no scripting)

If you’re happy to replace the status manually (rather than via custom script), you can get very far with built‑in tag operations:

  1. Open Edit → Preferences → Actions & Tags.[github]

  2. Click + to add an action.

  3. Configure for “set to in‑progress” (example):

    • Event: None (you’ll run it manually).[github]

    • Operation: addTag.[github]

    • Data: status: in-progress (or any of your status tags).[github]

    • Menu label: Set status: in-progress.

    • Shortcut: choose something like Ctrl+Alt+2.

  4. Repeat for each status (status: unreviewed, status: analyzed, etc.).

This simply adds the status tag; if you want to ensure only one status is present at a time, use a script instead (next section).History+1

Scripted “make this the only status” action

To enforce “only one status: X at a time”, create one action per status using customScript that removes all other status: tags first.

  1. In Actions & Tags preferences, add a new action.[github]

  2. Set:

    • Event: None.

    • Operation: customScript.[github]

    • Menu label: Set status: in-progress.

    • Shortcut: e.g. Ctrl+Alt+2.

  3. Click the little icon to open the multiline editor for Data, and paste this script (adjust the targetStatus to match the action):

js
// Set a single status:* tag on all selected items const targetStatus = "status: in-progress"; if (item) { // Avoid running per-item; we'll handle the batch via `items` return; } if (!items || !items.length) { return; } for (let it of items) { // Remove all existing status:* tags let tags = it.getTags().map(t => t.tag); for (let tag of tags) { if (tag.startsWith("status: ")) { it.removeTag(tag); } } // Add the desired status it.addTag(targetStatus); await it.saveTx(); }
  1. Duplicate this action for each status value you use, changing only:

js
const targetStatus = "status: unreviewed"; // or "status: analyzed", "status: proof-ready", etc.

This pattern uses the items array provided by Actions & Tags so it works on multi‑selection and avoids double‑running on a single item, as recommended in the plugin docs.reddit+1

Scripted “cycle through statuses” toggle (optional)

If you’d like a single shortcut that cycles status for each selected item (e.g., unreviewed → in‑progress → analyzed → proof‑ready → back to unreviewed), use:

  1. New action:

    • Event: None.

    • Operation: customScript.

    • Menu label: Cycle status.

    • Shortcut: e.g. Ctrl+Alt+S.

  2. Script:

js
const statusOrder = [ "status: unreviewed", "status: in-progress", "status: analyzed", "status: proof-ready" ]; if (item) { return; } if (!items || !items.length) { return; } for (let it of items) { let tags = it.getTags().map(t => t.tag); // Find current status let currentIndex = -1; for (let i = 0; i < statusOrder.length; i++) { if (tags.includes(statusOrder[i])) { currentIndex = i; break; } } // Remove all status:* tags for (let tag of tags) { if (tag.startsWith("status: ")) { it.removeTag(tag); } } // Compute next status const nextIndex = (currentIndex + 1 + statusOrder.length) % statusOrder.length; const nextStatus = statusOrder[nextIndex]; it.addTag(nextStatus); await it.saveTx(); }

Pressing the shortcut repeatedly will walk the selected items through your status workflow.github+1

Using it in your genealogy log

Once wired:

  • You select a batch of census items for William H. Clark, hit Ctrl+Alt+2, and every item gets status: in-progress (and no other status).History+1

  • When finished analyzing, select them again, hit the shortcut for status: analyzed, and your saved search “Proof‑Ready Candidates” updates automatically.History+1

If you tell me your exact status tag list and preferred shortcuts, I can hand back ready‑to‑paste scripts for each action with those names baked in.

Follow-ups

 

No comments:

Post a Comment

05162026

  Here is a concise briefing on what has been happening on the Zotero forums in roughly the last two weeks, with a spotlight on items that c...