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

feat: Activities with evidences as attachment #121

Draft
wants to merge 121 commits into
base: main
Choose a base branch
from

Conversation

dionisioAutentia
Copy link

@dionisioAutentia dionisioAutentia commented Aug 17, 2023

Describe your changes

Change the API so in the request there is no evidences as base64 string but an array with all the attachment identifiers that represents an evidence. Also, the flag hasEvidence has been redesigned.

There is a new intermediate table ActivityEvidence that associates the activities with the attachment table

Create/Update/Delete use cases had been modified to use the new attachments and stop using the old ones

Review / Tests

  • When creating an activity with evidence as attachment the attachment isTemporary flag must be false from the initial true
  • When updating an activity, the old attachments isTemporary flag must be true and the new attachment false
  • When deleting an activity, the association between the attachment and the activity is deleted and the attachment is removed.

cgmarcos-autentia and others added 30 commits August 3, 2023 15:40
…part max-file-size to 100MModify /activity/{activityId}/evidence Controller to return Multipart.
Add activity evidence table and relationship in activity
@@ -25,7 +25,6 @@ class ActivitiesResponseConverter(
project = activity.projectRole.project,
projectRole = activity.projectRole,
duration = activity.duration,
hasImage = activity.hasEvidences
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mejor poner el valor a false. Este conversor se usa para la API del hook. Si nos cargamos este campo rompemos la integración actual

@@ -15,5 +15,4 @@ data class ActivitiesResponse(
val billable: Boolean,
val organization: Organization,
val project: Project,
val hasImage: Boolean?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lo mismo aquí: no quitar el campo hasImage, rompemos el contrato con el hook!!

@@ -13,7 +13,5 @@ data class ActivityRequestBodyHookDTO(
val description: String,
val billable: Boolean,
val projectRoleId: Long,
val hasImage: Boolean,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No podemos romper la API del Hook!!!!

mariocalin and others added 25 commits September 7, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants