Skip to content

Make SonarQube Parser use creationDate for Date#13919

Merged
valentijnscholten merged 4 commits intoDefectDojo:bugfixfrom
Jino-T:sonarqube-date-discovered
Dec 22, 2025
Merged

Make SonarQube Parser use creationDate for Date#13919
valentijnscholten merged 4 commits intoDefectDojo:bugfixfrom
Jino-T:sonarqube-date-discovered

Conversation

@Jino-T
Copy link
Contributor

@Jino-T Jino-T commented Dec 17, 2025

[sc-12289]

Comment on lines +29 to +32
try:
date = str(dateutil.parser.parse(issue.get("creationDate")).date())
except (ValueError, TypeError, dateutil.parser.ParserError):
date = timezone.now()
Copy link
Member

Choose a reason for hiding this comment

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

not a blocker, but could save some repeated code by making this a helper function for all parsers?

Copy link
Contributor

Choose a reason for hiding this comment

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

I like this idea! I've got some ideas for parser improvements to discuss with you at some point too. Let's hold on this helper for now

Copy link
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

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

Approved

@Maffooch Maffooch requested a review from rossops December 22, 2025 07:28
@valentijnscholten valentijnscholten merged commit 75a6b44 into DefectDojo:bugfix Dec 22, 2025
150 checks passed
Maffooch added a commit to valentijnscholten/django-DefectDojo that referenced this pull request Feb 16, 2026
* Sonarqube parse creationDate

* added better handling of date conversions

* Apply suggestions from code review

* Update dojo/tools/sonarqube/sonarqube_restapi_json.py

---------

Co-authored-by: Cody Maffucci <46459665+Maffooch@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants