Preserve integration info during course clone#2588
Preserve integration info during course clone#2588elenabaurkot wants to merge 1 commit intoinstructure:masterfrom
Conversation
|
👋 One more thing, I think this feature needs to be behind a Feature Flag. The flag should be defined in config/feature_flags/00_standard.yml Something like this This should control the import/export flow plus the UI rendering (the checkbox rendering) part. |
14937ce to
30745ba
Compare
Add opt-in setting behind a feature flag to copy
integration_id and integration_data on assignments
during course copy. External systems rely on these
fields to correlate Canvas assignments with
third-party records, and assignments across courses
can share the same IDs.
A single copy_integration_info setting controls
both fields, gated by the
copy_course_integration_info feature flag.
Test Plan:
- Enable copy_course_integration_info flag
- Create a course with assignments that have
integration_id and integration_data set
- Copy the course with the option enabled
- Verify cloned assignments retain the values
- Copy again with option disabled
- Verify fields are cleared (default behavior)
- Test via API: POST course copy with
settings[copy_integration_info]=true
- Verify same behavior as UI
Made-with: Cursor
30745ba to
d7ea304
Compare
|
Thanks for the feedback @viszpis, I've updated the PR with the combined setting, feature flag and environments block. Quick question: once this merges, what's the typical process for enabling a SiteAdmin flag in production? We'd love to be able to use this feature on our instance. |
|
|
spencerolson
left a comment
There was a problem hiding this comment.
Hi @elenabaurkot this generally looks good, but currently the test suite is failing. Two of the tests you added have failing assertions. Can you fix those please? Thanks!
|
|
||
| a_to = @copy_to.assignments.find_by(migration_id: mig_id(@assignment)) | ||
| expect(a_to.integration_id).to be_nil | ||
| expect(a_to.integration_data).to be_nil |
There was a problem hiding this comment.
this assertion is failing with:
Failure/Error: expect(a_to.integration_data).to be_nil
expected: nil
got: {}
|
|
||
| a1_to = @copy_to.assignments.find_by(migration_id: mig_id(a1)) | ||
| expect(a1_to.integration_id).to eq "id-only" | ||
| expect(a1_to.integration_data).to be_nil |
There was a problem hiding this comment.
this assertion is failing with:
Failure/Error: expect(a1_to.integration_data).to be_nil
expected: nil
got: {}
Add opt-in settings to copy integration_id and integration_data on assignments during course copy. External systems rely on these fields to correlate Canvas assignments with third-party records and assignments across courses can share the same IDs.
We reuse intergration_ids and integration_data across courses to be able to track assignment data between courses and semesters. I opened a support ticket and was told integration_data should copy over and that integration_ids were meant to be unique, but since these link to third parties was hopeful people could opt into maintaining over course clone in case the same courses need to link to the same third party data for our case.
Our data team uses DAP (data access platform) to access Canvas data and it only contains integration_id for assignments not integration_data. If we are able to clone only integration_data on course clone, could this potentially be added to DAP?
Test Plan: