Skip to content
Snippets Groups Projects

Fixed Postgresql Notes search issue (integer vs string)

Closed gitlab-qa-bot requested to merge github/fork/jozefvaclavik/master into master

Created by: jozefvaclavik

Hi,

I override notes methods for classes that use has_many :notes, as: :noteable Method is manually converting id to string to avoid type crash for postgresql database. I also had to update mr_and_commit_notes method. I tested issues and snippets it in production. I somehow cant find where to write wiki note, but it should work as well. And because I don't have any merge requests, i couldn't test changed method either. If anything, let me know. Fixes #1957 (closed)

Jozef

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
21 21 belongs_to :project
22 22 belongs_to :author, class_name: "User"
23 23 has_many :notes, as: :noteable, dependent: :destroy
24
  • Created by: riyad

    Please don't change unrelated lines

    By Administrator on 2012-12-09T23:04:42 (imported from GitLab project)

    By Administrator on 2012-12-09T23:04:42 (imported from GitLab)

  • Created by: riyad

    • Please rebase your changes onto master to get rid of all the merges.
    • Please squash your second commit.
    • I think copy&pasting the same code 3 times is to much. I think moving the method to a newly created Noteable module in app/roles and including it into the right Models makes more sense.

    By Administrator on 2012-12-09T23:08:32 (imported from GitLab project)

    By Administrator on 2012-12-09T23:08:32 (imported from GitLab)

  • Created by: jozefvaclavik

    @Riyad I'm closing this pull request. I was working on it from my production server where i had gitlabhq/gitlabhq repository and I added jozefvaclavik/gitlabhq as remote repo. My bad. I'm submitting new one.

    By Administrator on 2012-12-10T00:46:26 (imported from GitLab project)

    By Administrator on 2012-12-10T00:46:26 (imported from GitLab)

  • Created by: riyad

    You know you could have updated this with git push --force ....

    By Administrator on 2012-12-10T10:46:04 (imported from GitLab project)

    By Administrator on 2012-12-10T10:46:04 (imported from GitLab)

  • Please register or sign in to reply
    Loading