Page MenuHomeIn-Portal Phabricator

INP-1685 - Handle date fields during CSV import
ClosedPublic

Authored by alex on Mar 13 2017, 2:27 PM.

Details

Test Plan

Preparations

  1. login to Admin Console
  2. go to CustomWidgets section
  3. add some records

Part 1 (date field change)

  1. login to Admin Console
  2. go to CustomWidgets section
  3. use Export button on toolbar to export all grid data
  4. confirm, that CSV file was sent back to user and it contains all data shown in grid
  5. open downloaded CSV file
  6. change values in all columns but ID and Image into another valid values
  7. use Import button in grid to import back changed file
  8. confirm, that all changes made in CSV file as shown in grid

Part 2 (date and time field change)

  1. go to IDE
  2. open /modules/custom/units/widgets/widgets_config.php file for editing
  3. in the CreatedOn field declaration comment out lines that change format and input_format field options
  4. login to Admin Console
  5. go to CustomWidgets section
  6. use Export button on toolbar to export all grid data
  7. confirm, that CSV file was sent back to user and it contains all data shown in grid
  8. open downloaded CSV file
  9. change values in all columns but ID and Image into another valid values
  10. use Import button in grid to import back changed file
  11. confirm, that all changes made in CSV file as shown in grid

Part 3 (grid format override)

  1. go to IDE
  2. open /modules/custom/units/widgets/widgets_config.php file for editing
  3. in the CreatedOn field declaration comment out lines that change format and input_format field options
  4. in the CreatedOn column declaration in grid add format option with Y-m-d H:i:s value
  5. login to Admin Console
  6. go to CustomWidgets section
  7. confirm, that date in CreatedOn column is displayed using format specified before
  8. use Export button on toolbar to export all grid data
  9. confirm, that CSV file was sent back to user and it contains all data shown in grid + value for CreatedOn column is formatted the same as in grid
  10. open downloaded CSV file
  11. change values in all columns but ID and Image into another valid values
  12. use Import button in grid to import back changed file
  13. confirm, that all changes made in CSV file as shown in grid

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 693
Build 693: arc lint + arc unit

Event Timeline

alex updated this revision to Diff 714.Mar 13 2017, 2:27 PM
alex retitled this revision from to INP-1685 - Handle date fields during CSV import.
alex updated this object.
alex edited the test plan for this revision. (Show Details)
alex added 1 JIRA issue(s): INP-1685.
alex edited edge metadata.Mar 13 2017, 2:28 PM
alex added a project: Restricted Project.
erik requested changes to this revision.Mar 14 2017, 5:29 AM
erik edited edge metadata.

Last test in Part2 not passed. Got validation errors "bad_date_format" on CreatedOn field.

This revision now requires changes to proceed.Mar 14 2017, 5:29 AM
alex edited the test plan for this revision. (Show Details)Mar 15 2017, 3:16 PM
alex edited edge metadata.
alex updated this revision to Diff 715.Mar 15 2017, 3:30 PM
alex edited edge metadata.

For date columns use export format during import as well.

erik accepted this revision.Mar 17 2017, 5:22 AM
erik edited edge metadata.
This revision is now accepted and ready to land.Mar 17 2017, 5:22 AM
This revision was automatically updated to reflect the committed changes.