Use CMS Certificate Title for program verifiable credentials - #3698
Merged
zamanafzal merged 3 commits intoAug 6, 2026
Conversation
OpenAPI ChangesShow/hide changesUnexpected changes? Ensure your branch is up-to-date with |
zamanafzal
force-pushed
the
zafzal/certificate-cms-title-verifiable-credential
branch
from
June 30, 2026 09:10
f61e41f to
a9e7788
Compare
annagav
reviewed
Jun 30, 2026
| certificate_name = certificate.program.title | ||
| certificate_name = ( | ||
| certificate_page.product_name or "" | ||
| ).strip() or certificate.program.title |
Contributor
There was a problem hiding this comment.
So are we giving higher precedence to product name over the program title?
Program verifiable credentials now use the CMS "Certificate Title" (product_name) for the credential name, so the issued credential matches the title printed on the certificate. Falls back to the program title when product_name is unset. Applies to newly issued credentials going forward only; already-signed verifiable credentials are not re-issued. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Match the frontend getCertificateTitle helper, which falls back to the program title on whitespace-only Certificate Titles. Parametrize the fallback test over empty and whitespace-only product_name. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
zamanafzal
force-pushed
the
zafzal/certificate-cms-title-verifiable-credential
branch
from
August 6, 2026 10:19
a9e7788 to
7a86c8f
Compare
zamanafzal
deleted the
zafzal/certificate-cms-title-verifiable-credential
branch
August 6, 2026 12:15
Contributor
Author
|
Verified the changes on RC and left a comment on the ticket https://github.com/mitodl/hq/issues/11938#issuecomment-5215132791 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
Follow-up to the certificate-title work (hq#11907, tracked in hq#11938).
Description
When a program certificate is issued, the verifiable credential (Open Badge) is signed with a
name. Today that name is the program title. This changes it to the CMS "Certificate Title" (CertificatePage.product_name) so the issued credential matches the title printed on the certificate (and shown on the MIT Learn certificate page).Falls back to the program title when
product_nameis unset.Change
courses/api.py—get_verifiable_credentials_payload, program branch:certificate_pageis always present here (the caller returns early viashould_provision_verifiable_credentialwhen it isNone).How to test
Manual:
Automated:
test_program_certificate_verifiable_credentials_signing_payloadnow sets a CMSproduct_name("Universal AI") distinct from the program title ("Data Science MicroMasters") and asserts the credentialname/descriptionuse theproduct_name.test_program_verifiable_credential_name_falls_back_to_program_title(new) asserts the fallback to program title whenproduct_nameis empty.Manual (optional): issue a new program certificate for a program whose CMS certificate page "Certificate Title" differs from its program title, then inspect the resulting verifiable credential —
credentialSubject.achievement.nameshould be the Certificate Title.