Conversation
Work app — Edit Project Details: - Adds a Salesforce Opportunity ID field. A valid id is looked up through projects-api-v6 and populates Customer (Subcontracting End Customer), SMU (Reporting SMU) and Deal Close Date, leaving fields Salesforce does not supply untouched. Reopening a linked project shows the link without overwriting details that were edited by hand afterwards. - Shows a "View in Salesforce" link once the opportunity resolves, opening the record in a new tab. Sales app: - Report cells carrying a Salesforce opportunity id render the opportunity name as a button that opens a popup showing the description first, then customer, SMU, close date and stage, plus a link to the record. The popup closes with its Close button or the X icon. SMU options are renamed to the Salesforce codes (APME, EURP, AMR1, AMR2) so the imported Reporting SMU matches the dropdown. Projects saved with the previous labels render and save as the current option. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Implements the UI half of PM-6363. Depends on topcoder-platform/projects-api-v6#45, which adds the
GET /v6/projects/salesforce/opportunities/:idendpoint this branch calls.1. Work app — auto-populate project details
The Edit Project Details form gains a Salesforce Opportunity ID field. Once a valid id is entered, the opportunity is looked up and the existing fields are filled in:
A clickable View in Salesforce link appears next to the field once the id resolves, opening the record in a new tab.
Details worth noting:
The field is limited to the project editor; the showcase modal keeps the fields it had.
2. Sales app — opportunity description popup
Report cells whose value is a Salesforce opportunity id render the opportunity name as a button. Clicking it opens a popup showing the description first, then Customer, SMU, Close Date and Stage when Salesforce provides them, plus a link to the record. It closes with the Close button or the X icon.
Detecting the opportunity from the cell value means no change to
reports-api-v6: the Salesforce Analytics API already returns the record id as the value of the Opportunity Name cell, with the display name as its label. Cells without one stay plain text.3. SMU rename
SMU_VALUESbecomesAPME,EURP,AMR1,AMR2(plusOthers) — the exactReporting_SMU__ccodes in the dev Salesforce org, so an imported opportunity matches the dropdown. The ticket writes "AMPE" and "AM2"; those are treated as typos ofAPMEandAMR2, confirmed with the reporter.Projects saved with the old labels (
APMEA,Europe,Americas1,Americas2) are mapped to the current option when the editor, the showcase form and the showcase details view load them, so nothing renders blank and no data migration is needed.Testing
ProjectEditorFormandSalesPagecovering population, the Salesforce link, the incomplete-id path, opening and closing the popup, a failed lookup, and cells without an opportunity id.src/apps/work+src/apps/sales: 822 passed, with the same 10 suite / 3 test pre-existing failures asorigin/dev(unrelated specs: PaymentFormModal, ChallengePrizesField, ProjectsListPage, Engagement*).tsc --noEmitclean,eslintclean,LOGICAL_ENV=dev craco buildsucceeds.🤖 Generated with Claude Code