Allow the admin user to assign tickets

Is there a way to allow the admin user to assign tickets to users with the role of author. Currently the admin is only able to assign tickets to other admin users.

  • Panos
    • SLS

    Hi there Phillip Roru ,

    There is no hook available for this, so you should need to change a plugins file for this. Luckily it's a small change :slight_smile:

    Please open file
    wpmudev1/wp-content/plugins/incsub-support /incsub-support.php
    and change line 418 from
    'role' => 'administrator',
    to
    'role__in' => array('author', 'administrator'),

    Please let us know if this works for you :slight_smile:

    Cheers!

  • Phillip Roru
    • Design Lord, Child of Thor

    Hi Panos,
    I did the changes but they were not reflected. User can't be assigned with an Author role on a Network level (I only see the option to 'Grant Super Admin privileges' ). My Staff representatives are users at the Network level and at the main site level they have 'Author' role privileges.

    For security reasons I don't want my staff representatives to have Super Admin privileges.

    After I changed the mentioned code it doesn't solved the issue. What can be done in order to achieve this?

    Thanks!

  • Panos
    • SLS

    Hey Phillip Roru ,

    I didn't realize that it was MultiSite enabled :slight_smile:

    The change is similar, I have attched the file here to replace it.

    I replaced the chunk of code from line 412 to line 428 which contained:

    if ( is_multisite() ) {
    				$super_admins = get_super_admins();
    			}
    			else {
    				$admins = get_users(
    					array(
    						'role' => 'administrator',
    						'fields' => array( 'ID', 'user_login' )
    					)
    				);
    
    				$super_admins = array();
    				foreach ( $admins as $admin ) {
    					$super_admins[ $admin->ID ] = $admin->user_login;
    				}
    
    			}

    with :

    $admins = get_users(
    					array(
    						'role__in' => array('author', 'administrator'),
    						'fields' => array( 'ID', 'user_login' )
    					)
    				);
    
    				$super_admins = array();
    				foreach ( $admins as $admin ) {
    					$super_admins[ $admin->ID ] = $admin->user_login;
    				}

    Please let me know hoe it goes this time :slight_smile:

    Cheers!

  • Phillip Roru
    • Design Lord, Child of Thor

    Hi Panos,

    I uploaded the file. I'm able to assigned tickets to my staff but they can't see them.

    They only respond to tickets on the front-end of our site and although I was able to assigned tickets to my staff they are not able to answer them because they don't see the ticket assigned to theme on the front-end.

    How can this be done?

  • Panos
    • SLS

    Hi Phillip Roru ,

    they don't see the ticket assigned to theme on the front-end.

    Unfortunately the plugin doesn't provide feature to view assigned tickets on front end. They should be able to view them from backend under wp-admin > Support .

    As I liked the idea of front end listing, I have added a custom mu-plugin here:
    https://gist.github.com/panoslyrakis/8edc021bb0544598e540b037bed26e52

    which you can try out. It should provide a shortcode which you can use in any page. If a user who is either administrator or author visits that page he should be able to see listed all the assigned tickets. He can then click on any one to reply.

    If you would like to try it out, download it, unzip it and upload it in your wp-content/mu-plugins folder ( if that folder doesn't exist, you can simply create it ). Then add the shortcode
    [support_system_assigned_tickets_front]
    in the page you like to shoe the assigned tickets.

    Hope this helps!

    Cheers!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.