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

fix(actions): actions are not saved after sanitizeActions() #163

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

lupusA
Copy link
Collaborator

@lupusA lupusA commented Jul 9, 2023

Hi,
this PR may fix actions not being saved in the policy editor. Debuging the policy editor indicated that the method sanitizeActions(..) checks for "path" instead of script. The policy editor, however, stores the information in "script"

" {ActionRowScript(this, "actions.afterSnapshotRoot.script", "After Snapshot", "Script to run after snapshot")}"

Therefore, all actions are set to undefined and are never saved. The issue was introduced in #133.

This PR may fix kopia/kopia#3046

Feedback is welcomed.

Cheers,

The method checks for "path" instead of script.
Therefore, all actions are set to undefined and are never saved.
@lupusA
Copy link
Collaborator Author

lupusA commented Jul 10, 2023

Hi @jkowalski

i've tested it briefly and provided the path to a .bat file. The .bat file was executed on windows.

However, currently people are having issues, as their policy contains "path" which is currently not used in 0.13.

Cheers,

@jkowalski jkowalski merged commit 56c8528 into kopia:main Jul 14, 2023
2 checks passed
jkowalski added a commit to jkowalski/kopia that referenced this pull request Jul 14, 2023
jkowalski added a commit to kopia/kopia that referenced this pull request Jul 14, 2023
* feat(ui): UI updates (Theming support, action fix)

- theming support kopia/htmlui#150
- actions fix kopia/htmlui#163

* disable dark mode selector test
@lupusA lupusA deleted the fix-actions-in-policy-editor branch July 17, 2023 09:16
@panreyes
Copy link

This might not be the same issue, but I will mention just in case:
KopiaUI was not saving snapshot actions command and it was not reporting any errors.
Later, I found out that snapshot actions are disabled by default. I just enabled them in repository.config and I was able to save the command after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants