Automatic Engagement Numbering (ENG-XXXX)#13853
Closed
PoojasPatel013 wants to merge 3 commits intoDefectDojo:bugfixfrom
PoojasPatel013:master
Closed
Automatic Engagement Numbering (ENG-XXXX)#13853PoojasPatel013 wants to merge 3 commits intoDefectDojo:bugfixfrom PoojasPatel013:master
PoojasPatel013 wants to merge 3 commits intoDefectDojo:bugfixfrom
PoojasPatel013:master
Conversation
Contributor
|
Hi @PoojasPatel013 PR are only accepted against the |
Contributor
Author
|
Hi, This draft PR is not meant to be merged, I needed few feedback from @valentijnscholten and update on progress. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #13592 (Work in Progress)
This PR implements automatic unique ID generation for Engagements. When a new engagement is created, the system assigns a sequential ID (e.g.,
ENG-0001,ENG-0002) and displays it in the UI.Changes Implemented
custom_engagement_idtoEngagementmodel.save()method to query the last ID and increment it.view_engagement.htmlto display the ID next to the header.Configuration
The format can be configured via environment variables or
local_settings.py:ENG-{id:03d}->ENG-001ENG-{id:04d}->ENG-0001ENG-{id}->ENG-1etc.
Test Results & Verification
makemigrationsandmigratesuccessfully.Pending Edge Case (Need Feedback)
I am currently debugging behavior related to deleted engagements.
ENG-0005), the queryEngagement.objects.last()might behave unexpectedly depending on how DefectDojo handles "Soft Deletes" vs "Hard Deletes."