• Resolved davidcom

    (@davidcom)


    Hello, I’m experiencing a problem. When a ticket is created, the user chooses from a dropdown list (the custom taxonomy, which is a required field). However, in testing, many of the test submissions (maybe all of them) do not record the user\’s choice in the drop down. It just shows the “Please choose” option. Any ideas why this is happening?

    Link to screenshot: https://drive.google.com/open?id=0B2vf8MI2nfPlMm9WWUF6Y3pyNGs

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author awesomesupport

    (@awesomesupport)

    Hi:

    Have you tried to test this with just a basic install of WP and AS and just one custom field? Maybe something else is conflicting with AS?

    Also, are there any JavaScript errors in your browser console?

    Thread Starter davidcom

    (@davidcom)

    Well, I did a bunch of testing. I figured out the following:

    I have 12 items in my custom taxonomy. There were two that were never recorded with the tickets (always failed). The other 10 always successfully recorded. Here is the list along with the results (they’re in French):

    • Administratif – SUCCESS
    • Cours – Problème de comportement participant – SUCCESS
    • Cours – Problème de niveau dans le cours – SUCCESS
    • Cours – Problème pendant le cours – SUCCESS
    • Facturation Client – SUCCESS
    • Planning – NOT RECORDED, EVEN AFTER MULTIPLE TICKET SUBMISSIONS
    • Procédure – SUCCESS
    • RH / Paie – SUCCESS
    • Comportement Salarié – NOT RECORDED, EVEN AFTER MULTIPLE TICKET SUBMISSIONS
    • Salles et équipement – SUCCESS
    • Support Pédagogique – SUCCESS
    • Système d’information – SUCCESS

    So for the two items that that were not being recorded (“Planning” and “Comportement Salarié”), I tried the following:

    1. Changing the slug – didn’t work, still not recorded with ticket creation
    2. Deleting and re-adding the item – this worked for “Planning” (Planning is now recorded with the ticket creation), but it did not work for “Comportement Salarié”
    3. Changing the name – this worked for “Comportement Salarié”. I deleted it and created a new taxonomy with the name “Salarié – Comportement”. Oddly, this worked. This item is now being recorded with the ticket creation.

    Any ideas on why the plugin was behaving this way? Took a lot of testing and troubleshooting to finally get it working (2 hours of testing). I’d like to figure out the reason, so I can move forward with this plugin on other sites. But the bug I was experiencing is worrying.

    A final note, below are two sets of code that I added to the functions.php file of my child theme. Could you confirm that it is correct?

    /**** This code creates the 'Origine Options' option in the "Tickets" submenu  ****/
    wpas_add_custom_taxonomy( 'my_custom_origines', array( 'title' => 'My Custom Origines', 'label' => 'Origine', 'label_plural' => 'Origine Options' ) );
    /**** For Awesome Support Ticket creation, make Origine category mandatory ****/
    add_filter( 'wpas_get_custom_fields', 'wpas_make_product_required' );
    /**
     * Make the products field required
     *
     * @param array $custom_fields Registered custom fields
     *
     * @return array
     */
    function wpas_make_product_required( $custom_fields ) {
    
    	if ( isset( $custom_fields['my_custom_origines'] ) ) {
    		$custom_fields['my_custom_origines']['args']['required'] = true;
    	}
    	return $custom_fields;
    }

    Thanks again.

    Plugin Author awesomesupport

    (@awesomesupport)

    Hi:

    I don’t believe we’ve seen this issue reported in this forum before. Kudos to your persistence in getting it to work. I’m wondering if maybe there might be an issue with the character-set being used (english vs french).

    We have seen a similar issue in the past where it seemed that blank fields might be triggering a similar issue but, again, that was only reported by one person. In response to that we tightened up the treatment of blank fields with a patch on github: https://github.com/Awesome-Support/Awesome-Support/commit/d02367bb783f6b6d1345170a911f343ac5a9ec4e. This will be included in the next version of Awesome Support

    You might want to try this patch and see if it helps the situation.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom field not being recorded in the ticket’ is closed to new replies.