nanodesigns / nanosupport

Create a fully featured Support Center in your WordPress setup without any third party dependency, completely FREE. Get a built-in Knowledgebase too. The plugin is available on WordPress.org repository:
https://wordpress.org/plugins/nanosupport/
GNU General Public License v2.0
50 stars 13 forks source link

Add the ticket on behalf of anybody #70

Closed wptech68 closed 5 years ago

wptech68 commented 5 years ago

I'm trying to add a ticket on behalf of a specific end user (subscriber) who can add a ticket by himself, but it doesn't show in the users list, only those with support agents and admins are showed in the list. Is this the correct behavior? Thanks

mayeenulislam commented 5 years ago

@wptech68 Something might not be correct. There are many questions, need to answer.

Can you please make sure your steps are correct according to the guideline?

And also make sure all the necessary NanoSupport Capabilities are checked for the users who are trying to see the tickets.

If they are Agents and/or Admins there should be no way of missing the ticket. We cannot reproduce the issue:

View of an Administrator

Where first ticket is added by an administrator, and second one was added by the Support Seeker.
ticket-on-behalf-of-other-use

View of the "Support Seeker"

tickets-of-niyoti

wptech68 commented 5 years ago

Followed the guidelines, but I cannot see the full list of end users in the dropdown list. In your example if "niyoti" is a standard user (subscriber in wordpress) I cannot replicate because the list just shows the support agents and admin. In my installation, all end users can add a ticket my themselves from the front end, then ticket is assigned by admin to a support agent, so both end user who created the ticket and support agent can see and reply the ticket as it should be, all work fine there. However, I as the admin cannot add a new ticket on behalf of a user because they are not listed in the dropdown author list. have no idea about how capabilities may conflict here since all users all allowed to use the nanosupport by themselves, thanks anyway

mayeenulislam commented 5 years ago

What version of NanoSupport you are using?
Because the scenario you are saying was present before v0.4.1 and should not be that way in the latest version.

In our window all the users are now available with v0.5.0:
all-users-available

wptech68 commented 5 years ago

0.5.0 for sure now I see that I have 6 support agents and 1 admin, but the list only shows the admin and 3 agents (not 6) so not all support seekers are listed apart of not listing any end user. It should be some role/permission problem, but is strange since all users are allowed to work with the plugin posting new tickets, looks is something only related to permissions for the "add on behalf..." function

mayeenulislam commented 5 years ago

We're believing in you. But if it is possible, then we would love to have an access to the site under question, so that we can inspect whether there is an issue there?

If, and only if, it is possible, you can create an account for us with: info [at] nanodesignsbd [dot] com

wptech68 commented 5 years ago

will do it if I cannot find the problem. Now after looking more I can confirm that only the users with "author" or "admin" privilegies at WP are the ones that are listed in the dropdown list, but not the "subscribers", independently if they are support seekers or not. For example, a standar user with "subscriber" role is NOT listed in the dropdown list even if is also a support agent , but any user with author or admin status is listed I didnt test it with users with contributor or editor status yet

mayeenulislam commented 5 years ago

@wptech68 You are right. We just replicated the issue in our end. Yes, not all the users are visible in the dropdown list. And we also found the reason.

By default, only 4 user roles are available in the dropdown and subscriber is not there. But there's a filter hook so that you can add any other user role to the dropdown if you think you need them.

Filter hook: nanosupport_assigned_user_role is used to add subscriber. The following code can be placed in your theme's functions.php:

<?php
add_filter('nanosupport_assigned_user_role', function($array) {
    return $array = array_merge($array, array(
        'subscriber' => __('Subscriber')
    ));
});

We will update the documentation with the information as soon as possible, inshALLAH

wptech68 commented 5 years ago

worked perfect, thanks