Skip to content
This repository has been archived by the owner on Mar 8, 2018. It is now read-only.

Lost Membership information when merging persons #820

Open
sweemeng opened this issue Apr 15, 2015 · 0 comments
Open

Lost Membership information when merging persons #820

sweemeng opened this issue Apr 15, 2015 · 0 comments

Comments

@sweemeng
Copy link

We have been merging 2 person on popit, but after we merge we found out that the membership information is missing, . Below is the data

We are merging this person, Abdul Ghapur Bin Salleh to Abdul Ghapur Salleh, after merging membership from Abdul Ghapur Bin Salleh is missing inside membership of Abdul Ghapur Salleh. And now Abdul Ghapur Bin Salleh is deleted, as expected.

The merge is done by POST to
https://sinar-malaysia.popit.mysociety.org/api/v0.1/persons/545e44275222837c2c058bfe/merge/545e44f05222837c2c058dee

Dump is below for completeness sake.

Here is the original data from Abdul Ghapur Bin Salleh before the data is deleted.

{
  "result": {
    "html_url": "https://sinar-malaysia.popit.mysociety.org/persons/545e44f05222837c2c058dee",
    "url": "https://sinar-malaysia.popit.mysociety.org/api/v0.1/persons/545e44f05222837c2c058dee",
    "name": "Abdul Ghapur Bin Salleh",
    "id": "545e44f05222837c2c058dee",
    "images": [],
    "memberships": [
      {
        "contact_details": [],
        "links": [],
        "images": [],
        "id": "545e61c05222837c2c05a412",
        "start_date": "2013",
        "person_id": "545e44f05222837c2c058dee",
        "role": "Parliamentary Candidate",
        "post_id": "545e4d5b5222837c2c05988b",
        "organization_id": "5362fcc219ee29270d8a9e22",
        "area": {
          "name": "Kalabakan",
          "id": "P191",
          "state": "Sabah"
        },
        "url": "https://sinar-malaysia.popit.mysociety.org/api/v0.1/memberships/545e61c05222837c2c05a412",
        "html_url": "https://sinar-malaysia.popit.mysociety.org/memberships/545e61c05222837c2c05a412"
      }
    ],
    "links": [],
    "contact_details": [],
    "identifiers": [],
    "other_names": []
  }
}

This is the data for Abdul Ghapur Salleh after merging.

{
  "result": {
    "html_url": "https://sinar-malaysia.popit.mysociety.org/persons/545e474a5222837c2c0593d4",
    "url": "https://sinar-malaysia.popit.mysociety.org/api/v0.1/persons/545e474a5222837c2c0593d4",
    "name": "Abdul Ghapur Salleh",
    "id": "545e474a5222837c2c0593d4",
    "images": [],
    "memberships": [
      {
        "contact_details": [],
        "links": [],
        "images": [],
        "id": "545e62895222837c2c05ad16",
        "start_date": "2004",
        "person_id": "545e474a5222837c2c0593d4",
        "role": "Parliamentary Candidate",
        "post_id": "545e4d5b5222837c2c05988b",
        "organization_id": "5362fcc219ee29270d8a9e22",
        "area": {
          "name": "Kalabakan",
          "id": "P191",
          "state": "Sabah"
        },
        "url": "https://sinar-malaysia.popit.mysociety.org/api/v0.1/memberships/545e62895222837c2c05ad16",
        "html_url": "https://sinar-malaysia.popit.mysociety.org/memberships/545e62895222837c2c05ad16"
      },
      {
        "contact_details": [],
        "links": [],
        "images": [],
        "id": "545e62895222837c2c05ad17",
        "start_date": "2004",
        "person_id": "545e474a5222837c2c0593d4",
        "role": "Member of Parliament",
        "post_id": "545e4d5b5222837c2c05988c",
        "organization_id": "536844f619ee29270d8a9f63",
        "area": {
          "name": "Kalabakan",
          "id": "P191",
          "state": "Sabah"
        },
        "end_date": "2008",
        "url": "https://sinar-malaysia.popit.mysociety.org/api/v0.1/memberships/545e62895222837c2c05ad17",
        "html_url": "https://sinar-malaysia.popit.mysociety.org/memberships/545e62895222837c2c05ad17"
      },
      {
        "contact_details": [],
        "links": [],
        "images": [],
        "id": "545e62895222837c2c05ad18",
        "start_date": "2004",
        "person_id": "545e474a5222837c2c0593d4",
        "role": "Parliament Representative",
        "post_id": "545e4d5c5222837c2c05988d",
        "organization_id": "5362fcc219ee29270d8a9e22",
        "area": {
          "name": "Kalabakan",
          "id": "P191",
          "state": "Sabah"
        },
        "end_date": "2008",
        "url": "https://sinar-malaysia.popit.mysociety.org/api/v0.1/memberships/545e62895222837c2c05ad18",
        "html_url": "https://sinar-malaysia.popit.mysociety.org/memberships/545e62895222837c2c05ad18"
      },
      {
        "contact_details": [],
        "links": [],
        "images": [],
        "id": "545f733f5222837c2c05b673",
        "start_date": "2004",
        "person_id": "545e474a5222837c2c0593d4",
        "role": "Member of Parliament",
        "post_id": "545f70205222837c2c05b44f",
        "organization_id": "536844f619ee29270d8a9f63",
        "area": {
          "name": "Kalabakan",
          "id": "P191",
          "state": "Sabah"
        },
        "end_date": "2008",
        "url": "https://sinar-malaysia.popit.mysociety.org/api/v0.1/memberships/545f733f5222837c2c05b673",
        "html_url": "https://sinar-malaysia.popit.mysociety.org/memberships/545f733f5222837c2c05b673"
      },
      {
        "contact_details": [],
        "links": [],
        "images": [],
        "id": "55105890a344efdd47836b2a",
        "start_date": "2004",
        "person_id": "545e474a5222837c2c0593d4",
        "role": "Member of Parliament",
        "post_id": "545e4d5b5222837c2c05988c",
        "organization_id": "53633b5a19ee29270d8a9ecf",
        "area": {
          "name": "Kalabakan",
          "id": "P191",
          "state": "Sabah"
        },
        "end_date": "2008",
        "url": "https://sinar-malaysia.popit.mysociety.org/api/v0.1/memberships/55105890a344efdd47836b2a",
        "html_url": "https://sinar-malaysia.popit.mysociety.org/memberships/55105890a344efdd47836b2a"
      },
      {
        "contact_details": [],
        "links": [],
        "images": [],
        "id": "5510c2cca344efdd478420a9",
        "start_date": "2004",
        "person_id": "545e474a5222837c2c0593d4",
        "role": "Member of Parliament",
        "post_id": "545f70205222837c2c05b44f",
        "organization_id": "53633b5a19ee29270d8a9ecf",
        "area": {
          "name": "Kalabakan",
          "id": "P191",
          "state": "Sabah"
        },
        "end_date": "2008",
        "url": "https://sinar-malaysia.popit.mysociety.org/api/v0.1/memberships/5510c2cca344efdd478420a9",
        "html_url": "https://sinar-malaysia.popit.mysociety.org/memberships/5510c2cca344efdd478420a9"
      }
    ],
    "links": [],
    "contact_details": [],
    "identifiers": [],
    "other_names": []
  }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant