Skip to content

Commit

Permalink
Retirer la colonne updated_by_organization
Browse files Browse the repository at this point in the history
  • Loading branch information
Yalaeddin committed Jan 10, 2024
1 parent 4d2f357 commit 748a8cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions lib/redmine_organizations/patches/issue_query_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

class IssueQuery < Query
self.available_columns << QueryColumn.new(:author_organization, :groupable => false) if self.available_columns.select { |c| c.name == :author_organization }.empty?
self.available_columns << QueryColumn.new(:updated_by_organization, :sortable => "#{Journal.table_name}.created_on",
:default_order => 'desc', :groupable => true) if self.available_columns.select { |c| c.name == :updated_by_organization }.empty?
end

module PluginOrganizations
Expand Down
4 changes: 2 additions & 2 deletions spec/models/issue_query_patch_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
describe "IssueQueryPatch" do
fixtures :organizations, :users, :roles, :projects, :members, :trackers

context "should filter issues with updated_by_organization" do
context "filter issues with updated_by_organization" do
before do
@org = Organization.create(:name => "Team C")
@user = User.generate!
Expand All @@ -21,7 +21,7 @@ def find_issues_with_query(query)
expect(query.available_filters.keys).to include('updated_by_organization')
end

it "operator equal =, one organization" do
it "operator equal = , one organization" do
Journal.create!(:user_id => @user.id, :journalized => Issue.find(2), :notes => 'Notes')
Journal.create!(:user_id => @user.id, :journalized => Issue.find(3), :notes => 'Notes')
Journal.create!(:user_id => 2, :journalized => Issue.find(4), :notes => 'Notes')
Expand Down

0 comments on commit 748a8cb

Please sign in to comment.