Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add another fields to tasks histories #19

Open
nunomazer opened this issue Jun 14, 2024 · 5 comments
Open

Add another fields to tasks histories #19

nunomazer opened this issue Jun 14, 2024 · 5 comments
Labels
enhancement New feature or request ready to develop

Comments

@nunomazer
Copy link
Contributor

nunomazer commented Jun 14, 2024

Add in histories (activities) more fields of tasks:

  • title
  • description
  • priority
  • parent_id: as parent task
  • status_id: as status name only (not need the id)
  • planned_start
  • planned_end
  • actual_start
  • actual_end
  • due_date
  • client_id: the name
  • project_id: the name
  • effort: effort is the value and the unit
  • effort_unit
  • checklist

Pay attention that the create action (first insert of the record) do not need to generate an activity

@nunomazer nunomazer added the enhancement New feature or request label Jun 14, 2024
@GabrielDantasDs
Copy link
Contributor

Hi @nunomazer,
I see there a lot of new fields in activity for tasks, all of them need been shown in histories tables ? or activity has to have your own screen with all this info ?

@GabrielDantasDs
Copy link
Contributor

Also, regarding the fields, I realized that Spatie doesn't support changing the field names. To maintain the change history, I need to keep the original names of the fields. Therefore, it is not possible to save client_id, project_id, and status_id with different names. Is there a better approach for this, or did I miss something in the Spatie documentation?

@nunomazer
Copy link
Contributor Author

Hi @GabrielDantasDs

Yes all this fields should be in the change history, this way we gonna have a real tracking of what is done in tasks.

The way to do with Spatie's package is simple, see the docs, if I'm not wrong it's almost automatic depending on model configuration.

About client and project id, you can add a properties: ->withProperties(['key' => 'value']) ... this way when client id or project id are dirty, you add related names as proprties

@GabrielDantasDs
Copy link
Contributor

Thanks Professor. Now i be able to save all fields like you said, but the history table have more then 10 columns now, and look like little weird in the frontend, some columns break the line and go to below line, like this image, i lost something or that is it ?

Screenshot from 2024-07-23 21-41-43

obs: i limit all columns to 10 characters and add tooltip on hover.

@nunomazer
Copy link
Contributor Author

I think you can create only one column on frontend that shows partial information of the changes, and at clicking on the row, open a modal that shows all the fields changed in a formated way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready to develop
Projects
None yet
Development

No branches or pull requests

2 participants