Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Anonymous Ticket Portal Anonymous Ticket Portal
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • TPA
  • Anonymous Ticket PortalAnonymous Ticket Portal
  • Merge requests
  • !33

Refactored Project Search and Issue Search

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged MariaV requested to merge cleanup_results_dictionary into master Jan 06, 2021
  • Overview 0
  • Commits 4
  • Pipelines 0
  • Changes 2

Refactored project_search and issue_search methods from forms.py (SearchForm) by passing entire project into results dictionary (versus taking specific fields from project); this allows for search result templates to have full access to project dictionary returned from gitlab. Refactored search template to use project dictionary versus passing specific fields into request dictionary. Moved all messages (e.g. issue_not_found_message, project_not_found_message) from global level of forms.py to inside of project search and issue search functions. Also changed get in project_search to get_object_or_404 to increase security. Removed/shortened several lines of duplicate code in project search and issue search in forms.py

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: cleanup_results_dictionary