Form action gets called but does not fill slot

nlu.md

## intent:intent_greeting
-hey
-hi
-hello
-howdy
-how is it going
-hi there
-hey there

## intent:intent_goodbye
-bye
-good bye
-thanks and bye
-talk to you later
-until next time
-good day
-Alright thanks
-Thank you
-nice to talk to you



## intent:intent_intro
-Hi my name is [Rohit](name)
-My name is [Rohit Jain](name)
-Hi i am [Mayank](name)
-Hi this is [Anand Kumar](name)
-Hi Myself [Akash Sinha](name)
-Hi my name is [Venkat](name)
-My name is [Sai Deep](name)
-Hi i am [Adya](name)
-Hi this is [Kasturee](name)
-Hi Myself [Gopal](name)
-Hi i am [mayank](name)
-Hi this is [anand kumar](name)
-Hi Myself [akash sinha](name)
-Hi my name is [venkat](name)
-My name is [Sai Deep](name)
-Hi i am [adya](name)
-Hi this is [kasturee](name)
-Hi Myself [gopal](name)

## intent:intent_new_issue
-I want to create a new Issue
-help me create a new issue
-help wanted regarding creation of new issue
-How to create a new issue
-Please create a new issue

domain.yml

actions:
- action_hello_world
- action_save_name
- utter_greeting
- utter_goodbye
- utter_ask_intro
- utter_issue_created
- utter_ask_summary
intents:
- intent_greeting
- intent_goodbye
- intent_intro
- intent_new_issue

entities:
- name
- summary
- description

forms:
  - create_issue_form

slots:
  username:
    type: text
  summary:
    type: unfeaturized
  description:
    type: unfeaturized


templates:
  utter_greeting:
  - text: Hi, Tell me your name.
  utter_goodbye:
  - text: Bye, Have a nice day.
  utter_ask_intro:
  - text: Hi Please tell me your name.
  utter_issue_created:
  - text: Your Issue has been created
  utter_ask_summary:
  - text: Please enter the summary of the issue
  utter_ask_description:
  - text: Please enter the description of the issue

stories.md

## path 1
* intent_greeting
 - utter_greeting
* intent_intro{"name":"Rishabh"}
 - action_save_name
 - slot{"username":"Rishabh"}
 - action_hello_world
* intent_new_issue
 - create_issue_form
 - form{"name":"create_issue_form"}
 - form{"name":null}
* intent_goodbye
 - utter_goodbye

## path 2
* intent_goodbye
 - utter_goodbye

## path 3
* intent_intro{"name":"Rishabh"}
 - action_save_name
 - slot{"username":"Rishabh"}
 - action_hello_world
* intent_new_issue
 - create_issue_form
 - form{"name":"create_issue_form"}
 - form{"name":null}
* intent_goodbye
 - utter_goodbye

## path 4
* intent_new_issue
 - create_issue_form
 - form{"name":"create_issue_form"}
 - form{"name":null}
* intent_goodbye
 - utter_goodbye

 
## path 5
* intent_new_issue
 - create_issue_form
 - form{"name":"create_issue_form"}
 - form{"name":null}

actions.py

class IssueForm(FormAction):
    """Example of a custom form action"""

    def name(self):
        """Unique identifier of the form"""
        return "create_issue_form"


    @staticmethod
    def required_slots(tracker: Tracker) -> List[Text]:
        """A list of required slots that the form has to fill"""
        return ["summary", "description"]

    def submit(self,dispatcher: CollectingDispatcher,tracker: Tracker,domain: 'hr_bot'):
        """Define what the form has to do
                after all required slots are filled"""
        issue_dict = {
                'project': 'RASA',
                'summary': tracker.get_slot('summary'),
                'description': tracker.get_slot('description'),
                'issuetype': {'name': 'Bug'}
        }
        new_issue = jira.create_issue(fields=issue_dict)
        dispatcher.utter_template('utter_issue_created', tracker)
        return []
    
    def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
        """A dictionary to map required slots to
            - an extracted entity
            - intent: value pairs
            - a whole message
            or a list of them, where a first match will be picked"""

        return {

            """
            self.from_entity(entity=entity_name, intent=intent_name) will look for an entity called entity_name to fill a 
            slot slot_name regardless of user intent if intent_name is None else only if the users intent is intent_name.
            """
           
            
            "summary": [self.from_entity(entity="summary"), self.from_text()],
            "description": [self.from_entity(entity="description"), self.from_text()]
        }

I was trying to set slots summary and description using forms , but the flow is going somewhere else in our stories. I have little idea as to what I’m doing wrong.Please help. It throws action_execution_rejected exception and does not fill the slot.

the rejection event tells you that the form is not able to extract the slot. I suspect the problem is the comment inside the dict you are returning. Try removing these lines:


            """
            self.from_entity(entity=entity_name, intent=intent_name) will look for an entity called entity_name to fill a 
            slot slot_name regardless of user intent if intent_name is None else only if the users intent is intent_name.
            """