Skip to content

Fix sample type policies not being applied when created from templates or fair data station #2222

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

Merged
merged 3 commits into from
Jun 23, 2025

Conversation

stuzart
Copy link
Member

@stuzart stuzart commented Jun 18, 2025

@stuzart stuzart added this to the 1.17.0 milestone Jun 18, 2025
@stuzart stuzart moved this to In review in SEEK 1.17.x Jun 18, 2025
@stuzart stuzart requested a review from Copilot June 18, 2025 11:48
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the sample type creation workflow to use a shared build_sample_type helper in the controller and updates functional tests to pass and verify policy_attributes and tags for sample types created via various paths.

  • Introduce build_sample_type to DRY up controller actions
  • Update tests to include policy_attributes and assertions for policies and tags
  • Ensure template- and Fair Data Station–based creation also applies sharing policies and tags

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
test/functional/sample_types_controller_test.rb Added SharingFormTestHelper; pass policy_attributes and tags in test params; added assertions for policy and tags
app/controllers/sample_types_controller.rb Extracted sample type initialization into build_sample_type; replaced inline setup in create, build_from_template, and TTL actions

Co-authored-by: Copilot <[email protected]>
@stuzart stuzart requested a review from kdp-cloud June 18, 2025 14:17
@stuzart stuzart merged commit ae9038d into main Jun 23, 2025
24 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in SEEK 1.17.x Jun 23, 2025
@stuzart stuzart deleted the sample-type-create-policy-2219 branch June 23, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants