Bug 1893924 - Tabular reports return blank tables #2241
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Second try at fixing this the correct way.
What was happening is when a single table of the report was being rendered, report.cgi was setting the table name to " " which the JS changes didn't like. So I now set the table name to "single" and look for that instead of " ". This fixes one issue occurring. On the same note there was also an issue with table identifiers have spaces in the names which I had to remove otherwise the tables were misrendered.
Another issue was that linkify and linkifyTotal formatters were not getting the column name value properly and only the row name and count. By passing in $column element (a ) to the formatters I am able to access the column and name and remove the undefined values showing up in the links to buglist.cgi.
And lastly, a third issue was when displaying multiple tables on a single report. The tables had data appearing in the wrong places when the JS was rendering them since each table was not distinct and was using the same "report_table" identifier. Changing to "report_table_[% tbl_id FILTER html %]" made each one distinct and all were rendered properly.