Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize ApiMetadata and Organizations collections #2184

Closed
5 tasks done
kyyberi opened this issue Feb 24, 2017 · 7 comments
Closed
5 tasks done

Normalize ApiMetadata and Organizations collections #2184

kyyberi opened this issue Feb 24, 2017 · 7 comments
Assignees
Milestone

Comments

@kyyberi
Copy link

kyyberi commented Feb 24, 2017

ApiMetadata collection contains organization (and organization contact) data, while there already is an organization collection.

screenshot_20170303_131020

Goal

All data is stored in database once or in one collection only.

screenshot_20170303_132750

Definition of done

  • Organization fields exist only in Organizations collection
  • API Metadata object contains organizationId field
    • organizationId field is a string, containing the ID of an Organization document
  • API Metadata UI displays fields from the related organization document, if connected
  • Schema migration has been defined from old database structure to new changes
@marla-singer
Copy link
Contributor

@bajiat Interested

@bajiat
Copy link
Contributor

bajiat commented Mar 6, 2017

@marla-singer Assigned to you. Can you please estimate?

@bajiat bajiat added this to the Sprint 38 milestone Mar 6, 2017
@marla-singer
Copy link
Contributor

marla-singer commented Mar 6, 2017

@bajiat Done

@marla-singer
Copy link
Contributor

marla-singer commented Mar 7, 2017

@bajiat @kyyberi We need to migrate the data from the old structure to a new one, if possible.

  1. What to do with old organization data from ApiMetadata document?
    We can archive the data but a user will not have access to the data.
  2. Do we need to display old data? How can it be realized?
    We can't create a new organization based on ApiMetadata document because organization needs URL just as ApiMetadata doesn't provide URL

@marla-singer
Copy link
Contributor

I've tested migration and feature on local. Described the different cases and results.

Case №1

  • ApiMetadata contained information about Contact and Service
  • API was connected

Result after migration

  • Organization block has information about connected organization
  • Contact & Service information are still here

Case №2

  • ApiMetadata contained information about Contact and Service
  • API was not connected

Result after migration

  • Contact & Service information are still here
  • Organization block is empty as before

Case №3

  • ApiMetadata contained information about Organization & Contact
  • API was connected

Result after migration

  • Contact information is still here
  • Organization block has information about connected organization
  • Old information from organization block is not displayed and is stored in database

Case №4

  • ApiMetadata contained information about Organization & Contact
  • API was not connected

Result after migration

  • Contact information is still here
  • Organization block isn't displayed and information is stored in database

Case №5

  • ApiMetadata didn't contain information
  • API was connected

Result after migration

  • Contact & service blocks are empty as before
  • Organization block has information about connected organization

Case №6

  • ApiMetadata contained information about Contact and Service
  • API was not connected

Result after migration

  • Nothing happened

@marla-singer
Copy link
Contributor

@bajiat If everything works as expected, I will label my PR is ready

@bajiat
Copy link
Contributor

bajiat commented Mar 9, 2017

@marla-singer
We should not create an organization based on the old data on the API Metadata tab, you are definitely right about this.
Where do you store the old data from metadata tab after migration, if there is no organization? I'm not sure it is needed, if there is no way to see or to take any actions about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants