Public/private saved queries are not separated anymore
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?
#1 Updated by Olivier Houdas over 3 years ago
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).
#3 Updated by Olivier Houdas over 3 years ago
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
add_column :queries, :visibility, :integer, :default => 0
Query.where(:is_public => true).update_all(:visibility => 2)
Query.where(:is_public => false).update_all(:visibility => 0)
remove_column :queries, :is_public
add_column :queries, :is_public, :boolean, :default => true, :null => false
Query.where('visibility <> ?', 2).update_all(:is_public => false)
Query.where(:visibility => 2).update_all(:is_public => true)
remove_column :queries, :visibility
If you face the issue after upgrading, a simple query like:
UPDATE queries SET visibility = 0 WHERE (visibility IS NULL)
will restore private/public display of your users' queries.
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).
Redmine version 3.3.2.stable
Ruby version 2.1.7-p400 (2015-08-18) [x64-mingw32]
Rails version 22.214.171.124
Database adapter SQLServer
no plugin installed
Any idea whats wrong?