• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: User Dependant Departments

User Dependant Departments 10 years 7 months ago #24922

Hello,

Is it possible to set the available departments on a ticket submission dependant on the user level?

We have a number of customers, and we need the ticket form to only allow the user to submit a ticket in their company's department.

The system is currently set up so each company has a "department", but when they add a ticket, they can see all the companies in the drop-down.

Is there any way to do this?

Thanks in advance.
The administrator has disabled public write access.

User Dependant Departments 10 years 7 months ago #24934

Hello paypal612,

There is no built-in option that would allow you to restrict departments to a certain user group, however this case can still be achieved by simply creating "Submit Ticket" menu items that are restricted to certain groups and have the "Default Department" field set to the department that you want to restrict them to.

After the users use this menu item, they will have their default departments automatically selected when submitting a ticket, but they will still be able to change departments from the "Departments" dropdown to something other than the default department. This can be further restricted by creating a template override to the "submit ticket" view.

To create a template override to the "Submit Ticket" view, you will need to copy:

components/com_rsticketspro/views/submit/tmpl/default.php

to:

templates/your_default_template/html/com_rsticketspro/submit/default.php

Afterwards you will need to replace (around line 78) the following sequence in the newly copied default.php:
<tr>
		<td><label for="submit_department"><span class="hasTip" title="<?php echo JText::_('RST_TICKET_DEPARTMENT_DESC'); ?>"><?php echo JText::_('RST_TICKET_DEPARTMENT'); ?></span></label></td>
		<td><?php echo $this->lists['departments']; ?></td>
</tr>
... with:
<tr>
		<td><label for="submit_department" style="display: none;"><span class="hasTip" title="<?php echo JText::_('RST_TICKET_DEPARTMENT_DESC'); ?>"><?php echo JText::_('RST_TICKET_DEPARTMENT'); ?></span></label></td>
		<td><span style="display: none"><?php echo $this->lists['departments']; ?></span></td>
</tr>
... which should hide the departments dropdown in the "Submit Ticket" view.
Please remember that my responses aren't considered customer support, to receive customer support please submit a new customer support ticket, and we will gladly assist you.

Best Regards,
Cristian Nicolae.
The administrator has disabled public write access.
The following user(s) said Thank You: paypal612

User Dependant Departments 10 years 7 months ago #24965

Hey, thanks for the response.

I managed to come to a similar solution, but using a slightly different method.

By creating a new staff group with "customer-level" permissions, and then designating the user to that staff level and the specific department, it restricts the department field to only the departments they are allowed to access.

The only downside to this solution is that prior to them being designated as "staff", they will still have the dropdown options available to them. This isn't too much of an issue for my solution, as we do need to confirm that new users are from the companies we service, so they must send their first ticket via the Cron parser, and then be confirmed and designated by us before they can submit further tickets via the site directly.

I'll look at incorporating this code to make the process a little smoother.

Thanks for your help!
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!