https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292014-06-10T13:06:19ZRedmineRedmine - Defect #17147: Public/private saved queries are not separated anymorehttps://www.redmine.org/issues/17147?journal_id=567022014-06-10T13:06:19ZOlivier Houdas
<ul></ul><p>This seems to be an upgrade issue. When we create a query visible to "me" only, it does work.<br />But all queries previously saved as My custom queries have lost their privacy settings after upgrading.<br />I will dig into my upgrade scripts tomorrow (it might involve some plugins then).</p> Redmine - Defect #17147: Public/private saved queries are not separated anymorehttps://www.redmine.org/issues/17147?journal_id=567032014-06-10T13:36:39ZOlivier Houdas
<ul></ul><p>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.</p>
<p>We are using MS SQL 2008.</p> Redmine - Defect #17147: Public/private saved queries are not separated anymorehttps://www.redmine.org/issues/17147?journal_id=567242014-06-11T07:38:21ZOlivier Houdas
<ul></ul><p>OK, I found out what is wrong.<br />The script sets the new queries.visibility column to 2 if is_public was true, but it leaves other rows unchanged.</p>
<p>For an update, MS SQL creates visibility with NULL for existing rows, although the default value for visibility is set to 0.</p>
<p>Consequently, the <strong>20130710182539_add_queries_visibility.rb</strong> migration script should be updated (I haven't tested, though) to</p>
<pre><code>class AddQueriesVisibility < ActiveRecord::Migration<br /> def up<br /> add_column :queries, :visibility, :integer, :default => 0<br /> Query.where(:is_public => true).update_all(:visibility => 2)<br /><span style="color:green;font-style:italic;"> Query.where(:is_public => false).update_all(:visibility => 0)</span><br /> remove_column :queries, :is_public<br /> end</code></pre>
<pre><code>def down<br /> add_column :queries, :is_public, :boolean, :default => true, :null => false<br /> Query.where('visibility <> ?', 2).update_all(:is_public => false)<br /><span style="color:green;font-style:italic;"> Query.where(:visibility => 2).update_all(:is_public => true)</span><br /> remove_column :queries, :visibility<br /> end<br />end</code></pre>
<p>If you face the issue after upgrading, a simple query like:</p>
<p><span style="color:green;font-style:italic;"> UPDATE queries SET visibility = 0 WHERE (visibility IS NULL)</span></p>
<p>will restore private/public display of your users' queries.</p> Redmine - Defect #17147: Public/private saved queries are not separated anymorehttps://www.redmine.org/issues/17147?journal_id=567252014-06-11T07:45:01ZOlivier Houdas
<ul></ul><p>Note that this also fixes an issue with saved queries, that sometimes we would get the following message:</p>
<pre><code>"visibility n'est pas inclus(e) dans la liste" (French)</code></pre>
<pre><code>"visibility is not included in the list" (English)</code></pre> Redmine - Defect #17147: Public/private saved queries are not separated anymorehttps://www.redmine.org/issues/17147?journal_id=572432014-07-02T07:40:27ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/1019">Feature #1019</a>: Role based custom queries</i> added</li></ul> Redmine - Defect #17147: Public/private saved queries are not separated anymorehttps://www.redmine.org/issues/17147?journal_id=669252015-10-29T08:45:10ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/21096">Defect #21096</a>: Redmine throughs error like "visibility is not included in the list" while clicking issues, gantt tabs. </i> added</li></ul> Redmine - Defect #17147: Public/private saved queries are not separated anymorehttps://www.redmine.org/issues/17147?journal_id=669352015-10-29T11:20:04ZEswaran Arumugam
<ul></ul><p>I have followed this this Query <br />UPDATE queries SET visibility = 0 WHERE (visibility IS NULL)<br />But nothing happended. My Error thorough's the same. <strong>"visibility is not included in the list"</strong></p> Redmine - Defect #17147: Public/private saved queries are not separated anymorehttps://www.redmine.org/issues/17147?journal_id=760802017-01-18T14:01:49ZRonny .
<ul></ul><p>Same error for me.<br />I got "•Visibility is not included in the list" message while trying to open an issue list.<br />I had a look at queries table. Is empty, so nothing would be change by firing above written sql.</p>
<p>Storing a filter solves the problem, bit after deleting the filter, same message again.</p>
<p>Windows Server 2012R2<br />Sql Server 2016<br />Installed yesterday and no content (tickets or so on).</p>
<p>Environment:<br /> Redmine version 3.3.2.stable<br /> Ruby version 2.1.7-p400 (2015-08-18) [x64-mingw32]<br /> Rails version 4.2.7.1<br /> Environment production<br /> Database adapter SQLServer<br />SCM:<br /> Filesystem <br />Redmine plugins:<br /> no plugin installed</p>
<p>Any idea whats wrong?<br />Cheers</p> Redmine - Defect #17147: Public/private saved queries are not separated anymorehttps://www.redmine.org/issues/17147?journal_id=760892017-01-18T15:32:42ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/24866">Defect #24866</a>: SQLServer: Visibility not included in list</i> added</li></ul> Redmine - Defect #17147: Public/private saved queries are not separated anymorehttps://www.redmine.org/issues/17147?journal_id=766612017-02-14T12:38:06ZToshi MARUYAMA
<ul><li><strong>Related to</strong> deleted (<i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/24866">Defect #24866</a>: SQLServer: Visibility not included in list</i>)</li></ul>