-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
State: TriageIssues that need to be verifiedIssues that need to be verifiedUIIssues related to user-interface/front-endIssues related to user-interface/front-end
Description
Description
Steps to reproduce:
- Create a note and call it "Kanban Child"
- In "Kanban Child"
- In
Owned Attributesadd this label:#label:mycategory="promoted,alias=category,single,text" - In
Basic PropertiesenableTemplate
- In
- Create a note and call it "Change Color"
- In "Change Color"
- In
Basic PropertiessetNote typetoJS backend - Paste the following code to the note. This code will change a note's color to green if its category is set to "Health" and will remove the color if the category is set to anything else:
- In
api.runOnFrontend(function() {
const noteId = api.getActiveContextNote().noteId;
api.runOnBackend(function(frontendNoteId) {
const note = api.getNote(frontendNoteId);
const category = note.getLabelValue("mycategory");
if (category === "Health") {
note.setLabel("color", "green");
} else {
note.removeLabel("color");
}
}, [noteId]);
}, []);- In "Kanban Child"
- In
Owned Attributesadd a new relation- Name:
runOnAttributeChange - Target note:
Change Color - Click
Save & close
- Name:
- In
- Create a note and call it "My Kanban"
- In "My Kanban"
- In
Basic Properties- Note type:
Collection
- Note type:
- In
Collection Properties- View type:
Board
- View type:
- In
Owned Attributesadd a new relation- Name:
child:template - Target note:
Kanban Child
- Name:
- Add a column and call it "Todo"
- Add a new item in "Todo" and call it "Visit dentist"
- Click on "Visit dentist" to open
Quick edit - Set the
categoryfield value to "Health" and press Enter then close theQuick edit
- In
If you followed the steps above you will notice the "Visit dentist" note did not change its color to green. However, if you open "Visit dentist" in a new tab, new split, or new window and set the category value to "Health" and press Enter the note's color will change to green.
I suspect this is runOnAttributeChange not triggering in Quick edit.
TriliumNext Version
0.99.5
What operating system are you using?
Other Linux
What is your setup?
Local + server sync
Operating System Version
Arch Linux x86_64 (Linux 6.17.9-arch1-1)
Error logs
No errors showing up in the backend logs or the frontend console
dosubot
Metadata
Metadata
Assignees
Labels
State: TriageIssues that need to be verifiedIssues that need to be verifiedUIIssues related to user-interface/front-endIssues related to user-interface/front-end