Skip to content

Fix report file path issue and duplicate file issue, Fix file path issue for Project and SOW Form#4580

Merged
frjo merged 3 commits intomainfrom
fix/gh-4574-report-files
Jun 17, 2025
Merged

Fix report file path issue and duplicate file issue, Fix file path issue for Project and SOW Form#4580
frjo merged 3 commits intomainfrom
fix/gh-4574-report-files

Conversation

@sandeepsajan0
Copy link
Copy Markdown
Member

Fixes #4574

As reports are project documents so we added a different path for its files but we used ReportVersion instance checks and missed Report instances so reports files and its version files were having different path and were creating issues. We could solve it in that way as well but I realise as projects are also the extension of submission and we have been trying to merge them so keep everything similar with same url pattern.

Now it uses submission id to generate path and render the file similar to other submission files.

Now, it also handles the duplicate file issue on every upload. It was resolved for the application form but not for the report forms.

Test Steps

  • Upload a file to report form.
  • Check if it is accessible.
  • Edit and submit form without uploading new file, file name shouldn't be changed like it used to filename_<some hex code>.ext

@sandeepsajan0 sandeepsajan0 marked this pull request as ready for review June 10, 2025 12:02
@frjo frjo added Type: Bug Bugs! Things that are broken :-/ Type: Patch Mini change, used in release drafter Status: Needs testing Tickets that need testing/qa Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team labels Jun 11, 2025
@sandeepsajan0 sandeepsajan0 changed the title Fix report file path issue and duplicate file issue Fix report file path issue and duplicate file issue, Fix file path issue for PAF and SOW Jun 12, 2025
@sandeepsajan0
Copy link
Copy Markdown
Member Author

As @frjo mentioned here, this issue exists with all other stream forms that have a file field, including Project Form and SOW form. It is now fixed for all other existing forms like project form, Sow, and report.
@frjo we may put its latest version to test.

@sandeepsajan0 sandeepsajan0 changed the title Fix report file path issue and duplicate file issue, Fix file path issue for PAF and SOW Fix report file path issue and duplicate file issue, Fix file path issue for Project and SOW Form Jun 12, 2025
@wes-otf
Copy link
Copy Markdown
Contributor

wes-otf commented Jun 16, 2025

Works well, the report files are accessible!

Edit and submit form without uploading new file, file name shouldn't be changed like it used to filename_<some hex code>.ext

Did you mean that the file name shouldn't have hex appended at all or it shouldn't update it after resubmitting? It did append hex originally but after resubmitting via edit that hex stayed the same

Screenshot 2025-06-16 at 13 11 54

Should be ready to go if that was intended though!

@frjo frjo merged commit eb6f9a0 into main Jun 17, 2025
7 checks passed
@frjo
Copy link
Copy Markdown
Member

frjo commented Jun 17, 2025

The file name will have the hex but it should not change on each edit unless the file itself has changed.

theskumar added a commit that referenced this pull request Jun 20, 2025
* origin/main:
  Fix report file path issue and duplicate file issue, Fix file path issue for Project and SOW Form (#4580)
  Use xhtml2pdf inplace of reportlab for submission pdf export (#4577)
  Fix co-applicant permission for Partners, Reviewers, and Community Reviewers (#4583)
  Migrate django-fsm to django-viewflow (#4561)
  Delete application comments with the application (#4585)
@theskumar theskumar deleted the fix/gh-4574-report-files branch July 20, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team Status: Needs testing Tickets that need testing/qa Type: Bug Bugs! Things that are broken :-/ Type: Patch Mini change, used in release drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trying to access a file uploaded in a report results in a 404

3 participants