Open sanyam opened 1 day ago
Not without the use of some JavaScript.
E.g. you could create a code block with the language meta-bind-js-view
.
{status} as status
---
if (context.bound.status === "Backlog") {
return engine.markdown.create("button config 1 here");
} else if (context.bound.status === "InProgress") {
return engine.markdown.create("button config 1 here");
}
// and so on...
I was also about to ask for something similar for views. Will try the code snippet.
In my case, I'd like to show some text based on the state of a boolean property, i.e. if true show the text while if false don't show the text. I tried to modify the code like this:
{property} as bool
---
if (context.bound.bool === true) {
return engine.markdown.create(`VIEW[text]`);
}
but I'm not sure on how to properly modify it. An example of this in the advanced use cases would be neat!
Thank you very much i will do with js. But i meant the feature like this:
label: "In Progress"
hidden: !(status === "Backlog" OR status === "Blocked")
id: "status-to-inprogress"
style: primary
actions:
- type: updateMetadata
bindTarget: status
value: 'In Progress'
it will be more convenient for the cases like this to put condition in template. Or even more better (i don' know if it possible) inline like this
`BUTTON[status-to-inprogress, hidden: !(status === "Backlog" OR status === "Blocked") ]
No, this will not be supported in the foreseeable future.
ok. thank you. Your plugin are awesome.
Please fill out these Check-boxes
Is your Feature Request related to a Problem or Annoyance?
No response
Describe the Feature you'd like
Is it possible to somehow show/hide buttons depending on the current value one of the properties? I am trying to make something like the workflow in Jira. So, depending on the status of the current tasks, i want the some buttons with the possible next statuses are shown. Something like:
property status = Backlog -> the button "InProgress" is shown property status = InProgress -> the buttons "Backlog" and "Done" are shown and etc.
somekind of conditional show/hide for the button
Alternatives
No response
Additional Context
No response