Rock icon indicating copy to clipboard operation
Rock copied to clipboard

Obsidian Dynamic data, when sorted by column is duplicating rows

Open kwishard88 opened this issue 1 year ago • 3 comments

Description

When using the Obsidian Dynamic data block, when you go to use any column to sort the rows it ends up duplicating the row instead, when you refresh the page it goes back to the original list view without the duplicates.

Actual Behavior

When you hit to sort button it will sort the rows of data but will also duplicate some rows.

Expected Behavior

When you sort the list it should sort in order of the column, but not add any new rows into the list.

Steps to Reproduce

  1. Create a page with the obsidian Dynamic data block.
  2. I added this SQL into the List to pull a list of giving.

SELECT p.Id, FORMAT(ft.[TransactionDateTime], 'yyyy-MM-dd', 'en-US') AS "Transaction Date", ftd.Amount AS "Gift Amount", fa.[Name] AS "Account Name" FROM FinancialTransactionDetail ftd JOIN FinancialTransaction AS ft ON ft.Id = ftd.TransactionId JOIN PersonAlias AS pa ON pa.Id = ft.AuthorizedPersonAliasId JOIN Person AS p ON p.Id = pa.[PersonId] JOIN FinancialAccount AS fa ON fa.Id = ftd.[AccountId] 3. Save the Page settings. 4. Go to sort the list by "Gift Amount". 5. You can see that it starts to duplicate the rows.

Issue Confirmation

  • [X] Perform a search on the Github Issues to see if your bug or enhancement is already reported.
  • [X] Reproduced the problem on a fresh install or on the demo site.

Rock Version

v16.6

Client Culture Setting

en-US

kwishard88 avatar Oct 22 '24 11:10 kwishard88

@kwishard88 I wasn't able to reproduce duplicate rows displaying when sorting the Gift Amount column on the demo site (v16.6) or on prealpha. I confirmed the number of rows that should return by running the same SQL through the SQL Editor. However, I did notice that the sorting of the 'Gift Amount' column on the obsidian Dynamic Data block isn't working correctly.

It would be greatly appreciated if you could include screenshots of the duplicate rows that are returned and confirm if you can recreate the issue on the demo site.

chead4 avatar Oct 22 '24 16:10 chead4

@chead4 If you go to this page on the Prealpha site.

https://prealpha.rocksolidchurchdemo.com/page/833

This is where I made the test page.

When I sort the gift amount and hit the sort button about 3-4 times you can start to see the UI Will Duplicate in the table.

You can see this when you need to scroll down your page to see them.

I'll add a screen shot Screenshot 2024-10-22 at 12 33 19 PM

kwishard88 avatar Oct 22 '24 16:10 kwishard88

@kwishard88 Thanks so much. That is very helpful.

chead4 avatar Oct 22 '24 16:10 chead4

@kylehenning thanks for fixing this!

kwishard88 avatar Oct 30 '24 17:10 kwishard88

@kwishard88 of course! Thanks for helping us make Rock awesome!

kylehenning avatar Oct 30 '24 17:10 kylehenning