UC Copy Bike Train


I see a couple of use cases depending on the actor:

  • Map Maker would likely want a list of past Bike Trains and a way to select multiple of these for copying into a new quarter.
  • User may want to make their own copy of the latest. This could be as simple as a "Repeat <bike train> for <Quarter>" button.

Basic Course of Events

Map Maker

''Some interesting questions about whether to filter based on current quarter or not.''

  1. Map Maker requests list of recent bike trains, preferably those that are not part of the current quarter.
  2. App provides the list with an opportunity to select one or more to be copied to the current quarter.
  3. Map Maker requests that the list be copied.
  4. App makes the copy and presents the bike trains for the current quarter in a list, optionally allowing the Map Maker to view the current map.

Manual Procedure

These are the manual steps performed in the database until this UC is implemented in code. Assuming we have already created the Group record, we will be inserting new records into three tables (in this order) for each Bike Train:

  • BikeTrain
  • DisplayElement


  1. Use phpMyAdmin DB Browser to browse the BikeTrain table of the 'routes' database (I like to sort by Primary key descending so most recent are at the top). This will show records that you want to copy from.
  2. Open a second window that we can use to insert new records.
  3. Type in the values for each of the fields (except the ID which will be autopopulated).
  4. Save the new record for the BikeTrain and by browsing in the first window, note the ID that was assigned. We use this in the next table: DisplayElement.
  5. In the second window, insert a record for DisplayElement and populate as follows (Element_ID is autopopulated as before):
    1. className: BikeTrain
    2. sourceId: <ID from the new BikeTrain record>
    3. type: ROUTE
  6. In the first window, browse the DisplayElement table to find the new record and note its new ELEMENT_ID.
  7. Back in the second window, insert a record for MAP_ELEMENT_GROUP and populate as follows:
    1. GROUP_ID: <looked up for the new Group (7 = btSummer2011, for example, enter the '7')>
    2. ELEMENT_ID: <from the new DisplayElement record>

You can now refresh the showRoutes and view the new Bike Train.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License