*************************************** LabGraphs & Reports add-on Changelog *************************************** 
LabGraphs & Reports add-on Changelog per year: 2024 / 2025 / 2026
************** 2024 **************
# 2024-03-12
    - INIT: Addon initialization

# 2024-07-03/05
    - ADDED: Display charts with Query Builder data - v0.4
    - ADDED: Query Builder missing fields management
    - ADDED: Built-in missing fields management

# 2024-07-30
    - ADDED: Added nb records created graph - v0.5

# 2024-08-01
    - FIXED: lic_ws fix

# 2024-09-11
    - CHANGED: Refactored graph creation to integrate live preview, preview query builder graph - v0.6
    - ADDED: Filter on custom range on graph preview

# 2024-09-12
    - ADDED: Can now set some data filters on graph creation & preview (built in mode, lines bars graphs) - v0.7

# 2024-09-17/19
    - ADDED: Templates & new date filters - v0.8 - v0.9
    - ADDED: Can now choose image or dynamic graph for templates URL, can save date filter period after selection in view
    - ADDED: Template URL modal now manages default and custom select values
    - ADDED: Filters and templates for preset
    - ADDED: Added genotype strains default field in filters

# 2024-09-25/27
    - ADDED: Added Project code to filters & templates for lines and bars graphs, improved template URL display modal - v1.0
    - ADDED: Added Project code to pie and donut graphs data selection
    - FIXED: Remove filters when graph is removed
    - ADDED: Added Project code to filters & templates for pies and donuts
    - ADDED: Remove a template
    - CHANGED: Refactored Querybuilder fields configuration in DB and in classes to harmonize with other special fields, fixed fields display_order bug - v1.001
    - ADDED: Added Keeper to filters & templates
    - CHANGED: Graph/template creation button is now in main menu
    - FIXED: New graph created is now sortable

# 2024-09-30
    - ADDED: Graph creation: on filter selection, display a select with values if filter has predefined values

# 2024-10-01
    - ADDED: Graph edition and update - v1.002

# 2024-10-03
    - ADDED: Boxplot and violin graphs, working for types field, select, date, datetime, project code - v1.003
    - ADDED: Added experimental parameter to_blob=1 to graph short url, to return image blob as text only

# 2024-10-08
    - ADDED: Multi Y axis for line, bar, boxplot, violin graphs - v1.004
    - ADDED: Graph duplication (in graph menu)

# 2024-10-14/16
    - ADDED: View for LC record - v1.005
    - ADDED: Templates edition, improved templates list
    - ADDED: On View setup modal, added an option to choose if graphs are removed or transfered to another view, on view deletion

# 2024-11-20
    - ADDED: Graphs on Chemicals Lots - v1.006

# 2024-11-29
    - ADDED: Dynamic filters on graphs and templates, refactored external tab for LC to use ajax - v1.007

# 2024-12-04
    - ADDED: Dynamic filters in get.php URL, show dynamic filters in template popin

# 2024-12-09/13
    - ADDED: New type table - v1.008
    - ADDED: Added field type autocomplete for filters and templates, fixed bugs, fixed warnings - v1.009
    - ADDED: Added field type autocomplete for pies and donuts
    - ADDED: Added field type link for tables

# 2024-12-17/18
    - FIXED: Fixed JS error on graph preview
    - ADDED: Copied tooltip on copy click - v1.010
    - CHANGED: Tables ordered by date DESC
************** 2025 **************
2025-01-06
    - ADDED: Last n points for tables - v1.011

2025-01-15
    - FIXED: Fixed some problems on last n points on type table
    - FIXED: Fixed some problems on last n points on linear and class graphs

2025-01-22/24
    - CHANGED: Refactored data retrieval to be more generic and evolutive
    - ADDED: Table sorting on basic data, custom select and yes_no fields, project_code
    - ADDED: Table sorting on sample_type, org, keeper/author/main_operator - v1.012
    - ADDED: add ReportBuilder
    - BUG: Error getting lab information ReportBuilder
    - BUG: Remove ReportBuilder license - v1.1
    - ADDED: Added boxplot and violin graphs for query builder
    - ADDED: Added table & table sorting for query builder - v1.101

2025-01-27/31
    - BUG: Avoid XSS attacks from printing data (ReportBuilder) (DEV-742)
    - CHANGED: When a QB field has no legend, take the field name to avoid empty name 
    - CHANGED: In table view, show ASC button first and DESC second
    - ADDED: Added filters, dynamic filters, and templates for query builder graphs
    - CHANGED: Silent errors when graph is shown directly by URL - v1.102

2025-02-04/07
    - CHANGED: Improved preset: changed sum_records_created to sum_by, and can now sum on every field - v1.103
    - BUG: Incorrect display of field names due to HTML entities (ReportBuilder) (DEV-816)
    - CHANGED: Updated element titles (ReportBuilder) (DEV-816)
    - CHANGED: Restricted advanced header to allow only one option (ReportBuilder) (DEV-816)
    - BUG: Fixed distortion of the default logo (ReportBuilder) (DEV-816)
    - CHANGED: Light table styles when showed by URL call
    - ADDED: Added a setup page with palette management, only one default palette for now - v1.104

2025-02-10/13
    - BUG: Fixed project code retrieval on table graphs
    - BUG: Fixed template url in popin when multiple filters
    - CHANGED: Major upgrade for dompurify (DEV-825)
    - ADDED: Templates without link to module now appears in LC record tab and show all module points with sample template field value than opened record - v1.105
    - CHANGED: Template URL page now uses assets with absolute path
    - BUG: Error printing preview (ReportBuilder) (DEV-828)
    - ADDED: Display fields on footer (ReportBuilder) (DEV-828)
    - ADDED: In LC labgraphs tab, highlight record point on graph (line, bar, table)
    - CHANGED: Improve UX (ReportBuilder)
    - CHANGED: Now templates are attached to a view, and so can be duplicate from view - v1.106
2025-02-19/21
    - ADDED: Can now choose Y axis for Sum By preset, summing values instead of summing records rows
    - FIXED: Fixed last N points save on the fly bug
    - FIXED: Fixed multiple warnings
    - CHANGED: get.php now rendering strictly minimum css and js files as needed - v1.107
    - ADDED: License management: default 30d demo for report builder, limit 5 graphs (line/bar) and 1 template - v1.108
    - CHANGED: Now on click on create graph menu button, redirect to homepage and automatically open the popin
    - FIXED: Fixed a bug on pie/donut charts when data used is keeper/main_operator/author
    - FIXED: Fixed a bug on users/groups data filtering

2025-02-25
    - ADDED: Added new graph type radar for built-in graphs, working with templates and data CSV export - v1.109

2025-02-25
    - ADDED: Allow add and remove columns table element Report Builder (DEV-837)
    - BUG: Allow save custom elements report builder (DEV-893)
    - ADDED: Synchronize module header changes (DEV-895) - v1.110
- ADDED: Added radar graphs for data from query builder, and fixed potential bug on built in radar
    - ADDED: use fields as values custom elements report builder (DEV-894)
    - CHANGED: Refactored query builder graphs filtering
    - CHANGED: Updated Chartjs from 4.4.4 to 4.4.8 and boxplot and annotations plugins
    - BUG: Error displaying data when group by selected report builder
    - BUG: custom fields printing empty values report builder

2025-03-06  
    - ADDED: added image element ReportBuilder (DEV-912)
    - ADDED: added page break element ReportBuilder (DEV-911)
    - BUG: Wrong display when no data found from data source ReportBuilder
    - BUG: Error when clicking to back to datasource selections ReportBuilder
    - BUG: prevent unnecessary page refreshes and improve performance ReportBuilder
    - BUG: restart states when no datasource selected ReportBuilder
    - BUG: Wrong display selecting element ReportBuilder
    - BUG: Add missing field database ReportBuilder - v1.111 (DEV-935)
    - BUG: Error getting data using Local QueryBuilder (DEV-941)
    - BUG: Resolved an issue preventing module activation (DEV-946)
    - BUG: Wrong display preview ids (DEV-950)
    - ADDED: Prevent users from leaving the page without saving ReportBuilder (DEV-933)
    - BUG: Temporal image was not deleted ReportBuilder
2025-03-14   
    - BUG: Line break doesn't work on elements ReportBuilder
    - BUG: wrong display custom fields when no preview value selected

2025-03-18
    - ADDED: Labgraphs API to return graph list by owner (DEV-980) - v1.112
    - BUG: Remove library html2pdf (DEV-997)
    - ADDED: New printing mode (DEV-997)

2025-03-20
    - FIXED: Fixed fatal on template popin: display values used in data - v1.113

2025-03-25/27
    - BUG: dont save when no datasource selected (ReportBuilder)
    - BUG: Incorrect page height calculation in ReportBuilder
    - BUG: Corrected validation for adding elements in ReportBuilder
    - BUG: Printing empty table ReportBuilder
    - BUG: delete editable box inside table (ReportBuilder)
    - BUG: Error Changing table alignment (ReportBuilder)
    - BUG: When a admin is full acess (no group), he now sees all data from user
    - BUG: When a graph is shared, now filters are also duplicated - v1.114
    - FIXED: Fixed critical Potential SQL injection via string-based query concatenation (DEV-1031) - v1.115

