creecros / MetaMagik

Custom Fields for Kanboard - Plugin MetaMagik
MIT License
98 stars 16 forks source link

Get metadata key and values #53

Closed amnan181 closed 4 years ago

amnan181 commented 4 years ago

how we can get metadata key and values?

creecros commented 4 years ago

from where are you looking? is there context you can provide? Are you looking for the table? What exactly is it you are trying to do?

the table name is: task_has_metadata name & value columns associated via task_id

amnan181 commented 4 years ago

Can you give me example how we can get data from task_has_metadata with task id?

TimoStahl commented 4 years ago

https://docs.kanboard.org/en/latest/plugins/metadata.html

amnan181 commented 4 years ago

I have check this but its giving undefined taskMetadataModel

amnan181 commented 4 years ago

I want to call this in task file where task code is showing

TimoStahl commented 4 years ago

Could you share your code?

amnan181 commented 4 years ago

I am calling this function in private_task file but its giving undefined. We cannot call this function in other files?

amnan181 commented 4 years ago

task

amnan181 commented 4 years ago

here is my code

creecros commented 4 years ago

From a template, you must use, $this->task->.... i.e. https://github.com/creecros/MetaMagik/blob/90a5d8152659af5827140099adf7189212880fad/Template/task/metasummary.php#L3

amnan181 commented 4 years ago

Thank you so much sir