You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There are cases when the user needs to implement complex logic in the tasks, e.g. the user needs to take the starting data of a task and the ending date and make them into a duration span, check if the deadline is approaching soon, etc. All this requires writing code. However, despite we can use the DataView plugin to do something like:
functionprint_duration(location){constpage=dv.pages(location).first();constval1=newDate(page.Start);constval2=newDate(page.End);constval3=(val2-val1)/(1000*3600*24);dv.span(`Task B took ${val3}.`);}
in a dataviewjs block, we can only use that function inside that block. Thus, whenever we want to use that functionality, the whole block needs to be written.
Describe the solution you'd like
There should be a way to define a separate file where utility functions, written by the user can be added. Those functions should be importable from any task and reusable. This seems a lot like writing a plugin, but many users do not want to write a whole new plugin, we just need a few extra functions that we will have the freedom to implement for our particular usecase
Describe alternatives you've considered
I do not see any workaround, but living without this functionality.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
There are cases when the user needs to implement complex logic in the tasks, e.g. the user needs to take the starting data of a task and the ending date and make them into a duration span, check if the deadline is approaching soon, etc. All this requires writing code. However, despite we can use the
DataView
plugin to do something like:in a
dataviewjs
block, we can only use that function inside that block. Thus, whenever we want to use that functionality, the whole block needs to be written.Describe the solution you'd like
There should be a way to define a separate file where utility functions, written by the user can be added. Those functions should be importable from any task and reusable. This seems a lot like writing a plugin, but many users do not want to write a whole new plugin, we just need a few extra functions that we will have the freedom to implement for our particular usecase
Describe alternatives you've considered
I do not see any workaround, but living without this functionality.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: