Hello,
1) Sounds like the osticket database queries might be off in your case. have you configured the right osticket version in our plugin settings? (there’s a selection there).
2) it should only display public departments (hidden/private ones should stay hidden normally) or atleast that was the original design.
we still need some more time to fix up topics/ department based settings.
Regards,
Marco
Just checked our SCP information which reports v1.9.2. The plugin is currently set to Ver >= 1.9.5.1. I think I need to do an upgrade!
I tried setting the departments we need on the public contact form to private, unfortunately both external and logged in views now show only the public categories.
Have done the upgrade to 1.9.7. Set the departments for logged in member use to private. The public form shows the public only departments and the form on the logged in view shows the same public departments i.e. am still unable to see any private department names in my members only Create Ticket form
Looking at the code, the SELECT that gets the department names always looks for public entries and ignoreS private the ones – this is true for both public contact form and the form logged in members can see:
key4ce-osticket-bridge\includes\versionData.php : Line 4
$dept_opt = $ost_wpdb->get_results("SELECT dept_name,dept_id FROM $dept_table where ispublic=1");
key4ce-osticket-bridge\admin\admin_create_ticket.php : Line 5
$dept_opt = $ost_wpdb->get_results("SELECT dept_name,dept_id FROM $dept_table where ispublic=1");
In theory it should be possible to do something like this instead?
In versionData.php & admin_create_ticket.php:
$dept_opt = $ost_wpdb->get_results("SELECT dept_name,dept_id,ispublic FROM $dept_table");
In contact_ticket.php add the following conditional (admin_create_ticket.php should be ok as it is)
<?php
foreach($dept_opt as $dept)
{
if ($dept->ispublic == 1)
{
echo '<option value="'.$dept->dept_id .'">'.$dept->dept_name .'</option>';
}
}
?>
Hello,
Sorry for the late reply.. got cought up with alot of paperworks.
i get what your trying to do now but: we didn’t make such feature yet.
basically it only looks for public or private, it does not match private up with user based access at this point.
Regards,
Marco
Hi Marco, no problem, business first!
I made the changes (as above) to my current version of the plugin and I can confirm that the changes work with Public/Private departments (i.e. the Public Departments are displayed externally to visitors AND Public and Private Departments are displayed to logged in members).
I have also made changes to include static text + Ticket Number & Subject in automated email subject lines (though it is crude and does not implement a Settings form for this)
yeah i saw.
main thing i am afraid of is that it’s not dynamic enough.
For subject i think we should make it configureable as a field in the Email templates area (so everyone can match whatever they prefer).
for the public / private part i wonder if to do that type of script it’s not best to do by user based perms.
or atleast for example for our own use we use private departments to hide from the public (including logged in users) and only be available behind the scenes (we sell IT Services often hired to work under another companies name).
so in this aspect i need to check into more detail for osticket usage and how to make it dynamic so it fits everyones need (in this case yours and mine).
If you got any ideas or insight please do share! (as i am making this plugin for all not just for how i see fit ;-))
Subject Lines: No absolutely, that is what I was thinking re config. I just did a quick & dirty update for my own purposes to add additional info to the subject line. Ultimately it would be excellent to have that field in the template.
Public/Private Departments: we are using addoscontact as a public contact form. Our requirement for the [addoscontact] shortcode is to show a reduced list of Departments just for external visitors/non-members. For logged in members we have a ‘Helpdesk’ page (the configured landing page). Logged in members see the entire list of departments on the ‘Helpdesk’ -> ‘Create Ticket’ form.