Open
Conversation
Add a thin facade module that wraps every jira_link.helper function used by core code. Each wrapper delegates to dojo.jira_link.helper when available and returns a safe default when Jira is absent. This is the foundation for replacing direct jira_helper imports across the codebase. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy all jira_link files to dojo/jira/, convert dojo/jira_link/ files into backward-compat shims that re-export from dojo.jira, update dojo/urls.py and dojo/jira_facade.py to import from the new location. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace direct jira_helper import with jira_facade calls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace inline jira_helper import with jira_facade calls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace direct jira_link imports in base_importer.py, options.py, default_importer.py, and default_reimporter.py with jira_facade calls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace 13 jira_helper calls with jira_facade equivalents. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace 14 jira_helper calls with jira_facade equivalents. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace 12 jira_helper calls with jira_facade equivalents. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Guard jira_status_reconciliation import in tasks.py with try/except. Update management commands to import from dojo.jira.helper. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace direct jira_helper imports with jira_facade calls in: - finding_group/views.py (11 calls) - engagement/views.py (10 calls) - product/views.py (14 calls) - test/views.py (19 calls) - finding/views.py (56 calls) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace jira_helper imports with jira_facade in serializers.py and views.py. Update jira_link.queries import to dojo.jira.queries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace jira_helper import with jira_facade calls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace 6 inline jira_helper imports in has_jira_issue, has_jira_group_issue, and has_jira_configured properties with jira_facade calls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move 9 Jira form classes and get_jira_issue_template_dir_choices from dojo/forms.py to dojo/jira/forms.py. Add backward-compat re-exports in dojo/forms.py. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move JIRA_Instance, JIRA_Project, JIRA_Issue and their admin classes from dojo/models.py to dojo/jira/models.py. Add app_label='dojo' Meta to each model to preserve migrations. Use string ForeignKey references to avoid circular imports. Add backward-compat re-exports in models.py. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move JIRAIssueSerializer, JIRAInstanceSerializer, JIRAProjectSerializer, EngagementUpdateJiraEpicSerializer to dojo/jira/api/serializers.py. Move JiraInstanceViewSet, JiraIssuesViewSet, JiraProjectViewSet to dojo/jira/api/views.py. Add backward-compat re-exports in api_v2/. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix RET503 (missing explicit returns), PLC0415 (top-level imports), E402 (module-level import order), FBT002 (boolean positional arg), TRY300 (return in try block), and auto-fixed import sorting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Defer the import of dojo.utils.to_str_typed into the set_obj method to break a circular import chain: dojo.models -> dojo.jira.models -> dojo.utils -> dojo.finding.queries -> dojo.authorization -> dojo.models. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update all test mock paths from dojo.jira_link to dojo.jira - Fix update_jira_epic view to pass raw Celery task to dojo_dispatch_task via jira_facade.get_epic_task() - Fix close_engagement to use get_epic_task for close_epic dispatch Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
We don't want to waste your time, so if you're unsure whether your hypothetical enhancement meets the criteria for approval, please file an issue to get pre-approval before beginning work on a PR.
Learn more here: https://github.com/DefectDojo/django-DefectDojo/blob/master/readme-docs/CONTRIBUTING.md#submission-pre-approval
Description
Describe the feature / bug fix implemented by this PR.
If this is a new parser, the parser guide may be worth (re)reading.
Test results
Ideally you extend the test suite in
tests/anddojo/unitteststo cover the changed in this PR.Alternatively, describe what you have and haven't tested.
Documentation
Please update any documentation when needed in the documentation folder)
Checklist
This checklist is for your information.
dev.dev.bugfixbranch.Extra information
Please clear everything below when submitting your pull request, it's here purely for your information.
Moderators: Labels currently accepted for PRs:
Contributors: Git Tips
Rebase on dev branch
If the dev branch has changed since you started working on it, please rebase your work after the current dev.
On your working branch
mybranch:In case of conflict:
When everything's fine on your local branch, force push to your
myOriginremote:To cancel everything:
Squashing commits
pickbyfixupon the commits you want squashed outpickbyrewordon the first commit if you want to change the commit messageForce push to your
myOriginremote: