Enable automatic numbering for engagements using a customizable format (e.g., ENG-0001).
:warning: Note on feature completeness :warning:
We are narrowing the scope of acceptable enhancements to DefectDojo. Learn more here: https://github.com/DefectDojo/django-DefectDojo/blob/master/readme-docs/CONTRIBUTING.md
Is your feature request related to a problem? Please describe A clear and concise description of what the problem is. Problem: Each new engagement currently displays no unique Engagement ID in the UI
Describe the solution you'd like Solution: Implement the ability to assign a customized engagement identifier (e.g., ENG-0001) that is automatically generated each time a new engagement is created. This ensures consistent and traceable engagement numbering for easier reference, reporting, and integration with other systems.
Thank you for submitting your enhancement request, this is something we would welcome a community PR for!
Can I pick this up if nobody's working on this?
Yes thank you
Update on Implementation
I have successfully implemented the backend logic for auto-generating IDs (ENG-XXXX)
Pending Edge Case:
It appears that when an engagement is deleted, it may still exist in the database (soft delete) or affect the calculation of the last() ID, causing the increment logic to behave unexpectedly. Still figuring out why it's happening, it will take time ig.
I am adjusting the save() query to ensure it handles deleted objects properly. If you have any suggestions, let me know, thanks!!
Can you create a draft PR?
hi @valentijnscholten opened #13862