Description
On Behalf of The Woodlands Methodist Church. The Obsidian version of the Account List block that allows reordering accounts does not list all accounts like the previous Account List block does in version 16. Similar issue (#6465) was reported and the fixed. (13e782e). The previous version 16 block would show all accounts not just top level only or children under a specific parent account. (
|
private IQueryable<FinancialAccount> GetAccounts( RockContext rockContext ) |
|
{ |
|
int? parentAccountId = PageParameter( "AccountId" ).AsIntegerOrNull(); |
|
bool topLevelOnly = PageParameter( "TopLevel" ).AsBoolean(); |
|
|
|
if ( parentAccountId.HasValue ) |
|
{ |
|
lActionTitle.Text = "Child Accounts".FormatAsHtmlTitle(); |
|
} |
|
else |
|
{ |
|
lActionTitle.Text = "List Accounts".FormatAsHtmlTitle(); |
|
} |
|
|
|
var accountService = new FinancialAccountService( rockContext ); |
|
SortProperty sortProperty = rGridAccount.SortProperty; |
|
var accountQuery = accountService.Queryable(); |
|
|
|
if ( parentAccountId.HasValue ) |
|
{ |
|
accountQuery = accountQuery.Where( account => account.ParentAccountId == parentAccountId.Value ); |
|
} |
|
else if ( topLevelOnly ) |
|
{ |
|
accountQuery = accountQuery.Where( account => account.ParentAccountId == null ); |
|
} |
|
|
|
string accountNameFilter = rAccountFilter.GetFilterPreference( "Account Name" ); |
|
if ( !string.IsNullOrEmpty( accountNameFilter ) ) |
|
{ |
|
accountQuery = accountQuery.Where( account => account.Name.Contains( accountNameFilter ) ); |
|
} |
|
|
|
int campusId = int.MinValue; |
|
if ( int.TryParse( rAccountFilter.GetFilterPreference( "Campus" ), out campusId ) ) |
|
{ |
|
accountQuery = accountQuery.Where( account => account.Campus.Id == campusId ); |
|
} |
|
|
|
string publicFilter = rAccountFilter.GetFilterPreference( "Public" ); |
|
if ( !string.IsNullOrWhiteSpace( publicFilter ) ) |
|
{ |
|
accountQuery = accountQuery.Where( account => ( account.IsPublic ?? false ) == ( publicFilter == "Yes" ) ); |
|
} |
|
|
|
string activeFilter = rAccountFilter.GetFilterPreference( "Active" ); |
|
if ( !string.IsNullOrWhiteSpace( activeFilter ) ) |
|
{ |
|
accountQuery = accountQuery.Where( account => account.IsActive == ( activeFilter == "Yes" ) ); |
|
} |
|
|
|
string taxDeductibleFilter = rAccountFilter.GetFilterPreference( "Tax Deductible" ); |
|
if ( !string.IsNullOrWhiteSpace( taxDeductibleFilter ) ) |
|
{ |
|
accountQuery = accountQuery.Where( account => account.IsTaxDeductible == ( taxDeductibleFilter == "Yes" ) ); |
|
} |
|
|
|
accountQuery = accountQuery.OrderBy( a => a.Order ).ThenBy( f => f.Name ); |
|
|
|
return accountQuery; |
|
} |
) This is a loss of functionality from the previous block. Woodlands used the functionality of all accounts to be able to reorder the accounts on the giving block. Because of the current functionality the child accounts get orphanded from the parent account on the give page becasue they are not included in the ordering on the account list block.
Actual Behavior
Only top level accounts can be sorted. This orphans the child accounts away from the parent account on the give page when more than one account is shown.
Expected Behavior
All accounts should be able to be sorted to truely be able to organize accounts on the external give page.
Steps to Reproduce
Issue Confirmation
Rock Version
18.3
Client Culture Setting
en-US
Description
On Behalf of The Woodlands Methodist Church. The Obsidian version of the Account List block that allows reordering accounts does not list all accounts like the previous Account List block does in version 16. Similar issue (#6465) was reported and the fixed. (13e782e). The previous version 16 block would show all accounts not just top level only or children under a specific parent account. (
Rock/RockWeb/Blocks/Finance/AccountList.ascx.cs
Lines 242 to 302 in ed98ee6
Actual Behavior
Only top level accounts can be sorted. This orphans the child accounts away from the parent account on the give page when more than one account is shown.
Expected Behavior
All accounts should be able to be sorted to truely be able to organize accounts on the external give page.
Steps to Reproduce
Go to 'https://rock.rocksolidchurchdemo.com/finance/accounts?AccountId=1'
Add a child account to General Fund
Go To 'https://rock.rocksolidchurchdemo.com/page/186' and make sure you see all accounts in the block settings
Go back to the Financial Accoutns page and reorder accounts. 'https://rock.rocksolidchurchdemo.com/page/517?TopLevel=True'
Drag General fund down the list
Go back to the give page 'https://rock.rocksolidchurchdemo.com/page/186' and notice how the 'Test' Account is still listed in second and can not be ordered in the external list
Issue Confirmation
Rock Version
18.3
Client Culture Setting
en-US