2025-03-31
    - ADDED: added Labgraph element ReportBuilder (DEV-981)
    - BUG: display empty paragraph element ReportBuilder

2025-03-02/03
    - FIXED: Fixed some encoding problems
    - ADDED: Proportional legend when direct call

2025-04-03
    - FIXED: wrong display text drag and drop fields on preview (ReportBuilder)
    - FIXED: Improve labgraphs element (ReportBuilder)
    - FIXED: Error switching beetween models (ReportBuilder)

2025-04-08
    - FIXED: Error editing table content (ReportBuilder)
    - FIXED: Individual configuration was not working (ReportBuilder)
    - FIXED: Remove templates of labgraph list (ReportBuilder)

2025-04-14
    - FIXED: Previously added elements are removed when selecting the data source (ReportBuilder)
    - FIXED: Incorrect images display on header (ReportBuilder) (DEV-1092)
- FIXED: Error when adding element after datasource elements (ReportBuilder)
    - FIXED: Duplicated elements when loading template (ReportBuilder)

2025-05-05/06
    - FIXED: LabGraph element table now correctly retains formatting configuration (ReportBuilder)
    - FIXED: Allow multi print from labcollector (ReportBuilder) (DEV-1107)
    - ADDED: French translations - v1.116
    
2025-05-07/09
    - FIXED: Prevent users from leaving the page without saving (ReportBuilder) (DEV-933)
    - FIXED: Error json encode "Malformed UTF-8 characters, possibly incorrectly encoded"

2025/12/05
    - ADDED: added translations to ReportBuilder

2025-05-15/16
    - FIXED: Incorrect API encoding characters
    - ADDED: New option table_remove_empty_data=0|1 to remove empty columns/lines, new option silent_no_data=0|1 to show/hide graph has no data message (DEV-1158) - v1.117
    - ADDED: Allow use graph templates on report (ReportBuilder)
2025-05-26/28
    - ADDED: display of cage and crossing animals (ReportBuilder)
    - ADDED: graph/table display when there is no data (ReportBuilder)
    - ADDED: add new elements (ReportBuilder)
    - ADDED: make dynamic footer (ReportBuilder) - v1.118
    - BUG: Error creating new models (ReportBuilder)
    - BUG: Error displaying add structure popup (ReportBuilder)

2025-06-17
    - ADDED: record sorting ascending AND descending DEV-1196 (ReportBuilder)
    - ADDED: allow to hide duplicated results from datasource (ReportBuilder)
2025-06-24/25
    - ADDED: Add single LC module as datasource DEV-989 (ReportBuilder)
    - BUG: Error filtering data from labcollector (ReportBuilder)
    - BUG: When printing, I took into account the zoom of the page (ReportBuilder)
    - BUG: When printing multiple ids last value display on all documents (ReportBuilder)

2025-07-17
    - BUG: Dynamic tag appears in body but not header (ReportBuilder) (DEV-1310)
    - BUG: Margin issues releated to Opening a Labgraph template (ReportBuilder) (DEV-1308/DEV-1309)
    - BUG: Error loading labgraph element when is type table (ReportBuilder)
    - BUG: Error when element is selected and then change model (ReportBuilder)
    - BUG: Error when getting configuration with special characters inside (ReportBuilder)

2025-07-22/23
    - ADDED: Preserve QueryBuilder field order (ReportBuilder)
    - BUG: Issue preventing deletion of tables from LabGraph elements in ReportBuilder
    - BUG: Issue preventing "LabGraph elements" from loading when a row contains multiple graphs in ReportBuilder
    - BUG: Display message when no data to display for graphs from Labgraphs in ReportBuilder
    - BUG: Add missing translations ReportBuilder
    - ADDED: Added the ability to add columns to the left and right in the visual editor ReportBuilder
    - BUG: Incorrect display ReportBuilder
2025-08-18
    - BUG: unique file name with timestamp is not respected
    - ADDED: option to duplicate report model (DEV-1363)
    - BUG: Wrong margin sizes (ReportBuilder)
    - BUG: Error adding individual configuration on table Element (ReportBuilder) - v1.119

2025-09-09
    - BUG: Filename does not match in file vs as filename ReportBuilder (DEV-1413)

