trilium icon indicating copy to clipboard operation
trilium copied to clipboard

Relation Constraints

Open ColdAnkles opened this issue 4 years ago • 2 comments

When relating one note to another, you get a list of all possible notes that can be related.

If possible, add a statement for relation definitions constraints; for example:

#relation:isChildOf="promoted,inverse=hasChild,multi,constraints=person"

Attempting to fill out any isChildOf relation would only permit relating notes with the #person label.

ColdAnkles avatar Jun 02 '21 05:06 ColdAnkles

I could also use this. My use-case is I have a simple issue tracking system in Trilium, and there's a relation between issues and their states ("open", "done", "waiting", "cancelled"). The issues also have "blockedBy" relations (which links issues to other issues they depend on), and "hotlist" relations (which should only link to #hotlist notes).

agentydragon avatar Oct 09 '21 19:10 agentydragon

Yes, yes, and yes. Trilium is a powerful low-code database, the biggest lack of which imho is: Enumerations.

This would add enumerations in a very elegant way.

We can (and should) bikeshed how the constraint is specified, but any implementation is better that not having this.

geek-merlin avatar Mar 14 '23 21:03 geek-merlin

Trilium has entered maintenance mode. Future enhancements will be addressed in TrilumNext: https://github.com/TriliumNext/Notes/issues/125

meichthys avatar May 09 '24 03:05 meichthys