Tarea #4313 Asignar tarea usuario#41
Merged
daniel89fg merged 4 commits intoFacturaScripts:masterfrom Mar 17, 2026
Merged
Conversation
…tar tarea, modificado model y tabla
Contributor
|
faltaba añadir la notificación al usuario como dice la tarea, yo me encargo. |
Contributor
Author
|
Ok, me dijo Carlos por Discord que no implementase lo de la notificación que luego se haría, por eso no lo hice.
…________________________________
De: Daniel Fernández ***@***.***>
Enviado: martes, 17 de marzo de 2026 09:46
Para: FacturaScripts/proyectos ***@***.***>
Cc: Esteban Sánchez ***@***.***>; Author ***@***.***>
Asunto: Re: [FacturaScripts/proyectos] Tarea #4313 Asignar tarea usuario (PR #41)
[https://avatars.githubusercontent.com/u/13066282?s=20&v=4]daniel89fg left a comment (FacturaScripts/proyectos#41)<#41 (comment)>
faltaba añadir la notificación al usuario como dice la tarea, yo me encargo.
—
Reply to this email directly, view it on GitHub<#41 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BI4IQOZUDRFGOZW6I7HRXB34REGHPAVCNFSM6AAAAACWREZXJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DANZTGI4DQOJZGQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cambios realizados Model/TareaProyecto.php:
•Añadida la propiedad pública $nick (string) al modelo TareaProyecto.
Cambios realizados Model/Join/TareaProyecto.php:
•Añadido el mapeo 'nick' => 'tareas.nick' en getFields() para exponer nick en los listados JOIN.
Cambios realizados Table/tareas.xml:
•Añadida columna character varying(50) (NULL permitido).
•Añadida constraint ca_tareas_users: FOREIGN KEY (nick) REFERENCES users (nick) ON DELETE SET NULL ON UPDATE CASCADE.
Cambios realizados (Plugins/Proyectos/XMLView/EditTareaProyecto.xml):
•Añadida columna/widget select (fieldname="nick") para mostrar un select de usuarios (values source="users") en el formulario de nueva/edición de tarea.
Cambios realizados Controller/EditTareaProyecto.php:
•Añadido un comentario indicando que el campo nick viene del Table/tareas.xml (el formulario ahora lo toma de la XMLView).
Cambios realizados Controller/ListTareaProyecto.php:
•En createViewsTasks() y createViewsPrivateTasks() se añadió:
•Obtención de usuarios: $users = $this->codeModel->all('users','nick','nick');
•Si hay más de un usuario, se añade el filtro: ->addFilterSelect('nick','user','tareas.nick',$users)
•Cambios en Controller/ListTareaProyecto.php:
◦createViews() ahora llama a createViewsMine().
◦Nuevo método createViewsMine(): crea la vista ListTareaProyecto-mine (label 'Mis tareas') con orden, búsqueda y filtros similares a la vista principal.
◦loadData(): añadido case 'ListTareaProyecto-mine' que carga solo las tareas asignadas al usuario actual, restringidas a proyectos accesibles (proyectos de la misma empresa, proyectos que el usuario posee o proyectos donde está incluido).