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

API: Enhance Document POST / GET by documentSize & Migrationscript #880

Open
4 tasks
MaximilianHauer opened this issue Jul 29, 2024 · 1 comment
Open
4 tasks
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@MaximilianHauer
Copy link

MaximilianHauer commented Jul 29, 2024

Description

AS A User I WANT to be able to see the Filesize in Kilobyte of a document SO THAT i can decide if i want to download it or not

1. Enhance POST

POST Endpoint to be adjusted: /api/registration/application/{applicationId}/documentType/{documentTypeId}/documents
API should store Length in Kilobyte.
New Databasefield in table documents -> document_size type Long

2. Enhance GET
GET Endpoints to be adjusted:
/api/registration/application/{applicationId}/documentType/{documentTypeId}/documents
/api/registration/documents/{documentId}

add new field -> sizeDocument
return value documents.document_size

3. Update existing files

Execute SQL script to update the documents.document_size field for existing entries.


Acceptance Criteria

  • I can retrieve the size of a document via the GET documents api
  • I can store the size of a document via the POST documents api
  • I can see the size of the already uploaded documents with the GET api
  • unit tests are provided.

Testing

Test Case 1: Retrieve the document Size of a new Document
Objective: Ensure that the endpoint is adjusted properly.
Steps:

  1. Upload a new document
  2. make a GET request to /api/registration/documents/{documentId}

Expected Result:
The response code is 200 and the response includes sizeDocument

Test Case 2: Retrieve the document Size of an old Document
Objective: Ensure that the existing documents where updated properly by the script
Steps:

  1. Search a document that was existing before the adjustment
  2. make a GET request to /api/registration/documents/{documentId}

Expected Result: The response code is 200 and the response includes sizeDocument

Additional Information

Related to eclipse-tractusx/portal-frontend#921

@MaximilianHauer MaximilianHauer added the enhancement New feature or request label Jul 29, 2024
@Phil91 Phil91 transferred this issue from eclipse-tractusx/portal-frontend Jul 29, 2024
@MaximilianHauer MaximilianHauer moved this from NEW USER REQUEST to BACKLOG in Portal Jul 29, 2024
@AnuragNagpure AnuragNagpure self-assigned this Oct 30, 2024
@AnuragNagpure AnuragNagpure moved this from BACKLOG to IN PROGRESS in Portal Nov 4, 2024
@Phil91 Phil91 added this to the Release 25.03 milestone Nov 22, 2024
Phil91 pushed a commit that referenced this issue Nov 22, 2024
@MaximilianHauer
Copy link
Author

@gopalreddy-bmw do you retest ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: IN REVIEW
Development

No branches or pull requests

4 participants