Comments (5)
you will need to be a bit more detailed. are you creating and automatic action and don't understand how to pull the data? go step by step, what are you trying to accomplish.
from metamagik.
Thanks for the quick reply!
I would like to create an automatic action where task title is generated from metadata created via MetaMagik.
Here is my code, but it doesn't work mainly, because I don't know how to refer to metadata in getEventRequiredParameters:
`<?php
namespace Kanboard\Plugin\RenameTaskbyMetadata\Action;
use Kanboard\Model\TaskModel;
use Kanboard\Model\TaskMetadataModel;
use Kanboard\Action\Base;
class TaskRenameBasedOnMetadata extends Base
{
public function getDescription()
{
return t('TaskRenameBasedOnMetadata');
}
public function getCompatibleEvents()
{
return array(
TaskModel::EVENT_CREATE_UPDATE,
);
}
public function getActionRequiredParameters()
{
return array(
);
}
public function getEventRequiredParameters()
{
return array(
'task_id',
'metadata1',
);
}
public function doAction(array $data)
{
$title_test = $this->taskMetadataModel->get($data['task_id'], $data['metadata1']);
$values = array(
'id' => $data['task_id'],
'title' => $title_test,
);
return $this->taskModificationModel->update($values, false);
}
public function hasRequiredCondition(array $data)
{
return true;
}
}`
from metamagik.
OK, so, I still am sluggishly following the idea.
if a certain custom field equals a certain value, then update title to certain value?
or
no matter what, change title to certain value of custom field?
I've never pulled metadata from an event, nor have I ever pondered this to even know if such an event exists. you would need to look through the events, and see if such an event exists, im doubtful. there are workarounds, but it seems such information would be static, unless this custom field contains an array, so not fully understanding your action yet. forget the code for a second. walk me through it, step by step.
from metamagik.
So the idea is that I fill out the custom fields (metadata1, 2,3), and the task's title is generated from these custom fields' value (doesn't matter what the title currently is). As it is an array I would implode( ) them.
So do you think most probably a new event needs to be programmed?
Example: "Daniel 75kg 183cm" (metadata1: name, metadata2: weight, metadata3: height)
from metamagik.
I managed to figure it out how you export the metamagik metadata fields! Thank you!
from metamagik.
Related Issues (20)
- Edit Fields HOT 3
- Feature request HOT 10
- Custom field caption HOT 3
- metakey and metaval filters seem not to be working HOT 9
- using API with MetaMagic HOT 25
- [Feature request] Text area fields should be the same width as the parent column HOT 1
- Go
- The task creator will always be current user when import a task. HOT 2
- Feature Request: Label Custom Field Columns HOT 7
- I am unable to select and copy text from metamagic tables in task view HOT 1
- Sales pipeline, amounts and percentages HOT 6
- No Webhook-Notification upon changes to meta field values
- Cannot unassign tasks when MetaMagik is active HOT 4
- Autocomplete function for fields with many values
- Bug with MetaMagik HOT 1
- Add data-key and data-value to HTML elements
- Key-Value from DB with giving tablename,keycolumn,valuecolumn stop working HOT 1
- Analytic Controller not works HOT 2
- [BUG] Lot's of activitiy/notification entries about changing metamagic keys if nothing changed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metamagik.