2025-09-11/15
    - ADDED: Added public graphs - v1.120
    - FIXED: Disable view setup on shared graphs tab
    - FIXED: Fixed SQL error (DEV-1434)

2025-10-09
    - FIXED: API now also returns public charts - v1.121 
    - ADDED: license validation (ReportBuilder)
    - ADDED: support tables as field on datasource (ReportBuilder)
    - FIXED: improve license validation (ReportBuilder)

2025-10-13
    - BUG: Incorrect field value in drag and drop (ReportBuilder)

2025-10-29/30
    - ADDED: In a graph, add record label on points and allow to click when a point is related to a record (DEV-1563) - v1.122
    - FIXED: Fixed a bug on graph update when graph is public
    - FIXED: Always redirect on license page when it's not valid

2025-11-05/6
    - FIXED: Added text field type in QB graphs filters & CSS fixes 
    - FIXED: Added filters for QB graphs in graphs API
    - FIXED: Display public templates in templates list, other users than owner cannot edit nor remove - v1.123
    - CHANGED: Added query builder url in api response
    - CHANGED: Added support for template LG using QueryBuilder (ReportBuilder)

2025-11-17/20
    - FIXED: model dont display if querybuilder link not valid (ReportBuilder)
    - ADDED: Add option for data to be grouped or individual (ReportBuilder DEV-1565) - v1.124
    - CHANGED: Optimized QB loading on graph creation, fixed multiple CSS fixes
2025-11-26
    - FIXED: use new field uniqueId from QueryBuilder - v1.1241

2025-11-28
    - ADDED: Added logs on graph share - v1.125
    - ADDED: Format table dates as configured in LC - v1.126

2025-12-04/05
    - FIXED: Prevent field duplicate error with preset graphs
    - FIXED: Incorrect header datasource ReportBuilder
    - FIXED: Incorrect file name export ReportBuilder
    - FIXED: change format of file name timestamp ReportBuilder
    - CHANGED: handle loading of elements ReportBuilder
    - FIXED:  incorrect options values on template configuration labgraph elements ReportBuilder
    - CHANGED: Improve labgraph element ReportBuilder
    - ADDED: Allow to plot with record IDs on x-axis (DEV-1600)
    - FIXED: Removed var_dump uses to avoid security warnings
    - FIXED: Fixed daterangepickers display - v1.127

2025-12-11
    - FIXED: Non–superadmin users couldn't view document preview because the token was validated only against their own available queries. The validation now checks against all existing tokens, ensuring proper access (ReportBuilder)
2025-12-16
    -FIXED: Error loading queries with invalid tokens

2025-12-22
    -FIXED: incorrect rendering of template-type graphs (ReportBuilder)

************** 2026 **************

2026-01-06
    -FIXED: Graphs display incorrectly when multiple IDs are selected (ReportBuilder)
-FIXED: An error occurred when selecting fields and dragging and dropping values with the LC Modules datasource type. This was caused by the output format not being updated to align with recent evolutions in the QueryBuilder (ReportBuilder)
    -FIXED: The model list is not refreshed after cloning or creating a model (ReportBuilder)
    -FIXED: Enhance loading performance for the LC Modules datasource by limiting the result set (ReportBuilder)
    -FIXED: graphs not loading when module as data source (ReportBuilder)

2026-01-12
    -FIXED: Fixed graph loading error in ReportBuilder when no data template filter is selected
    -FIXED: Load template only when SOMO filter is enabled to avoid excessive memory usage.

2026-01-19
    -FIXED: Empty rows no longer appear in the LabGraph table (ReportBuilder)
    -FIXED: Exported filenames no longer include timestamps (ReportBuilder)
2026-01-23
    - FIXED: Fixed potential SQL injection (DEV-1693) 

2026-02-11/12
    FIXED: Resolved layout rendering issues where elements were not loading or were incorrectly measured, causing display inconsistencies (ReportBuilder).
    IMPROVED: Optimized overall loading performance of reports (ReportBuilder).
    ADDED: Implemented caching system for LabGraph graph data to reduce redundant API calls and improve graph rendering speed (ReportBuilder).
    ADDED: Introduced concurrency control mechanism for graph API requests to prevent overload and ensure stable performance (ReportBuilder).
    BUG: Error loading animal module datasource (ReportBuilder).
    BUG: Prevent infinite re-render loop caused by image dimension calculation (ReportBuilder)

2026-02-18
    - CHANGED: Updated UI for alert messages on LabGraphElement (ReportBuilder)

2026-02-24
    - CHANGED: Implemented helpful tooltips for better user guidance and added new action buttons to enhance functionality
    
