# Getting Category's custom field value from Topic

**URL:** <https://meta.discourse.org/t/getting-categorys-custom-field-value-from-topic/56571>\
**Category:** Development\
**Created:** [30 בינואר,‏ 2017,‏ 7:59am UTC](https://meta.discourse.org/t/getting-categorys-custom-field-value-from-topic/56571 "2017-01-30T07:59:08Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Janno\_Liivak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/janno_liivak/32/352215_2.png) [@Janno\_Liivak](https://meta.discourse.org/u/Janno_Liivak)\
**Post date:** [30 בינואר,‏ 2017,‏ 7:59am UTC](https://meta.discourse.org/t/getting-categorys-custom-field-value-from-topic/56571/1 "2017-01-30T07:59:08Z")

</div>

I have created custom category field enable\_bump\_topic (by example of @SamSaffron’s discourse-solved plugin). But I don’t seem to get how could I access this custom field when on Topic. I created canBump computed property for Topic ([discourse-bump-topic/assets/javascripts/discourse/initializers/extend-topic-for-bump-button.js.es6 at master · jannolii/discourse-bump-topic · GitHub](https://github.com/jannolii/discourse-bump-topic/blob/master/assets/javascripts/discourse/initializers/extend-topic-for-bump-button.js.es6)) but I only get value out from Category’s custom field when I first visit Category and open Edit form and then go to this Categroy’s topic. If I go directly to Topic I get undefined when try to access custom\_fields. It’s like custom\_fields doesn’t exist before I go and look at the Category settings.

What am I missing? What am I not getting?

My (still very raw) project: [GitHub - jannolii/discourse-bump-topic · GitHub](https://github.com/jannolii/discourse-bump-topic)

---

_[View the full topic](https://meta.discourse.org/t/getting-categorys-custom-field-value-from-topic/56571)._
