Patch #42135 » 0002-5.1-stable-Backport-r22826-r23421-and-r22809-from-trunk.patch
| app/models/issue_query.rb | ||
|---|---|---|
|
def sql_for_watcher_id_field(field, operator, value)
|
||
|
db_table = Watcher.table_name
|
||
|
me_ids = [0, User.current.id]
|
||
|
me_ids = me_ids.concat(User.current.groups.pluck(:id))
|
||
|
me_ids.concat(User.current.groups.pluck(:id))
|
||
|
me, others = value.partition {|id| me_ids.include?(id.to_i)}
|
||
|
sql =
|
||
|
if others.any?
|
||
| test/unit/query_test.rb | ||
|---|---|---|
|
result = query.results_scope
|
||
|
bookmarks = User.current.bookmarked_project_ids
|
||
|
assert_equal Project.where(parent_id: bookmarks).ids, result.map(&:id).sort
|
||
|
assert_equal Project.where(parent_id: bookmarks).ids.sort, result.map(&:id).sort
|
||
|
end
|
||
|
def test_filter_watched_issues_by_user
|
||
| test/unit/repository_bazaar_test.rb | ||
|---|---|---|
|
end
|
||
|
if File.directory?(REPOSITORY_PATH_NON_ASCII) && RUN_LATIN1_OUTPUT_TEST
|
||
|
# https://www.redmine.org/issues/42024
|
||
|
def skip_bzr_failure_on_ubuntu24
|
||
|
return unless File.exist?('/etc/os-release')
|
||
|
os_release = File.read('/etc/os-release')
|
||
|
name = os_release[/^NAME="(.+?)"$/, 1]
|
||
|
version = os_release[/^VERSION_ID="(.+?)"$/, 1]
|
||
|
if name == 'Ubuntu' && version == '24.04'
|
||
|
skip 'bzr command fails on Ubuntu 24.04, causing this test to fail'
|
||
|
end
|
||
|
end
|
||
|
def test_cat_latin1_path
|
||
|
skip_bzr_failure_on_ubuntu24
|
||
|
latin1_repo = create_latin1_repo
|
||
|
buf =
|
||
|
latin1_repo.cat(
|
||
| ... | ... | |
|
end
|
||
|
def test_annotate_latin1_path
|
||
|
skip_bzr_failure_on_ubuntu24
|
||
|
latin1_repo = create_latin1_repo
|
||
|
ann1 =
|
||
|
latin1_repo.annotate(
|
||
| ... | ... | |
|
end
|
||
|
def test_diff_latin1_path
|
||
|
skip_bzr_failure_on_ubuntu24
|
||
|
latin1_repo = create_latin1_repo
|
||
|
diff1 =
|
||
|
latin1_repo.diff(
|
||
| ... | ... | |
|
end
|
||
|
def test_entries_latin1_path
|
||
|
skip_bzr_failure_on_ubuntu24
|
||
|
latin1_repo = create_latin1_repo
|
||
|
entries = latin1_repo.entries("test-#{CHAR_1_UTF8_HEX}-dir", 2)
|
||
|
assert_kind_of Redmine::Scm::Adapters::Entries, entries
|
||
| ... | ... | |
|
end
|
||
|
def test_entry_latin1_path
|
||
|
skip_bzr_failure_on_ubuntu24
|
||
|
latin1_repo = create_latin1_repo
|
||
|
["test-#{CHAR_1_UTF8_HEX}-dir",
|
||
|
"/test-#{CHAR_1_UTF8_HEX}-dir",
|
||
| ... | ... | |
|
end
|
||
|
def test_changeset_latin1_path
|
||
|
skip_bzr_failure_on_ubuntu24
|
||
|
latin1_repo = create_latin1_repo
|
||
|
assert_equal 0, latin1_repo.changesets.count
|
||
|
latin1_repo.fetch_changesets
|
||