Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/1316 add multi type support and metadata option to fixkeys #1317

Conversation

JoernBerkefeld
Copy link
Contributor

@JoernBerkefeld JoernBerkefeld commented May 14, 2024

PR details

What changes did you make? (Give an overview)

Further details (optional)

...

Checklist

@JoernBerkefeld JoernBerkefeld added this to the 6.1.0 milestone May 14, 2024
@JoernBerkefeld JoernBerkefeld self-assigned this May 14, 2024
@github-actions github-actions bot added the enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story" label May 14, 2024
Copy link

github-actions bot commented May 14, 2024

Coverage Report

Commit:8dcb490
Base: develop@76e8860

Type Base This PR
Total Statements Coverage  66.57%  66.48%  (-0.09%)
Total Branches Coverage  66.99%  66.7%  (-0.29%)
Total Functions Coverage  76.88%  76.88%  (+0%)
Total Lines Coverage  66.57%  66.48%  (-0.09%)
Details (changed files):
File Statements Branches Functions Lines
lib/cli.js  0%  0%  0%  0%
lib/index.js  68.13%  54.54%  67.64%  68.13%
lib/metadataTypes/MetadataType.js  78.41%  74.22%  71.42%  78.41%
lib/util/cli.js  38.81%  78.04%  25%  38.81%

lib/index.js Fixed Show fixed Hide fixed
lib/index.js Dismissed Show dismissed Hide dismissed
@JoernBerkefeld
Copy link
Contributor Author

https://github.com/Accenture/sfmc-devtools/wiki/06.b-~-Standard-Commands/_edit

fixKeys

Command: mcdev fixKeys <business unit> [type] [key] [--metadata] [--like] [--execute] [--schedule]

Alias: mcdev fx

Retrieves specified metadata to ensure it works on the latest server version, prepares the update locally to ensure the key matches the name, and redeploys the metadata.

Example:

mcdev fixKeys MyProject/DEV
mcdev fixKeys MyProject/DEV dataExtension
mcdev fixKeys MyProject/DEV query
mcdev fixKeys MyProject/DEV "dataExtension,query"
mcdev fixKeys MyProject/DEV -m dataExtension -m query
mcdev fixKeys MyProject/DEV -m query:key1 
mcdev fixKeys * query "key1,key2" 
mcdev fixKeys * query "key1,key2" --execute
mcdev fixKeys MyProject/DEV automation
mcdev fixKeys MyProject/DEV automation --execute
mcdev fixKeys MyProject/* automation --like.name="foobar%"
mcdev fixKeys MyProject/* automation --like.name="foobar%" --schedule

Please, note that you might need to retrieve dependent metadata to have up-to-date data in the retrieve-folder. For example, in case of queries after fixing the keys, you should retrieve automations.

Note to CLI experts:

You can run this command without the interactive wizard asking questions using the --skipInteraction (or short--yes/--y) flag. In this case, you need to provide a few values in the command:

mcdev fixKeys MyProject/* query --y.fixKeysReretrieve
mcdev fixKeys MyProject/* query --y.fixKeysReretrieve=false
CLI Argument Description
--y.fixKeysReretrieve enable automatic re-retrieval of metadata that's dependant on the fixed type
--y.fixKeysReretrieve=false skip automatic re-retrieval of metadata that's dependant on the fixed type

@JoernBerkefeld JoernBerkefeld merged commit 16fb9ee into develop May 14, 2024
9 checks passed
@JoernBerkefeld JoernBerkefeld deleted the feature/1316-add-multi-type-support-and-metadata-option-to-fixkeys branch May 14, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] add multi-type support and --metadata option to fixKeys
1 participant