Opened 12 years ago

Closed 12 years ago

#99 closed (fixed)

organizations submitted via client have broken short name in database

Reported by: chaos@bbn.com Owned by: somebody
Priority: major Milestone: gmoc.py data submission debugging
Component: Database Version:
Keywords: Cc:
Dependencies:

Description (last modified by sedwards@bbn.com)

If you submit an Organization via the client the short name is truncated and broken. In particular, it's the first part of the URN and possibly all organizations will end up with the same short name.

The following in an example of what is not working...

The XML which has been submitted for the BBN organization is:

        <organization location="urn:publicid:IDN+gmoc.geni.net+location+10_Moulton_St" name="urn:publicid:IDN+gmoc.geni.net+organization+BBN" primary_contact="urn:publicid:IDN+gmoc.geni.net+contact+gpo-infra_geni.net" type="campus"/>

The organizations table at https://gmoc-db2.grnoc.iu.edu/protected-openid/index.pl?method=organizations does not show the BBN organization at all.

The database organization table contains a line which may be what resulted from this organization submission:

  (56,'urn:publicid:IDN+gmo','urn:publicid:IDN+gmoc.geni.net+organization+BBN');

The BBN organization should show up in the organizations table.

Change History (4)

comment:1 Changed 12 years ago by chaos@bbn.com

For the record, those tables are:

CREATE TABLE `organization` (
  `organization_id` int(11) NOT NULL auto_increment,
  `short_name` varchar(20) NOT NULL,
  `name` varchar(128) NOT NULL,
...

based on that, i'm guessing that what's happening here is that short_name (which i think is the display name for the web UI) is being populated using the first 20 characters of the name field reported in the XML. Instead, it should be populated using the part after the +organization+ in the URN.

comment:2 Changed 12 years ago by sedwards@bbn.com

Description: modified (diff)
Summary: BBN organization has broken short name in databaseorganization's submitted via client have broken short name in database

comment:3 Changed 12 years ago by chaos@bbn.com

Summary: organization's submitted via client have broken short name in databaseorganizations submitted via client have broken short name in database

comment:4 Changed 12 years ago by chaos@bbn.com

Resolution: fixed
Status: newclosed

This is fixed. The code now strips the organization URN prefix off each organization URN, and uses that suffix as the short name.

Note: See TracTickets for help on using tickets.