2026-02-25
    - ADDED: New endpoint getChartsOptions.php to retrieve multiple charts options quickly to put in reports (DEV-1753)

2026-03-16/17
    - CHANGED: upgrade dependencies and resolve vulnerabilities (ReportBuilder)
    - ADDED: Added agent for graph creation automation - v1.128
    - FIXED: Adapted creation modal when LC sidebar is full open
    - IMPROVEMENT: Graph creation agent now taking custom date in account

2026-03-20
    - IMPROVEMENT: AI Assistant (ReportBuilder)  - v1.129
2026-04-01
    - IMPROVEMENT: Add option to save on document module ReportBuilder (DEV-1410)

2026-04-08
    - IMPROVEMENT: ReportBuilder now includes the Project Code field
    - IMPROVEMENT: ReportBuilder now supports the Autocomplete field type.

2026-04-14
    - IMPROVEMENT: Improved UI model name is now fully displayed without truncation or ellipsis.
    
2026-04-20/22
    - FIXED: Multiple fixes on templates queries - v1.130
    - FIXED: Improved AI compatibility to align with the latest framework updates ReportBuilder
    - FIXED: Fixed error in template edition

2026-04-23
    - FIXED: Fixed an issue where graph configurations were not displaying correctly in Report Builder.

2026-05-12
    - FIXED: issue where temporary UI IDs could be duplicated and mistakenly persisted to the database, causing duplicated elements to appear in the interface. Temporary client-side IDs are now properly excluded from persistence logic, preventing duplicate records and ensuring consistent UI state.

2026-05-18
    - FIXED: Error loading preview ReportBuilder
    - ADDED: new element "datalogger chart"  ReportBuilder
    - ADDED: new element "badge"  ReportBuilder
    - FIXED: Error loading graphs ReportBuilder
    - IMPROVEMENT: added predefined model for tables on ReportBuilder
    - ADDED: new element "Divider"  ReportBuilder
    - ADDED: new element "Spacer"  ReportBuilder
    - ADDED: new element "Stat card"  ReportBuilder
    - ADDED: new element "Icon label"  ReportBuilder
    - ADDED: new element "Alert"  ReportBuilder
    - ADDED: conditional display elements ReportBuilder
2026-05-20
    - FIXED: fixed security issues

2026-05-21/22
    - FIXED: DOM XSS in graph share user autocomplete and language file loading when session lang_lc has no matching module lang file (DEV-1979)
    - IMPROVEMENT: add "details" menu on header and footer ReportBuilder
    - IMPROVEMENT: add more options on "number page" element
    - FIXED: Fixed boxplot with chemical lot error

2026-05-29
    - FIXED: Update dependencies reportBuilder

2026-06-02
    - ADDED: new option to select multiple modules as datasource

2026-06-16
    - CHANGED: Changed graphs layout from float to flex to avoid infinite animation

2026-08-24
    - FIXED: proactive security issues fix

2026-08-25
    - FIXED: Moving a shared graph to another view had no effect (DEV-2197)
    - FIXED: Public and shared graphs did not appear in Report Builder or print (DEV-2198) - v1.131

2026-09-03
    - FIXED: proactive security issue fix (DEV-2217)

2026-09-08
    - FIXED: RB: Fixed not persisted data source, fixed multiple bugs, and warning modal - v1.132

2026-09-09
    - FIXED: RB: Migrate report model field tokens to field_unique_id ({id}-c / {id}-d) - v1.133

2026-09-11
    - FIXED: dependency security update

2026-09-17
    - ADDED: RB: Extra rows and columns on tables
    - ADDED: RB: Massive UX improvements
    - FIXED: Sum-by graphs crashed with a SQL syntax error when the X field could not be resolved (empty SELECT / ORDER BY ASC) - v1.134
    - ADDED: Edit button on missing-fields graph error

2026-09-21
    - FIXED: RB: XSS finding on v-html in JoEditableText — DOMPurify sanitizer is now called from the template

2026-09-23 /25
    - IMPROVEMENT: RB: Search a graph, graph takes available space, error markers when too large, button to fit to col width
    - FIXED: RB: Fixed module print data source bug & blank space bug

2026-09-29
    - FIXED: RB: Removed data source extra column stays removed after save
    - FIXED: RB: The lab logo in a new header has bug on its height

2026-10-02
    - FIXED: Built-in graph setup no longer fails with a SQL error for staff+ users who only have the full-access group

2026-10-07
    - FIXED: RB: Dependency security update (source-map-js, dompurify) - v1.135