metadatacenter / cedar-project

Build project for all CEDAR Java repositories
https://github.com/metadatacenter/cedar-docs/wiki
Other
12 stars 1 forks source link

provisional value still there after deletion #742

Closed graybeal closed 6 years ago

graybeal commented 6 years ago

This has happened twice now. Clearing cache fixes it, but I am surprised cacheing has this affect.

Create an element with a provisional class in it. Save it. Create a template, import the element. Populate it using the provisional class. (You don't have to save the populated metadata.)

Now edit the element, delete the provisional class, save. (If you want to, you can add another class at this point, to convince yourself that you are seeing the modified element in the end.) Edit the template, replace the original element with the new element, save.

Populate the new template's field that used to have the provisional class. You'll still see the provisional class in the drop-down.

Neither the element JSON Schema, nor the template JSON Schema, nor the filled-out metadata JSON-LD, show any sign of the provisional class, until I actually select it in the drop-down. Then the whole term ID is there. (Copied from the end of the comment below:

"Study Type": {
      "@id": "http://data.bioontology.org/provisional_classes/e9e2b420-32ea-0136-2e91-005056010088",
      "rdfs:label": "_test"
    },

???

This happened right after I cleared cache on the staging system (but I had tried filling out the template with _test in it after clearing cache, then I deleted _test from the element and updated the template).

If I clear cache now that I've had the problem, the _test goes away from my available selections.

graybeal commented 6 years ago

The gory details

element: is https://cedar.staging.metadatacenter.org/elements/edit/https://repo.staging.metadatacenter.org/template-elements/6ef5932d-cb5b-4941-8e8d-bccde1f7cb67?folderId=https:%2F%2Frepo.staging.metadatacenter.org%2Ffolders%2F66f1d7d4-ef8c-484e-98b1-755a7ead814f

screen shot 2018-05-07 at 5 22 31 pm

has

 "additionalProperties": false,
      "title": "Study type field schema",
      "schema:description": "Generic study design (Example: 'Controlled clinical trial')",
      "_valueConstraints": {
        "classes": [],
        "ontologies": [],
        "valueSets": [
          {
            "name": "Negative Values",
            "vsCollection": "CEDARVS",
            "uri": "http://data.bioontology.org/provisional_classes/71d8deb0-3457-0136-2939-005056010074",
            "numTerms": 3
          }
        ],
        "requiredValue": true,
        "multipleChoice": false,
        "branches": [
          {
            "source": "National Cancer Institute Thesaurus (NCIT)",
            "acronym": "NCIT",
            "uri": "http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#C15320",
            "name": "Study Design",
            "maxDepth": 0
          }
        ]
      },

template: is https://cedar.staging.metadatacenter.org/templates/edit/https://repo.staging.metadatacenter.org/templates/a86cfa01-e7e2-49d9-8e71-0e616c5ee06a?folderId=https:%2F%2Frepo.staging.metadatacenter.org%2Ffolders%2F66f1d7d4-ef8c-484e-98b1-755a7ead814f

has

"additionalProperties": false,
          "title": "Study type field schema",
          "schema:description": "Generic study design (Example: 'Controlled clinical trial')",
          "_valueConstraints": {
            "classes": [],
            "ontologies": [],
            "valueSets": [
              {
                "name": "Negative Values",
                "vsCollection": "CEDARVS",
                "uri": "http://data.bioontology.org/provisional_classes/71d8deb0-3457-0136-2939-005056010074",
                "numTerms": 3
              }
            ],
            "requiredValue": true,
            "multipleChoice": false,
            "branches": [
              {
                "source": "National Cancer Institute Thesaurus (NCIT)",
                "acronym": "NCIT",
                "uri": "http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#C15320",
                "name": "Study Design",
                "maxDepth": 0
              }
            ]
          },

instance: is https://cedar.staging.metadatacenter.org/instances/edit/https://repo.staging.metadatacenter.org/template-instances/9e6d3c7a-9d45-4154-bad1-2e5a12087d30?folderId=https:%2F%2Frepo.staging.metadatacenter.org%2Ffolders%2F66f1d7d4-ef8c-484e-98b1-755a7ead814f

shows

screen shot 2018-05-07 at 5 37 36 pm

contains in the middle (after selecting _test in drop-down menu)

    "Study Type": {
      "@id": "http://data.bioontology.org/provisional_classes/e9e2b420-32ea-0136-2e91-005056010088",
      "rdfs:label": "_test"
    },
    "Relevant Publications": {
      "@value": null
    },
    "Lab Address": {
      "@value": null
    },
    "Contact Information (data collection)": {
      "@value": null
    },
    "@id": "https://repo.staging.metadatacenter.org/template-element-instances/0cca6b2a-e929-472d-abd1-773721721377"
  },
  "schema:isBasedOn": "https://repo.staging.metadatacenter.org/templates/a86cfa01-e7e2-49d9-8e71-0e616c5ee06a",
  "schema:name": "Testing Template metadata",
  "schema:description": "",
  "pav:createdOn": "2018-05-07T17:38:32-0700",
  "pav:createdBy": "https://metadatacenter.org/users/e189ae8c-3b09-4225-a0b1-de4e62bf9e3c",
marcosmro commented 6 years ago

I can't replicate. I am closing it after discussing it with @graybeal