You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, we are on v4 of the plugin and on 13.7 of Rock.
I'm told these are stock values by our team so I'm assuming this affects more than just us... I found sorting by the Person To Visit or the Notified By fields on the Hospitalization List page would fail and throw an error:
Error
At least one object must implement IComparable.
at System.Collections.Comparer.Compare(Object a, Object b)
at System.Linq.EnumerableSorter`2.CompareKeys(Int32 index1, Int32 index2)
at System.Linq.EnumerableSorter`1.QuickSort(Int32[] map, Int32 left, Int32 right)
at System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count)
at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()
at System.Linq.Enumerable.<SkipIterator>d__31`1.MoveNext()
at System.Linq.Enumerable.<TakeIterator>d__25`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Rock.Web.UI.Controls.Grid.SetLinqDataSource[T](IQueryable`1 qry) in C:\Github\Rock13\Rock\Web\UI\Controls\Grid\Grid.cs:line 1531
at RockWeb.Plugins.org_secc.PastoralCare.HospitalList.BindGrid()
at Rock.Web.UI.Controls.Grid.OnGridRebind(GridRebindEventArgs e) in C:\Github\Rock13\Rock\Web\UI\Controls\Grid\Grid.cs:line 3996
at Rock.Web.UI.Controls.Grid.RebindGrid(EventArgs e, Boolean disablePaging, Boolean isExporting, Boolean isCommunication) in C:\Github\Rock13\Rock\Web\UI\Controls\Grid\Grid.cs:line 2835
at Rock.Web.UI.Controls.Grid.Grid_Sorting(Object sender, GridViewSortEventArgs e) in C:\Github\Rock13\Rock\Web\UI\Controls\Grid\Grid.cs:line 1627
at System.Web.UI.WebControls.GridView.HandleSort(String sortExpression, SortDirection sortDirection)
at System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup)
at Rock.Web.UI.Controls.Grid.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) in C:\Github\Rock13\Rock\Web\UI\Controls\Grid\Grid.cs:line 3958
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I looked into the code and found the SortExpression could be updated for both fields to fix this as such:
OPEN:
HospitalList.ascx
FIND: <Rock:PersonField DataField="PersonToVisit" HeaderText="Person To Visit" SortExpression="Person.LastName" />
REPLACE WITH: <Rock:PersonField DataField="PersonToVisit" HeaderText="Person To Visit" SortExpression="Person.Name" />
Hi, we are on v4 of the plugin and on 13.7 of Rock.
I'm told these are stock values by our team so I'm assuming this affects more than just us... I found sorting by the Person To Visit or the Notified By fields on the Hospitalization List page would fail and throw an error:
I looked into the code and found the SortExpression could be updated for both fields to fix this as such:
OPEN:
HospitalList.ascx
FIND:
<Rock:PersonField DataField="PersonToVisit" HeaderText="Person To Visit" SortExpression="Person.LastName" />
REPLACE WITH:
<Rock:PersonField DataField="PersonToVisit" HeaderText="Person To Visit" SortExpression="Person.Name" />
FIND:
<Rock:RockBoundField DataField="NotifiedBy" HeaderText="Notified By" SortExpression="NotifiedByRoom"></Rock:RockBoundField>
REPLACE WITH:
<Rock:RockBoundField DataField="NotifiedBy" HeaderText="Notified By" SortExpression="NotifiedBy"></Rock:RockBoundField>
The text was updated successfully, but these errors were encountered: