[Rt-commit] rt branch, 4.2/deprecate-bookmarks-syntax, created. rt-4.1.8-303-ga070c6d

Thomas Sibley trs at bestpractical.com
Wed May 15 17:44:22 EDT 2013


The branch, 4.2/deprecate-bookmarks-syntax has been created
        at  a070c6d71376835604be1343d936bda488097362 (commit)

- Log -----------------------------------------------------------------
commit a070c6d71376835604be1343d936bda488097362
Author: Todd Wade <todd at bestpractical.com>
Date:   Tue May 14 12:13:39 2013 -0400

    mark __Bookmarks__ as deprecated
    
    __Bookmarks__ was to be removed in 4.2 but the user was never warned
    in 4.0, so marking the feature deprecated for 4.2 and will be fully
    removed later
    
    see issues#20297

diff --git a/share/html/Elements/ShowSearch b/share/html/Elements/ShowSearch
index fb9b043..c6bff90 100644
--- a/share/html/Elements/ShowSearch
+++ b/share/html/Elements/ShowSearch
@@ -131,7 +131,13 @@ foreach ( $SearchArg, $ProcessedSearchArg ) {
     elsif ( $_->{'Query'} =~ /__Bookmarks__/ ) {
         $_->{'Rows'} = 999;
 
-        # DEPRECATED: will be here for a while up to 3.10/4.0
+        # DEPRECATED: will be here for a while up to 4.4
+        RT->Deprecated(
+            Remove  => "4.4",
+            Instead => "id = '__Bookmarked__'",
+            Message => "The __Bookmarks__ query syntax is deprecated",
+        );
+
         my @bookmarks = $session{'CurrentUser'}->UserObj->Bookmarks;
         my $query = join(" OR ", map " id = '$_' ", @bookmarks ) || 'id=0';
         $_->{'Query'} =~ s/__Bookmarks__/( $query )/g;
diff --git a/share/html/m/tickets/search b/share/html/m/tickets/search
index b5ae8e4..86b9ecf 100644
--- a/share/html/m/tickets/search
+++ b/share/html/m/tickets/search
@@ -90,7 +90,13 @@ my $search;
         if ( $_->{'Query'} =~ /__Bookmarks__/ ) {
             $_->{'Rows'} = 999;
 
-            # DEPRECATED: will be here for a while up to 3.10/4.0
+            # DEPRECATED: will be here for a while up to 4.4
+            RT->Deprecated(
+                Remove  => "4.4",
+                Instead => "id = '__Bookmarked__'",
+                Message => "The __Bookmarks__ query syntax is deprecated",
+            );
+
             my @bookmarks = $session{'CurrentUser'}->UserObj->Bookmarks;
             my $query = join(" OR ", map " id = '$_' ", @bookmarks ) || 'id=0';
             $_->{'Query'} =~ s/__Bookmarks__/( $query )/g;

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


More information about the Rt-commit mailing list