diff --git a/help/user-guide/create-sample-type.md b/help/user-guide/create-sample-type.md index 7755243652..4a9bb1f8e7 100644 --- a/help/user-guide/create-sample-type.md +++ b/help/user-guide/create-sample-type.md @@ -119,7 +119,7 @@ A Sample Type can only be edited by registered users that have the permission to Select the Sample Type, then select the "Actions" button and click on "Edit Sample Type". -### Adding optional attributes +### Adding a new attribute as optional Optional attributes can be added to a Sample Type. @@ -130,27 +130,66 @@ If existing samples have been previosly created using the Sample Type you want t Users with editing rights over those samples should decide whether to assign values to the added optional attributes for the existing samples or not. + +### Adding a new attribute as mandatory + +A new mandatory attribute can be added to a Sample Type via the following steps: +1. Add the new attribute to the Sample Type as optional (do not select "Required?") and Save the change by clicking "Update" button. +2. Select the Sample Type and then click on the "View samples" button. +3. Locate the newly added attribute you want to make required and ensure that all samples have values in it. +* If you have permission to edit those samples,[edit the samples]() by assigning values for the attribute of interest. +* If you don't have the permission to edit all the samples, make sure to contact the creator(s) and/or the submitter of those samples, and ask them to add values for the new optional attribute. + +Note that all samples, including the ones that might not be visible to you, must have values for the attribute of interest, otherwise the intended change cannot be made. + +3. Select the Sample Type, then select the "Actions" button and click on "Edit Sample Type" from the dropdown menu. Locate the attribute you want to make required and select the checkbox next to "Required?" to make it a mandatory field. Save the changes to the Sample Type by clicking the "Update" button. + + +### Making an optional attribute mandatory + +Optional attributes in a Sample Type can be made mandatory via the following steps: +1. Select the Sample Type and then click on the "View samples" button. +2. Locate the attribute you want to make required and ensure that all samples have values in it. +* If you have permission to edit those samples,[edit the samples]() by assigning values for the attribute of interest. +* If you don't have the permission to edit all the samples, make sure to contact the creator(s) and/or the submitter of those samples, and ask them to add values for the new optional attribute. + +Note that all samples, including the ones that might not be visible to you, must have values for the attribute of interest, otherwise the intended change cannot be made. + +3. Select the Sample Type, then select the "Actions" button and click on "Edit Sample Type" from the dropdown menu. Locate the attribute you want to make required and select the checkbox next to "Required?" to make it a mandatory field. Save the changes to the Sample Type by clicking the "Update" button. + + ### Editing existing attributes without causing technical conflicts with samples' values -You can edit existing attributes of a Sample Type in the following ways, without causing technical conflicts that would trigger validation errors in the system. -* Change a mandatory attributes to optional +You can edit existing attributes of a Sample Type in the following ways, without causing technical conflicts that would trigger validation errors for samples' values in the system. +* Change a mandatory attributes to optional: deselect the checkbox "Required?" * Edit the Name -* Edit what attribute is a Title +* Edit what attribute is a Title: tick the checkbox "Title?" for a different attribute * Edit the Description * Edit the link to the PID * Edit the Unit Although it is possible to apply such changes, it's important to ensure that any modifications do not create semantic inconsistencies with the data that has already been collected for the existing samples. For instance, if you change the name or description of an attribute, this could cause confusion or difficulty in interpreting data that has already been collected for that attribute. Therefore, it's important to carefully consider the potential impact of any changes to existing attributes of a Sample Type, and to make sure that these changes are made in a way that does not create semantic inconsistencies or confusion with the values of existing samples. -### Changing an existing optional attribute to mandatory - -Optional attributes in a Sample Type can be made mandatory via the following steps: -1. Add the new attribute to the Sample Type as optional (do not select "Required?") and Save the change by clicking "Update" button. -2. Make sure that all samples previously created using the Sample Type you are editing get values for the newly added optional attribute. If you don't have the permission to edit all the samples, make sure to contact the creator(s) and/or the submitter of those samples, and ask them to add values for the new optional attribute. - -Note that all samples created using the Sample Type you are editing must have a value assigned for the newly added optional attribute in order to make that attribute mandatory. If not all samples have a value for the newly added optional attribute, it cannot be made mandatory. - -3. Ensure that all previously created samples have values for the new optional attribute by browsing and selecting the Sample Type of interest, and by clicking on the "View samples" button. -4. Select the Sample Type, then select the "Actions" button and click on "Edit Sample Type" from the dropdown menu. Locate the attribute you want to make required and select the checkbox next to "Required?" to make it a mandatory field. Save the changes to the Sample Type by clicking the "Update" button. - +### Editing an existing attribute in a way that may create technical conflict with samples' values +Work in progress. It will include editing and deleting of: +* attributes +* attribute types +* controlled vocabulary and ontologies + +