Skip to content

Commit 105e9de

Browse files
#0 fix: label source vs target BU prompts in Build command
1 parent cc06152 commit 105e9de

File tree

6 files changed

+48
-7
lines changed

6 files changed

+48
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to the **SFMC DevTools** VS Code extension are documented in
44

55
Publishing is triggered automatically via GitHub Actions when a new release is created.
66

7+
## [3.1.2] — 2026-04-09
8+
9+
### Changed
10+
11+
- **Build (Template + Definition)**: the two Business Unit quick-picks now say **source** vs **target** so it is clear which selection maps to `--buFrom` and which to `--buTo`.
12+
713
## [3.1.1] — 2026-04-08
814

915
### Fixed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "sfmc-devtools-vscode",
33
"displayName": "SFMC DevTools",
44
"description": "Unofficial IDE for Salesforce Marketing Cloud - Handle and manipulate several SFMC assets (journeys, automations, queries, SSJS, AMPScript, etc..) between your local machine and Salesforce Marketing Cloud (SFMC).",
5-
"version": "3.1.1",
5+
"version": "3.1.2",
66
"license": "MIT",
77
"publisher": "Accenture-oss",
88
"repository": {

src/devtools/index.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,10 @@ class DevToolsExtension {
10561056
const projectPath = supportedFiles[0].projectPath;
10571057
const projectConfig = this.mcdev.retrieveProjectCredentialsConfig(projectPath);
10581058

1059-
const buFrom = (await this.selectBusinessUnits(projectPath, { multiBUs: false })) as string[];
1059+
const buFrom = (await this.selectBusinessUnits(projectPath, {
1060+
multiBUs: false,
1061+
businessUnitsPrompt: MessagesEditor.businessUnitsFromPrompt
1062+
})) as string[];
10601063
if (!buFrom?.length) return;
10611064

10621065
const markets = projectConfig.getMarkets();
@@ -1074,7 +1077,10 @@ class DevToolsExtension {
10741077
| undefined;
10751078
if (!marketFrom) return;
10761079

1077-
const buTo = (await this.selectBusinessUnits(projectPath, { multiBUs: false })) as string[];
1080+
const buTo = (await this.selectBusinessUnits(projectPath, {
1081+
multiBUs: false,
1082+
businessUnitsPrompt: MessagesEditor.businessUnitsToPrompt
1083+
})) as string[];
10781084
if (!buTo?.length) return;
10791085

10801086
const marketTo = (await this.requestInputWithOptions(markets, "Select target market:", false)) as
@@ -1143,12 +1149,17 @@ class DevToolsExtension {
11431149
* @param {string} projectPath - The path to the project.
11441150
* @param {Object} options - The options for selecting business units.
11451151
* @param {boolean} options.multiBUs - Indicates if multiple business units can be selected.
1152+
* @param {string} [options.businessUnitsPrompt] - Quick-pick title for BU selection (defaults to generic prompt).
11461153
* @returns {Promise<string[] | undefined>} A promise that resolves to an array of selected business units or undefined.
11471154
* @throws {Error} If no credentials or business units are found.
11481155
*/
11491156
async selectBusinessUnits(
11501157
projectPath: string,
1151-
{ multiBUs, credential }: { multiBUs: boolean; credential?: string }
1158+
{
1159+
multiBUs,
1160+
credential,
1161+
businessUnitsPrompt: buPrompt
1162+
}: { multiBUs: boolean; credential?: string; businessUnitsPrompt?: string }
11521163
): Promise<string[] | undefined> {
11531164
// Get the credentials and business units from the mcdevrc file
11541165
const projectCredsConfig = this.mcdev.retrieveProjectCredentialsConfig(projectPath);
@@ -1183,7 +1194,7 @@ class DevToolsExtension {
11831194
// Request user to select a business unit
11841195
selectedBUs = (await this.requestInputWithOptions(
11851196
businessUnits,
1186-
MessagesEditor.businessUnitsPrompt,
1197+
buPrompt ?? MessagesEditor.businessUnitsPrompt,
11871198
multiBUs
11881199
)) as string[] | undefined;
11891200
} else {

src/messages/editor.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ const runningCommandCancelled = (command: string) => `DevTools command has been
66
const runningCommandFailure = "Oh no. Something went wrong while running DevTools Command...";
77
const credentialPrompt = "Please select the credential you would like to use:";
88
const businessUnitsPrompt = "Please select the business unit you would like to use:";
9+
/** Quick-pick title when selecting `--buFrom` during Build (templating). */
10+
const businessUnitsFromPrompt = "Please select the BU you would like to use as source:";
11+
/** Quick-pick title when selecting `--buTo` during Build (templating). */
12+
const businessUnitsToPrompt = "Please select the BU you would like to use as target:";
913
const metaDataTypePrompt = "Please select the metadata types you would like to use:";
1014
const copyToBuPrompt = "Please select the action you would like to perform:";
1115
const changeKeyMethodPrompt = "Please select how you would like to change the key:";
@@ -39,6 +43,8 @@ export {
3943
runningCommandFailure,
4044
credentialPrompt,
4145
businessUnitsPrompt,
46+
businessUnitsFromPrompt,
47+
businessUnitsToPrompt,
4248
metaDataTypePrompt,
4349
copyToBuPrompt,
4450
changeKeyMethodPrompt,
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import * as assert from "assert";
2+
import * as MessagesEditor from "../../../messages/editor";
3+
4+
suite("Editor messages – Build BU prompts", () => {
5+
test("businessUnitsFromPrompt labels source BU", () => {
6+
assert.strictEqual(
7+
MessagesEditor.businessUnitsFromPrompt,
8+
"Please select the BU you would like to use as source:"
9+
);
10+
});
11+
12+
test("businessUnitsToPrompt labels target BU", () => {
13+
assert.strictEqual(
14+
MessagesEditor.businessUnitsToPrompt,
15+
"Please select the BU you would like to use as target:"
16+
);
17+
});
18+
});

0 commit comments

Comments
 (0)