Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.

If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping

Answers may be delayed for posts that do not include sufficient information.

Is it possible to keep historical location tracking of locations?

Object location tracking works just as I need it (objects<->storage_location). But what happens if a Box location is moved? - How can I move a box from one room to another?  If I move it using the "Move" in the Location Hierarchy Browser I have no historical record.  All of the objects are still in the same location (box), so the system doesnt think they moved.  I do not think I want the clutter of creating a new box for every location the box may be in.

I tried creating a storage_locations_x_storage_locations GUI but it seems that locations arent allowed to have related locations.

Is there a way to track location of locations of a particular type?

Any ideas?


  • I have.  My problem is that a "box" is a location, and it looks (I may be reading this wrong) like I can only track the history of an object to a location, and not the location to a location as well.  Isn't the assumption that objects change location, but locations are static?
  • So it looks like I need to change to movement based location in order to track box movement.

    A few problems I'm running into:
    -Nothing has a "current location" anymore...even after updating locations via caUtils
    -I can not get any template to work with the object location bundle when it is set to "movement" - do you have a sample template?

    What else do I need to do to change from direct object-location to movement based.

  • Can you upload your configurations please? Profile/UI, app.conf, etc. come in to play so it'd be useful to see everything. 
  • OK, I have some progress but I cant figure out:

    -How does an object actually move?  Updating the location vie a movement record doesnt seem to update the contents of a location.

    -In the movement UI, I have two related locations (restricted to "from" and "to" locations) but I can not get the restrictToRelationshipType to work in the the  location bundle template
  • Can you also upload app.conf?
  • Here is my /local app.conf.  The regular (/app/conf/app.conf) is stock pulled from git today 
  • It's best to use only one methodology for this. Currently you have both Direct object-location and Movement-based configured. 

  • I had been using the direct object-location but then realized I need to track box-location movement so I am trying to convert over to movement based.  I would like to not loose the direct-location info while converting over.

    At this point I think I have most of the issues ironed out. The ca_storage_location_contents bundle doesnt have a default display template so I needed to add one to get the bundle to work in the storage location editor.

    I still need to get some reports converted.  I have not been able to get ^ca_storage_location_contents to work in a report.  I tried using getLocationContents('ca_movements'); but it seems to dump lots of unrelated stuff.  getLastLocation() seems to be direct object-location related.

  • Ok, I figured out how to use getLocationContents('ca_movements') to generate a search result set.

    I do have an issue that I suspect is a "missing the big picture" problem for me:  For any object, I would like the Current/Historic Locations to show the historic trail of the object's movement, and the object's location -- I would to know that object -> box, box -> new location, etc.

    If I include the object as a related object in the movement record of a moved location, then the Current location bundle kind of works BUT then the Location's contents thinks the object is located where the location moved to: ie object ->box, box -> room : now thinks object is located in both room and box,

    Any idea?

  • In the scenario you mention are you using both storage- and movement- based, or just movement?
  • I'm trying to move to just movement based.  I still have the storage-based bundles in the editor so I can see the existing history, but I am no longer moving objects that way.
    Same with the storage_locations_contents bundles in the storage_location editor.

    Something I do not understand: Where/what metadata/etc tracks the movement of storage_locations?  When I look at a movement record of a location movement, where is it recorded?
    My Object Location Bundle Template within the Object editor is: 

              <unit  relativeTo='ca_movements' >
                        <l>^</l><b><l>^ca_storage_locations</l></b> (moved on ^ca_movements.removal_date)
              </unit><i> (<l>^ca_movements</l>)</i><br/>
              <unit  relativeTo='ca_movements' >
                       ^➔_     <<<<<<------ Why does this work, showing the actual historic location within the hierarchy and not just the current spot??

  • correction/update:
      <unit  relativeTo='ca_movements' >

    For movement records of moved locations, this displays the correct historic location within the hierarchy.

    But for movement records of objects moving (I make this happen my adding a related object to the movement record) this will display the current
    position in the hierarchy and not the position at the time of the move

    ...if this makes any sence
  • Are you sure you're entering a date in the movement record that matches the app.conf configuration (pickup_date)? Are you sure it's the correct relationship type?

    There's been a lot of back and forth and updates from you on's a little difficult to follow without seeing your system. Would that be a possibility?
  • I sent you login info off-list.
    I changed  "pickup_date" to "removal_date" but I havn't noticed any changes yet.
  • OK, I think I found it!
    /app/models/ca_storage_locations.php ~ line 585:
    I changed :
            $va_location_ids = array_merge($this->get($x=$this->tableName().".children.".$this->primaryKey(), ['returnAsArray' => true]), [$this->getPrimaryKey()]);
    to: (removing children)
            $va_location_ids = array_merge($this->get($x=$this->tableName().".".$this->primaryKey(), ['returnAsArray' => true]), [$this->getPrimaryKey()]);

    and it now limits the contents to the actual current contents.    

    Is this going to create new problems?

  • An update:  It seems that a few lines latter:

         $va_object_ids = $t_movement->getRelatedItems('ca_objects', array('idsOnly' => true, 'showCurrentOnly' => true, 'row_ids' => $va_movement_ids));

    that the 'showCurrentOnly' is only returning the last object by date.  If there are multiple objects with the same dates, it will still only return one object.
    I first tried changing the line to:

         $va_object_ids = $t_movement->getRelatedItems('ca_objects', array('idsOnly' => true, 'showCurrentOnly' => false, 'row_ids' => $va_movement_ids));

    and it returned all objects correctly.

    It seems to me that showCurrentOnly is in fact broken,and should return all objects with the current date.

    so I restoredt showCurrentOnly  and changed  /app/lib/ca/BundlableLabelableBaseModelWithAttributes.php ~line 5756

                 foreach(array_pop($va_by_date) as $vs_v => $va_rel) {
                                $va_rels_for_id[$vs_v] = $va_rel;


                foreach($va_by_date as $vb_by_date){
                              foreach($vb_by_date as $vs_v => $va_rel) {
                                  $va_rels_for_id[$vs_v] = $va_rel;

    and this seems to work ok.

  • This was fixed in the past; what code are you working with?
  • pulled from git/develop about 1 week ago
Sign In or Register to comment.