Duplicate tags when moving and duplicating tasks to another project

This commit is contained in:
Libin Pan
2021-06-07 19:36:08 -07:00
committed by GitHub
parent 66d9245f33
commit c6ae9f3f24
5 changed files with 28 additions and 12 deletions

View File

@@ -27,13 +27,13 @@ class TaskTagModel extends Base
* @param integer $project_id
* @return array
*/
public function getTagIdsByTaskNotAvailableInProject($task_id, $project_id)
public function getTagsByTaskNotAvailableInProject($task_id, $project_id)
{
return $this->db->table(TagModel::TABLE)
->eq(self::TABLE.'.task_id', $task_id)
->notIn(TagModel::TABLE.'.project_id', array(0, $project_id))
->join(self::TABLE, 'tag_id', 'id')
->findAllByColumn(TagModel::TABLE.'.id');
->findAll();
}
/**