プロジェクト

全般

プロフィール

Vote #75294

未完了

Public/private saved queries are not separated anymore

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
2
version_id:
0
issue_org_id:
17147
author_id:
80618
assigned_to_id:
0
comments:
10
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
82
ステータス-->[New]

説明

In Issues, Public and Private queries were grouped in two separated sections in 2.3.3.

In 2.4.3 and 2.5.1, they are all grouped under a single place, the Customized reports section.
As this had been done on purpose (see #4908), and I could not find any issue or request for changing it, maybe it is an unwanted change in recent versions?


journals

This seems to be an upgrade issue. When we create a query visible to "me" only, it does work.
But all queries previously saved as My custom queries have lost their privacy settings after upgrading.
I will dig into my upgrade scripts tomorrow (it might involve some plugins then).
--------------------------------------------------------------------------------
It seems that the update script 20130710182539_add_queries_visibility.rb has failed to update the new visibility column with proper values from the is_public column: all values are NULL in our DB.

We are using MS SQL 2008.
--------------------------------------------------------------------------------
OK, I found out what is wrong.
The script sets the new queries.visibility column to 2 if is_public was true, but it leaves other rows unchanged.

For an update, MS SQL creates visibility with NULL for existing rows, although the default value for visibility is set to 0.

Consequently, the *20130710182539_add_queries_visibility.rb* migration script should be updated (I haven't tested, though) to

class AddQueriesVisibility < ActiveRecord::Migration
def up
add_column :queries, :visibility, :integer, :default => 0
Query.where(:is_public => true).update_all(:visibility => 2)
%{color:green; font-style:italic;} Query.where(:is_public => false).update_all(:visibility => 0)%
remove_column :queries, :is_public
end

def down
add_column :queries, :is_public, :boolean, :default => true, :null => false
Query.where('visibility <> ?', 2).update_all(:is_public => false)
%{color:green; font-style:italic;} Query.where(:visibility => 2).update_all(:is_public => true)%
remove_column :queries, :visibility
end
end

If you face the issue after upgrading, a simple query like:

%{color:green; font-style:italic;} UPDATE queries SET visibility = 0 WHERE (visibility IS NULL)%

will restore private/public display of your users' queries.
--------------------------------------------------------------------------------
Note that this also fixes an issue with saved queries, that sometimes we would get the following message:

"visibility n'est pas inclus(e) dans la liste" (French)

"visibility is not included in the list" (English)

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I have followed this this Query
UPDATE queries SET visibility = 0 WHERE (visibility IS NULL)
But nothing happended. My Error thorough's the same. *"visibility is not included in the list"*
--------------------------------------------------------------------------------
Same error for me.
I got "•Visibility is not included in the list" message while trying to open an issue list.
I had a look at queries table. Is empty, so nothing would be change by firing above written sql.

Storing a filter solves the problem, bit after deleting the filter, same message again.

Windows Server 2012R2
Sql Server 2016
Installed yesterday and no content (tickets or so on).

Environment:
Redmine version 3.3.2.stable
Ruby version 2.1.7-p400 (2015-08-18) [x64-mingw32]
Rails version 4.2.7.1
Environment production
Database adapter SQLServer
SCM:
Filesystem
Redmine plugins:
no plugin installed

Any idea whats wrong?
Cheers
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,1019,Role based custom queries
duplicates,Closed,21096,Redmine throughs error like "visibility is not included in the list" while clicking issues, gantt tabs.

Admin Redmine さんが約2年前に更新

  • カテゴリIssues_2 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0