Hi everyone,
i am new in kanboard and as well as in Programming. Can someone help me plz where is the Variable dest_column_id defined? in the Class TaskmoveColumnAssigned.php.
farthermore I wanna duplicate a task in other projekt I will post my code below. The goal is to have a destination Column in which the task in other Projekt duplicated. i have tryed but its not working. I appreciate any help. tnx
public function getActionRequiredParameters()
{
return array(
‘column_id’ => t(‘Column’),
‘project_id’ => t(‘Project’),
‘dst_column_id’ => t(‘Destination Column’),
);
}
/**
* Get the required parameter for the event
*
* @access public
* @return string[]
*/
public function getEventRequiredParameters()
{
return array(
'task_id',
'task' => array(
'project_id',
'column_id',
'dst_column_id'
)
);
}
/**
* Execute the action (duplicate the task to another project)
*
* @access public
* @param array $data Event data dictionary
* @return bool True if the action was executed or false when not executed
*/
public function doAction(array $data)
{
$destination_column_id = $this->columnModel->getAll($this->getParam('project_id'));
return (bool) $this->taskProjectDuplicationModel->duplicateToProject(
$data['task_id'],
$this->getParam('project_id'),
null,
$destination_column_id
);
}
/**
* Check if the event data meet the action condition
*
* @access public
* @param array $data Event data dictionary
* @return bool
*/
public function hasRequiredCondition(array $data)
{
if( $data['task']['column_id'] == $this->getParam('column_id') &&
$data['task']['project_id'] != $this->getParam('project_id') &&
$data['task']['dst_column_id'] != $this->getParam('column_id')&&
$data['task']['project_id'] != $this->getParam('project_id')
)
{
tnx for the reply sir do u have any Idea?
what I am doing wrong in the code that i had posted before. I defined a Destination Column and the target is that I wanna duplicate a Task in a specific project and in a specific Column.
for example duplicating the task
source column: Ready
project : any project of choice
Destination Column: done
it gives me no error. The problem is on the user interface in the Destination Column it show me the Standard Column not the Columns of the choice Project that i had chosen.
The Action is already registered i wanna only make some changes in it.
tnx for the solution I had tryed same thing before but unfortunately it did not worked as I wished. For sure to make it dynamic it need javascript. And I think I have to make a column for destination column in the table of Column. I mean i have to insert a query