Skip to content
Snippets Groups Projects

Improve support for external issue references

Merged username-removed-378947 requested to merge adam-external-issue-references-spike into master
All threads resolved!

What does this MR do?

  1. Fixes referenced bugs related to extracting references to external issues
  2. Cleans up the code - Banzai::Filter::IssueReferenceFilter should not concerned with external issues, because we have Banzai::Filter::ExternalIssueReferenceFilter.
  3. Clarifies in the documentation what we support and what we do not support

Are there points in the code the reviewer needs to double check?

General caution, this code was very messy and unintuitive, and it still is.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #33679 (closed)

Closes #34076 (closed)

Closes #34082 (closed)

Edited by username-removed-378947

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • @adamniedzielski thanks, this looks good to me!

    Am I right in saying that https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12130 should be responsible for specifying the behaviour when an internal and external issue tracker are both enabled?

  • changed milestone to %9.4

  • @smcgivern Yes, that's right. This merge request still assumes that there is only one issue tracker enabled. I expect that https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12130 will update the code to remove this assumption.

    I believe that: after merging my merge request, if you have both GitLab issue tracker and Redmine enabled, #123 will point to GitLab issue 123 if it exists or Redmine issue 123 if GitLab issue does not exist. So for external issue references in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12130 we will need a mechanism that disables extracting references to GitLab issues in the current project if GitLab issues are disabled for the current project, even when these issues already exist in the database (because somebody played with GitLab issue tracker but then disabled it). Please note that this is not as simple as "don't run IssueReferenceFilter when GitLab issue tracker is disabled", because we still need IssueReferenceFilter for cross-project references to other GitLab projects.

    What's more, I expect that there might be some additional things with closing issues that we have to update, just after my quick research here.

    That said, I do believe that my merge request leaves this area of the codebase in a better shape and these changes will be easier to make.

  • added 124 commits

    • 38fd33b5...81dba76b - 123 commits from branch master
    • 9da30769 - Improve support for external issue references

    Compare with previous version

  • username-removed-443319 resolved all discussions

    resolved all discussions

  • username-removed-443319 approved this merge request

    approved this merge request

  • mentioned in commit 0ca6bf4d

  • Please register or sign in to reply
    Loading