New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow reports to specify a column/metadata other than "label" that uniquely identifies a row #20009
Conversation
…iquely identifies a row, and use this in row evolution/label filter for reports where label is not unique.
If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'. |
Moving this out of draft, but at present the only way to test it would be via crash analytics reports, where some reports have non-unique labels. |
That's a nice new addition @diosmosis that will likely come in handy also for other use cases in the future. @sgiehl did you have otherwise any thoughts there? |
…o adding to list of entity ID parameters, allow label filter row ID to be specified by DataTable (for test), and add test for LabelFilter change
Was able to add a test for the LabelFilter test. I don't think it's easily doable to add a test for the UI changes, but they will be covered in the crash analytics UI tests. |
…o into row-identifier-property
Any chance we could get this reviewed soon? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some suggestions for code improvements, otherwise this looks good to me.
Description:
Problem: A report in a plugin needs row evolution to work to provide as much value as possible, but the report does not have unique labels (but does have another column whose values (IDs of a log table) are unique). The current solution would result in incorrect rows being compared.
How this PR works:
This PR adds a property to Report,
$rowIdentifier
, which reports can use to specify a column other than 'label'. LabelFilter now uses this property to determine what row in a report to filter.There are additionally some changes to what label value is in the row evolution popover. In the rowaction JavaScript, we build the display label based on the values displayed in the UI and send this with the row evolution request for the twig template to use. This is required if labelColumn is used and there is no data selected. In this case, there is no way to know what the display value should be based on the data.
Note: this PR will stay as a draft until there is a plugin available that uses the feature.
refs PG-2667
Review