# Small action CustomComponent argument issue

**URL:** <https://meta.discourse.org/t/small-action-customcomponent-argument-issue/383606>\
**Category:** Development\
**Created:** [September 22, 2025, 11:01pm UTC](https://meta.discourse.org/t/small-action-customcomponent-argument-issue/383606 "2025-09-22T23:01:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![saquetim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saquetim/32/116400_2.png) [@saquetim](https://meta.discourse.org/u/saquetim)\
**Post date:** [September 23, 2025, 8:21pm UTC](https://meta.discourse.org/t/small-action-customcomponent-argument-issue/383606/3 "2025-09-23T20:21:35Z")

</div>

Thank you for noticing this issue.

> [@RGJ](#):
>
> I guess the post parameter should be `this.args.post` and not `this.post`.

You’re correct; the post parameter should be `this.args.post` instead of `this.post`.

> [@RGJ](#):
>
> There are getters in `PostSmallAction` for `code`, `createdAt` and `path`, but (again) `this.post` does not exist and `username()` seems to have a bug as well (there is no `action_code_who` in `this.args.post` ?) , so those attributes stay empty.

`username` is a bit misleading here. `action_code_who` is indeed correct but is used by some plugins like the `assign` plugin, so it’s not always present in the `post` object. To get the user who created the small action, you can use `@post.username`

I wasn’t sure if I could push changes to your PR, so I opened the one below to address these issues:

- fix the post argument passed both to the transformer and the custom component
- rename the `username` argument to `who` minimizing the confusion around this argument
- add tests to verify the arguments are passed correctly

[https://github.com/discourse/discourse/pull/34928](https://github.com/discourse/discourse/pull/34928)

---

_[View the full topic](https://meta.discourse.org/t/small-action-customcomponent-argument-issue/383606)._
