[Rt-commit] rt branch, 4.4/saved-search-links, repushed
? sunnavy
sunnavy at bestpractical.com
Mon Mar 16 15:35:44 EDT 2020
The branch 4.4/saved-search-links was deleted and repushed:
was d2fdc4b347cd23a5490c99d8b9f71a0a081eca4b
now 603a8ecfce6f031a79fe5e289ed034e5a4cdb515
1: 57d04305b = 1: 57d04305b Sort hashes in attribute content to avoid unnecessary updates
2: 9a44c12bd = 2: 9a44c12bd Add transaction records for dashboard/savedsearch changes
3: b54749dc4 = 3: b54749dc4 Include related transactions for attribute serialization
4: 957c290eb = 4: 957c290eb Add attribute link support
5: f9958ef94 ! 5: 00aaad573 Link dashboards/homepages to saved searches they include
@@ -29,10 +29,9 @@
}
@@
- return ( 0, $self->loc('Permission Denied') );
}
-- # Get values even if current user doesn't have right to see
+ # Get values even if current user doesn't have right to see
- $args{'RecordTransaction'} //= 1 if $self->__Value('Name') =~ /^(?:SavedSearch|Dashboard|Subscription)$/;
+ my $name = $self->__Value('Name');
+ my @links;
@@ -43,7 +42,6 @@
+ push @links, @{ $self->DependedOnBy->ItemsArrayRef };
+ }
-+ # Get values even if current user doesn't have right to see
+ $args{'RecordTransaction'} //= 1 if $name =~ /^(?:SavedSearch|Dashboard|Subscription)$/;
$RT::Handle->BeginTransaction if $args{'RecordTransaction'};
@@ -68,6 +66,15 @@
return $uri->URIForObject($self);
}
++
++=head2 _SyncLinks
++
++For dashboard and homepage attributes, keep links to saved searches they
++include up to date. It does nothing for other attributes.
++
++Returns 1 on success and 0 on failure.
++
++=cut
+
+sub _SyncLinks {
+ my $self = shift;
6: 4450ffb6b = 6: 4dad4d797 Add upgrade step to link dashboards/homepages to user saved searches they have
7: abf07c231 = 7: d5da3e19b Add $LinkTarget param to ShowUser to specify the target
8: 3a4e33838 ! 8: 9090c90fb Confirm before deleting saved searches that are depended on by others
@@ -10,7 +10,7 @@
<input type="submit" class="button" name="SavedSearchRevert" value="<%loc('Revert')%>" />
% }
-<input type="submit" class="button" name="SavedSearchDelete" value="<%loc('Delete')%>" />
-+<input type="submit" class="button <% $Object->DependedOnBy->Count ? 'confirm' : '' %>" name="SavedSearchDelete" value="<%loc('Delete')%>" />
++<input type="submit" class="button <% $Object && $Object->Id && $Object->DependedOnBy->Count ? 'confirm' : '' %>" name="SavedSearchDelete" value="<%loc('Delete')%>" />
% if ( $AllowCopy ) {
<input type="submit" class="button" name="SavedSearchCopy" value="<%loc('Save as New')%>" />
% }
9: d2fdc4b34 = 9: 603a8ecfc Include related links for attribute serialization
More information about the rt-commit
mailing list