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

362 add and edit attributes in sample types #2032

Conversation

kdp-cloud
Copy link
Collaborator

@kdp-cloud kdp-cloud commented Oct 21, 2024

  • Adds possibility to add new optional attribute to an existing sample type
  • Makes the title of a sample attribute editable.
  • If the title of an attribute is updated, the JSON metadata values of all samples that are linked to the sample type are also updated as a background job.

Closes #1257
Closes #1258
Closes #362

@kdp-cloud kdp-cloud marked this pull request as ready for review October 22, 2024 15:40
Copy link
Contributor

@fbacall fbacall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flagged a few issues, mostly around concurrency

lib/seek/samples/sample_type_editing_constraints.rb Outdated Show resolved Hide resolved
app/jobs/update_sample_metadata_job.rb Outdated Show resolved Hide resolved
app/views/isa_studies/_sample_types_form.html.erb Outdated Show resolved Hide resolved
lib/seek/samples/sample_type_editing_constraints.rb Outdated Show resolved Hide resolved
lib/seek/samples/sample_metadata_updater.rb Outdated Show resolved Hide resolved
app/controllers/sample_types_controller.rb Show resolved Hide resolved
lib/seek/samples/sample_metadata_updater.rb Outdated Show resolved Hide resolved
@kdp-cloud
Copy link
Collaborator Author

I added a locking mechanism, locking the sample type and its linked samples while the background job is running. Creating new samples in this sample type is now prohibited as well.

app/models/sample_type.rb Outdated Show resolved Hide resolved
app/models/sample.rb Outdated Show resolved Hide resolved
app/controllers/samples_controller.rb Outdated Show resolved Hide resolved
app/jobs/update_sample_metadata_job.rb Show resolved Hide resolved
test/functional/sample_types_controller_test.rb Outdated Show resolved Hide resolved
@kdp-cloud kdp-cloud merged commit 96a68df into seek4science:main Nov 14, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Coded
Status: Done
2 participants