- Notifications
You must be signed in to change notification settings - Fork 4
fix/AB#80830_fields_not_working_in_export #858
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
Conversation
src/utils/files/getRowsFromMeta.ts Outdated
| } | ||
| case 'dropdown': { | ||
| let value: any = get(data, column.field); | ||
| let value: any = get(data, column.field.split('.')[0]); |
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.
@RenzoPrats
I just think you overcomplexified the logic there, but the overall changes are good!
| if (Object.prototype.hasOwnProperty.call(data.data, field)) { | ||
| const meta = data.data[field]; | ||
| const rawColumns = getColumnsFromMeta(meta, params.fields); | ||
| const columns = rawColumns.filter((x) => |
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.
@RenzoPrats
just noticed that this is breaking some of the queries
indeed, the code there put too many fields in the export
# [2.2.0-beta.15](v2.2.0-beta.14...v2.2.0-beta.15) (2023-12-08) ### Bug Fixes * add access tokens to all internal requests ([067bd1c](067bd1c)) * boolean would not correctly be calculated in getFilter ([58dc862](58dc862)) * cloning application would not clone filter & grid options in dashboards ([3162811](3162811)) * could not always get fields from ref data ([32e83d4](32e83d4)) * incorrect display of date fields in export & history ([#857](#857)) ([5262f8b](5262f8b)) * reference data not getting exported ([#858](#858)) ([24ad915](24ad915))
# [2.2.0](v2.1.11...v2.2.0) (2023-12-08) ### Bug Fixes * ability on records could fail due to missing resource ([b217df1](b217df1)) * add access tokens to all internal requests ([067bd1c](067bd1c)) * Add default values for gridOptions in DashboardType to prevent unwanted results when going from one dashboard to another one ([#844](#844)) ([f48459f](f48459f)) * added sorting on id field to avoid having missing records ([#842](#842)) ([935fe1b](935fe1b)) * api configuration would incorrectly save edit api configuration auth type ([e97a8d7](e97a8d7)) * API edit mutation could fail because of incorrect check of arguments ([00b0e0d](00b0e0d)) * audience would not be available ([4e76800](4e76800)) * boolean would not correctly be calculated in getFilter ([58dc862](58dc862)) * build issue after 2.x.x merge ([1d48814](1d48814)) * build would fail due to incorrect default value for auth audience ([8985cc0](8985cc0)) * calculated fields in resource question breaking search in grid ([c5287eb](c5287eb)) * check record trigger would break build ([06691dd](06691dd)) * client flow authentication would not work due to incorrect update when migrating mongoose version ([18a4683](18a4683)) * cloning application would not clone filter & grid options in dashboards ([3162811](3162811)) * code could not compile ([5699e03](5699e03)) * contains filter not working if value is single ([b7e5558](b7e5558)) * could not always get fields from ref data ([32e83d4](32e83d4)) * could not download application with existing name ([#795](#795)) ([c9f9d8a](c9f9d8a)) * could not get canUpdate / canDelete on meta ([323330a](323330a)) * could not get map data due to incorrect id check ([6906c21](6906c21)) * could not load datasources in layers ([9e1b841](9e1b841)) * dashboard queries would take too much time if context ([7783bff](7783bff)) * disable custom notifications scheduler to prevent system to crash ([00c3e22](00c3e22)) * Download file method would break due to missing file destination ([aac3f63](aac3f63)) * download file would sometimes not throw correct error or resolve request ([46e2cc6](46e2cc6)) * download of template for records upload would query records even if not needed ([b263bdb](b263bdb)) * editing a dashboard inside a workflow could cause unexpected type issue due to incorrect error handling ([75ccd9a](75ccd9a)) * editRecord could break if previous version did not have any data ([85a2d5c](85a2d5c)) * editRecord would not correctly check non editable fields ([#815](#815)) ([5ca7717](5ca7717)) * error on fetching records with no data ([4986e1d](4986e1d)) * filtering records on form name would break query ([c2d8e58](c2d8e58)) * geofiltering would break layers if empty ([c22a882](c22a882)) * gis/feature route was broken due to incorrect layout / aggregation setup ([7a3cdd7](7a3cdd7)) * grant ability to read api configuration & reference data to all records ([d45c394](d45c394)) * graphQL queries would be cached by proxy ([1dd9fba](1dd9fba)) * in some edge cases, dashboard structure would be incorrectly passed in graphql ([#817](#817)) ([2a5866e](2a5866e)) * inccorect filter in getautoassigned role ([41a0143](41a0143)) * incorrect audience settings ([9c8e710](9c8e710)) * incorrect display of date fields in export & history ([#857](#857)) ([5262f8b](5262f8b)) * incorrect mutation to set filter at dashboard level ([2d57100](2d57100)) * incorrect names for some matrix questions ([1fedb51](1fedb51)) * incorrect sorting on api configurations ([#852](#852)) ([1260ceb](1260ceb)) * incorrect timezone in calculated fields. Now enforcing user timezone ([296aab4](296aab4)) * issue with layers using lat lng fields ([88f75f6](88f75f6)) * layer input could not allow saving of heatmap layer ([6da8988](6da8988)) * layers using lat & long could break popup ([#722](#722)) ([70217f5](70217f5)) * matrix in grid and summary card not correctly saved in db ([#748](#748)) ([e37b342](e37b342)) * number question values, when saved as string, would not match in filters ([#774](#774)) ([2dc18ec](2dc18ec)) * ping request using cache and decrypting twice ([#826](#826)) ([14b26c4](14b26c4)) * prevent any default field to be used in a form ([6e52fda](6e52fda)) * prevent contextual content in pages to be duplicated ([926f476](926f476)) * pulljobs failing would crash server ([e416ee5](e416ee5)) * redis client error ([2c45593](2c45593)) * reference data not getting exported ([#858](#858)) ([24ad915](24ad915)) * reference data query not working due to incorrect cursor pagination ([96d7298](96d7298)) * some layers would not work due to incorrect geoField ([f409b1c](f409b1c)) * some permissions issues when not admin ([794683d](794683d)) * updated layer model to also saves popup fields info ([#670](#670)) ([eb43289](eb43289)) * upload would fail most of the time for tagbox / checkbox questions ([243f77d](243f77d)) * users roles not appearing in applications ([#835](#835)) ([d05d061](d05d061)) * users who can edit application can now delete the steps & pages ([cf130ce](cf130ce)) * using size operator on nullish values in aggregations on records ([#836](#836)) ([5eca1c7](5eca1c7)) ### Features * Ability to save draft record ([#802](#802)) ([d1b1e3b](d1b1e3b)) * add auth code APIs ([#789](#789)) ([20ff5d8](20ff5d8)) * add contextual filtering ([0a734e2](0a734e2)) * add dashboard buttons to schema ([fe7bd55](fe7bd55)) * add new route of scss conversion to css ([691794d](691794d)) * allow caching of more API requests ([#825](#825)) ([105f0a5](105f0a5)) * allow draft edition of records ([32148b1](32148b1)), closes [feat/AB#65023](https://github.com/feat/AB/issues/65023) * Allow MultiPoint and MultiPolygon on layer features ([514d3ee](514d3ee)) * allow single widget page ([53762f4](53762f4)) * can now archive application pages and restore them ([a76928a](a76928a)) * can now edit page / step 's icons ([#749](#749)) ([30bb81c](30bb81c)) * can now group layers ([074cb2b](074cb2b)) * can now hide application menu by default ([2519344](2519344)) * can now query historical data ([#752](#752)) ([75b1c8a](75b1c8a)) * can now sort aggregations on records ([a09f2c8](a09f2c8)) * can now use infinite aggregations ([3f190d4](3f190d4)) * can save custom grid options per dashboard ([#824](#824)) ([8779433](8779433)) * cluster layers now support new options ([#757](#757)) ([f9b58b3](f9b58b3)) * get draft data from single record custom query, by passing data argument ([509b670](509b670)) * now use filter at dashboard level ([#834](#834)) ([6b3f4e9](6b3f4e9)) * possibility to hide pages' ([f5ca2e6](f5ca2e6)) * query of polygon features on map ([fc33c06](fc33c06))
Description
Fixed: On export grid some fields like dropdown and tagbox was not appearing.
Useful links
ticket
Type of change
How Has This Been Tested?
It has been tested creating forms with different kind of fields, adding some data to it, creating a layout and trying to export this data to see if it's working correctly.
Screenshots
Checklist:
( * == Mandatory )