Organization User doesn't get assigned to default Account Plan
search cancel

Organization User doesn't get assigned to default Account Plan

book

Article ID: 8610

calendar_today

Updated On:

Products

CA API Developer Portal CA API Gateway

Issue/Introduction

When creating an "Organization" manually or creating a user with "registeredUser" or "orgAdmin" roles, the user isn't assigned to a default account plan (Bronze Account Plan).

Notice the query output from lrs DB on portal:

mysql> select o.orgid, o.name, op.propertyname, op.propertyValue from cmsorganization o left outer join cmsorganizationproperties op on op.orgid = o.orgid and op.propertyname='accountplan' order by orgid;

+-------+----------------+--------------+-------------------------------------------+

| orgid   | name              | propertyname| propertyValue                                         |

+-------+----------------+--------------+-------------------------------------------+

|    78 | developer1_org | AccountPlan  | //localhost:37080/CMS/Repository/lrs-2812 |

|    79 | developer3_org | AccountPlan  | //localhost:37080/CMS/Repository/lrs-2812 |

|    80 | test_mauallyCreatedOrg | NULL         | NULL                                               |

|    81 | test_org       | AccountPlan  | //localhost:37080/CMS/Repository/lrs-2812     |

+-------+----------------+--------------+-------------------------------------------+

"test_mauallyCreatedOrg"' doesn't have values for "propertyname" or "propertyValue"

The accepted values come from lrs.cmsorganizationproperties table.

If the "cmsorganization" table doesn't have a record of an organization, it will not be assigned to an account plan.

In the above database query, we see below we are missing values for record ID of 80 

Example Contents of the cmsorganizationproperties table:

mysql> select * from cmsorganizationproperties\G;

*************************** 1. row ***************************

        orgid: 78

propertyValue: //localhost:37080/CMS/Repository/lrs-2812

 propertyName: AccountPlan

 

*************************** 3. row ***************************

        orgid: 79

propertyValue: //localhost:37080/CMS/Repository/lrs-2812

 propertyName: AccountPlan

*************************** 4. row ***************************

        orgid: 81

propertyValue: //localhost:37080/CMS/Repository/lrs-2812

 propertyName: AccountPlan

*************************** 5. row ***************************

       

 

 

Environment

Api Portal 3.5

Resolution

In order to have an organization automatically assigned to a default account plan, we need to create a registered user via portal, Sign Up (register) page.

Another option is to manually add additional record into a DB but we usually do not recommend editing the DB since it can cause issues.

Continuing with the example from earlier:

 from cmsorganizationproperties;

+-------+-------------------------------------------+--------------+

| orgid   | propertyValue                                     | propertyName |

+-------+-------------------------------------------+--------------+

|    78 | //localhost:37080/CMS/Repository/lrs-2812 | AccountPlan  |

|    79 | //localhost:37080/CMS/Repository/lrs-2812 | AccountPlan  |

|    80 | //localhost:37080/CMS/Repository/lrs-2812 | AccountPlan  |

|    81 | //localhost:37080/CMS/Repository/lrs-2812 | AccountPlan  |

 

Have it in mind,  please take a backup before any changes, and be ready to revert changes in case of an issue or restore DB in case reverted change don't work.