Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !6467

Closed
Created Mar 04, 2014 by Administrator@rootOwner
  • Report abuse
Report abuse

Add feature to be able to upload a file to an issue

  • Overview 32
  • Commits 1
  • Changes 15

Created by: tudorpavel

The idea of this feature is to have the possibility of uploading a file to an issue, not just to comments. This implementation works just for the simpler case of only one file per issue.

Feature requests:

  • http://feedback.gitlab.com/forums/176466-general/suggestions/4501700-allow-image-attachments-when-creating-new-issues
  • http://feedback.gitlab.com/forums/176466-general/suggestions/4095092-allow-file-uploads-to-an-issue

User Interface

The implementation consists of:

  • a slightly modified add/edit issue form
  • a slightly modified show issue page
Add/Edit Form

Before: edit_page_before_issue_file_upload

After, without any attachment: edit_page_after_issue_file_upload

After, with image attachment: edit_page_after_issue_file_upload_with_img_attachment

After, with non-image file attachment: edit_page_after_issue_file_upload_with_attachment

Show page

Before: show_page_before_issue_file_upload

After, with image attachment: show_page_after_issue_file_upload_with_img_attachment

After, with non-image file attachment: show_page_after_issue_file_upload_with_attachment

Implementation

  • migration to add attachment column to the issues table
  • modify Issue model to add CarrierWave attachment the same way it's done for Note
  • add issue :delete_attachment route
  • add attachment code and style in views so it looks and works very similar to the notes attachment
  • had to generalize FilesController#download to work with any model
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/tudorpavel/issue-file-upload