Table of Contents

Session Data Upload

Sessions are stored in the system as custom WordPress posts, that have lots of custom fields. Using a premium plugin, we are able to import the session information en masse for all states, for a given session. NB: the import tool does not recognize the custom fields unless there is at least one Session already in the system. So if you are importing session data for the first time, you'll need to create a Test Session in the GUI first. You can always unpublish your test session after the fact, or delete it, or whatever.

Preparing the Session Data file for upload

Download the Session Data Upload Template file and fill in all the necessary information. Note that the template CSV file has default values in all of the fields, based on the state, session year, and column name. It is expected that most of these fields will be overwritten, and it's acceptable if some fields are blank.

The only core WP field that is used is the page_title field, so there is no content or other standard WP data that needs to be populated. A general outline of the fields we're going to import is below.

Field Description
state Full name of the state. This field is not imported, but is used to construct an external identifier in case the sessions need to be updated.
page_title This is the title of the session, can really be anything but probably best to name it sensibly with the session year and state at least. This is the only core WP field.
session_info The session info field. Assumably this is a text description of the session.
session_year This will either be a single year, or two consecutive years. Assumably the options for this field are culled from the legislation, regulations, and hearings that have been uploaded to the system. Therefore, the value here should match the appropriate option that's in the Capitol Monitor app. Used to construct an external identifier in case the sessions need to be updated.
session_state The 2-letter abbreviation of the state, needs to match what is in the system already.
start_date Session start date in the format 2019-01-01
end_date Session end date in the format 2019-01-01
prefilling
convene_date Format: 2019-01-01
adjourn_date Format: 2019-01-01
crossover_date Format: 2019-01-01
effective_date Format: 2019-01-01
session_archive_date Format: 2019-01-01
additional_session_info
introduction_deadline Format: 2019-01-01
last_day_gubernatorial_action
carryover Either on or off

A note about the date format: for whatever reason, if you save the date from Excel using the baked-in "Date" cell formatting option, the format ends up being 1/1/2019 which will not populate in WP. To combat this, set the cells to "Text" in Excel and format the date as specified above.

Uploading the session data with WP All Import

  1. Go to WP Import > New Import in the left hand admin menu
  2. Click the Upload a File button, and select your CSV file for import
  3. Make sure that the "Import data from this file into..." option is set to New Items, and that you select Session Info from the drop-down list and then continue to Step 2.Import data from this file into
  4. On the screen for Step 2, you can preview the information that is going to be imported. Purportedly, there are options on this step but it is unclear what they are. Continue to Step 3.
  5. Step 3 is where you map the fields in your file to the fields in the database. At the bottom of this screen, you should see a "Load Template" drop down, select the "Session Info" template.
  6. In the Other Session Info Options section on Step 3, set Comments and Trackbacks and Pingbacks to Closed. Eventually we'll probably need to select a Page Template, but we don't know that that is yet. Set Post Status to Published. Everything else can be blank or default.
  7. Click Continue to Step 4 >
  8. Step 4 allows you to select a field or combination of fields to mach on, in case you are uploading a new version of previously imported session data. Set this field to {state[1]} - {session_year[1]} - {session_state[1]} as these fields are not likely to change from one version of a file to the next. It is believed that the other options on this page are only applicable if one is doing a re-import to update existing data.
  9. Click Continue
  10. The last screen is to quickly confirm the Import Summary, and then click the Confirm & Run Import button to import the session data.
  11. Viola!