Skip to content

Update sf mapping to include code editor ExCS projects - #990

Merged
cocomarine merged 1 commit into
mainfrom
1702-map-ExCS-projects-to-sf
Sep 1, 2026
Merged

Update sf mapping to include code editor ExCS projects#990
cocomarine merged 1 commit into
mainfrom
1702-map-ExCS-projects-to-sf

Conversation

@cocomarine

@cocomarine cocomarine commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Status

What's changed?

  • Added the new project_type_attribute logic in lesson_sync_job.rb
    • Syncing teacherprojecttype__c as scratch when an ExCS project has project_type of either scratch (default behaviour) or code_editor_scratch (i.e., Project::EXPERIENCE_CS_PROJECT_TYPES)

@cla-bot cla-bot Bot added the cla-signed label Aug 28, 2026
@github-actions

Copy link
Copy Markdown

Test coverage

93.5% line coverage reported by SimpleCov.
Run: https://github.com/RaspberryPiFoundation/editor-api/actions/runs/33185496751

@raspberrypiherokubot
raspberrypiherokubot temporarily deployed to editor-api-p-1702-map-e-4br0mf August 28, 2026 15:35 Inactive
@cocomarine
cocomarine marked this pull request as ready for review September 1, 2026 07:41
Copilot AI lite review requested due to automatic review settings September 1, 2026 07:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the Salesforce Lesson sync to normalize teacherprojecttype__c for Experience CS “Code Editor Scratch” lessons so that Salesforce receives scratch rather than code_editor_scratch, aligning reporting across Experience CS project variants.

Changes:

  • Route teacherprojecttype__c through a new project_type_attribute helper in Salesforce::LessonSyncJob.
  • Add specs to verify Experience CS-origin lesson projects sync teacherprojecttype__c as scratch for Project::EXPERIENCE_CS_PROJECT_TYPES.

Reviewed changes

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

File Description
app/jobs/salesforce/lesson_sync_job.rb Adds project_type_attribute and uses it when syncing teacherprojecttype__c.
spec/jobs/salesforce/lesson_sync_job_spec.rb Adds coverage for Experience CS-origin projects to ensure Salesforce sees scratch.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/jobs/salesforce/lesson_sync_job.rb
Comment thread spec/jobs/salesforce/lesson_sync_job_spec.rb

@zetter-rpf zetter-rpf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice one

@cocomarine
cocomarine merged commit 8db251b into main Sep 1, 2026
9 checks passed
@cocomarine
cocomarine deleted the 1702-map-ExCS-projects-to-sf branch September 1, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants