Skip to content
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

Add columnNumber to ReferenceDataElement #175

Merged
merged 1 commit into from
Nov 2, 2021
Merged

Add columnNumber to ReferenceDataElement #175

merged 1 commit into from
Nov 2, 2021

Conversation

aaronforshaw
Copy link
Contributor

To ensure that after importing a reference data CSV file the data can be displayed in the same column order as the input file:

  • add a zero-based columnNumber property to ReferenceDataElement
  • add database migration script which adds this column, sets the value to 0 for all existing values, and then makes the column not null. Ordering is not applied to existing reference data elements
  • change CSV importer to set columnNumber as it iterates through the column headers
  • update all importers and exporters (CSV, JSON, XML) from assorted versions 3.0, 3.1 to a consistent 4.0 in all cases
  • add a version 4.0 xsd for the XML export
  • add columnNumber property to various .gson and .gml, including in the exporters
  • in cases where it is necessary (API to list ReferenceDataElements and API to list ReferenceDataValues in row format, both of which are consumed by the UI and which I think makes an assumption that results are sorted) ensure that the results are sorted by the new columnNumber attribute. In other places where it seems not necessary, the results are not sorted (but a consumer could choose to sort by the columnNumber property)
  • update lots of test data and specs

Also ran some informal tests with the UI to check results are ordered as expected.

@olliefreeman
Copy link
Contributor

olliefreeman commented Nov 2, 2021

@aaronforshaw you may have missed the messages regarding the weird jenkins behavour there is now a required workflow

  1. push branch
  2. wait for jenkins to pass that branch
  3. open PR

this will prevent the erroneous "branch" build which exist above from being a failure which sometomes happens as we believe the branch build status check then does not appear (this is not conclusively proven though)

@aaronforshaw
Copy link
Contributor Author

aaronforshaw commented Nov 2, 2021

@aaronforshaw you may have missed the messages regarding the weird jenkins behavour there is now a required workflow

  1. push branch
  2. wait for jenkins to pass that branch
  3. open PR

this will prevent the erroneous "branch" build which exist above from being a failure which sometomes happens as we believe the branch build status check then does not appear (this is not conclusively proven though)

@olliefreeman Thanks, I had missed those messages, but anyway that is what I did in this case. (The branch build passed at 14:22 02/11/21)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import Reference Data Model by CSV - Column order wrong
2 participants