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

Actions - Human readable name vs JS function name #7874

Open
2 of 3 tasks
benr77 opened this issue Apr 30, 2024 · 3 comments
Open
2 of 3 tasks

Actions - Human readable name vs JS function name #7874

benr77 opened this issue Apr 30, 2024 · 3 comments

Comments

@benr77
Copy link

benr77 commented Apr 30, 2024

Preflight Checklist

  • I could not find a solution in the existing issues, docs, nor discussions
  • I have joined the ZITADEL chat

Describe your problem

When creating an action, I lost several hours working out why it was not running.

It turns out that the action name must match the name of the JS function for it to run.

Describe your ideal solution

This is all very counter-intuitive. Why even allow naming an action if its name can be derived directly from the JS method name anyway?

Secondly, allowing creating a name for the action implies that you can use some kind of human-readable name such as "Flatten all roles" and then use a camelCase name for the JS method "flatRoles" etc.

Can I suggest either separating the requirement for these to be the same, which would allow more descriptive human readable names. Alternatively, put a note on the "create action" modal popup stating this name field must match the JS function.
Thanks

Version

2.51.0

Environment

Self-hosted

Acceptance Critiera

  • Add note to the ZITADEL management console, that the name and function in the javascript have to be the same
    Example:
image
@hifabienne
Copy link
Member

Hei @benr77
Thanks for adding the issue. It is absolutaly valid, and I think its not really intuitive, that they have to match.
However, as we are currently implementing our new actions v2 I think it doesnt make sense to change that in the current implementation.
You can find the new implementaction for tracking here: #7235
I

@stebenz @peintnermax what is your opinion?

@benr77
Copy link
Author

benr77 commented Apr 30, 2024

It looks like v2 is still some way off. I would still recommend adding a textual note at least to the modal popup, simply reiterating the required matching of name and function name. This would not change the v1 behaviour but will likely save users a lot of frustration.

@hifabienne
Copy link
Member

Yes, I think it would make sense to add a note in the management console. I will add some acceptance criteria to your issue to at least add a note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🐛 Bugs/Small Issues
Development

No branches or pull requests

2 participants