mirror of
https://github.com/zadam/trilium.git
synced 2025-02-24 15:05:31 +08:00
#run should respect inheritance, fixes #3669
This commit is contained in:
parent
540d19c67c
commit
62c2547557
2 changed files with 3 additions and 18 deletions
|
@ -38,7 +38,7 @@ function run(req) {
|
|||
}
|
||||
|
||||
function getBundlesWithLabel(label, value) {
|
||||
const notes = attributeService.getNotesWithLabelFast(label, value);
|
||||
const notes = attributeService.getNotesWithLabel(label, value);
|
||||
|
||||
const bundles = [];
|
||||
|
||||
|
|
|
@ -3,8 +3,7 @@ const cls = require('./cls');
|
|||
const sqlInit = require('./sql_init');
|
||||
const config = require('./config');
|
||||
const log = require('./log');
|
||||
const sql = require("./sql");
|
||||
const becca = require("../becca/becca");
|
||||
const attributeService = require("../services/attributes");
|
||||
const protectedSessionService = require("../services/protected_session");
|
||||
const hiddenSubtreeService = require("./hidden_subtree");
|
||||
|
||||
|
@ -20,23 +19,9 @@ function getRunAtHours(note) {
|
|||
}
|
||||
|
||||
function runNotesWithLabel(runAttrValue) {
|
||||
// TODO: should be refactored into becca search
|
||||
const noteIds = sql.getColumn(`
|
||||
SELECT notes.noteId
|
||||
FROM notes
|
||||
JOIN attributes ON attributes.noteId = notes.noteId
|
||||
AND attributes.isDeleted = 0
|
||||
AND attributes.type = 'label'
|
||||
AND attributes.name = 'run'
|
||||
AND attributes.value = ?
|
||||
WHERE
|
||||
notes.type = 'code'
|
||||
AND notes.isDeleted = 0`, [runAttrValue]);
|
||||
|
||||
const notes = becca.getNotes(noteIds);
|
||||
|
||||
const instanceName = config.General ? config.General.instanceName : null;
|
||||
const currentHours = new Date().getHours();
|
||||
const notes = attributeService.getNotesWithLabel('run', runAttrValue);
|
||||
|
||||
for (const note of notes) {
|
||||
const runOnInstances = note.getLabelValues('runOnInstance');
|
||||
|
|
Loading…
Reference in a new issue