Smart Actions - name error



:warning:This is a template you must use



to report issues
. :warning:
You can also drag images, videos and include Preformatted text.

Feature(s) impacted

Smart actions

Observed behavior

Recieved error messages as visible in the screenshot


Expected behavior

expecting a successfully created form like smart actions which takes in the existing values of 2 columns in a row and allows me to update the values of these 2 columns.

Context

I am trying to create a smart action for the client table (collection). This smart action is to be used to update values. So it will be a form like smart action which displays the current values of the fields and allows us to update the value of that field. But the client.rb file in the models section includes a module VivColendingApi inside which exists a class Client. So when I include ‘collection :Client’ in /lib/forest_liana/collections/client.rb, there is absolutely now change in my admin panel, i.e no smart action is getting created. So I replaced collection :Client with collection “VivColendingApi::Client” which is giving the error shown in the logs. I do not understand what to call my file, collection, class etc. to actually make the smart action work.

Please provide in this mandatory section, the relevant information about your configuration:

  • Project name: colending
  • Team name: colending
  • Environment name: development
  • Agent type & version: 7.4.5
  • Recent changes made on your end if any: …

Hello @Ashna

Thanks you for reporting this.

The issue seems to come from the use of modules.

Could you try to modify your lib/forest_liana/collections/client.rb file, and use this when declaring the collection (should replace your line 4):

    include ForestLiana::Collection

    viv_colending_api_client = VivColendingApi::Client
    collection :viv_colending_api_client

Please let me know if this helps.

1 Like


The smart action is not getting reflected on the admin panel even after making the change that you’ve mentioned. Only the default duplicate and delete actions are currently visible and not the update incorrect values action that I am trying to create. What should I do?

Hi @Ashna

Seems like you initial error is gone, that’s nice.

I properly see the “Update Incorrect Values” in our database, and I tried to refresh your project on my end.
By chance, did the action appear on your admin panel?

If not, could you try to change it a little (eg, append a “2” to its name) to force an update?

If this still not works, could you check this documentation page about Smart Action permissions? Some settings may be missing.

Thank you.

There has been no change on my admin panel. The action did not appear. I changed the name of the smart action and am attaching the screenshots of the same. But there was no impact of changing the name either.




I checked the role based permission as mentioned in the documentation page but it just says no smart actions yet.

I have also tried creating a smart action very similar to mark as live on a different model (called integration) because mark as live has a simpler code than update incorrect values and therefore a smaller chance of an error but even that mark as live smart action is not getting reflected on the admin panel.

@Ashna

I confirm that I see both actions in your schema.

But I see that the “Viv Colending Api Client” display name is used for two collections.

  • VivColendingApi__Client (no action)
  • viv_colending_api_client (“Update Incorrect Values123” action)

Maybe you are not editing the settings of the right collection?

Sorry for the delay in my response. I was trying to make atleast one smart action fully functional before we concluded this thread and it was successful. I have created an update namespace SA that that is working as expected.

The issue was what you have pointed out. Once I changed the name of the collection to VivColendingApi__Client, the smart action started reflecting on the UI.

Thank you very much for your help.

1 Like