The Tab Swap Plugin swaps the order of Reply and Internal Note tabs in the osTicket ticket detail view, making Internal Note the default active tab instead of Reply.
Perfect for teams that primarily use internal notes for collaboration and want to reduce accidental customer-facing replies.
What makes this plugin essential:
| Requirement | Version | Notes |
|---|---|---|
| osTicket | 1.18.x | Plugin uses osTicket's Signal API |
| PHP | 7.4+ | Recommended: PHP 8.1+ for best performance |
| jQuery | Any | Included in osTicket by default |
tab-swap folder to /include/plugins/ on your osTicket serverFinal path: /path/to/osticket/include/plugins/tab-swap/
cd /path/to/osticket/include/plugins
git clone https://github.com/markus-michalski/osticket-tab-swap.git tab-swap
The plugin automatically installs and updates /include/.htaccess to allow JavaScript files.
| Setting | Description | Default | Use When |
|---|---|---|---|
| Enable Tab Swap | Toggle tab swapping on/off | ON | You want to temporarily disable tab swap without uninstalling |
The plugin requires minimal configuration - simply enable it and it works out of the box.
Once enabled, the plugin automatically swaps tabs in ticket view:
[Reply (active)] [Internal Note]
[Internal Note (active)] [Reply]
| Scenario | Behavior |
|---|---|
| User has NO reply permission | Only Note tab exists → no swap performed |
| Ticket is closed | No forms present → no swap performed |
| Mobile view | Tab swap works (responsive design compatible) |
| PJAX navigation | Tab swap re-applied on dynamic load |
Symptoms:
Check:
Plugin enabled?
Plugin configured?
User has reply permission?
JavaScript errors?
tab-swap.jsBrowser cache?
Ctrl+F5 (Windows) or Cmd+Shift+R (Mac)Symptoms:
Solution:
[Tab-Swap] PJAX reload detected messageSymptoms:
tab-swap.jsCause: /include/.htaccess wasn't updated to allow static assets
Manual fix (Apache):
Edit /include/.htaccess and add this before the Deny from all line:
# Allow static assets for plugins (JavaScript, CSS, images, fonts)
<FilesMatch "\.(js|css|map|json|png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf|eot|otf)$">
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Allow from all
</IfModule>
</FilesMatch>
For NGINX:
location ~ ^/include/plugins/.+\.(js|css|png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf|eot)$ {
allow all;
access_log off;
expires 7d;
}
location ~ ^/include/ {
deny all;
}
Plugin Structure:
tab-swap/
├── plugin.php # Plugin metadata
├── class.TabSwapPlugin.php # Main plugin class
├── config.php # Plugin configuration
└── js/
└── tab-swap.js # Frontend JavaScript
The plugin connects to osTicket's Signal API:
| Signal | Handler | Purpose |
|---|---|---|
object.view |
onTicketView() |
Detects when a Ticket is viewed |
Implementation:
Signal::connect('object.view', function(Ticket $ticket) {
if ($user->hasPerm(PERM_REPLY)) {
// Inject JavaScript to swap tabs
}
});
JavaScript Workflow:
#post-reply-tab) and Internal Note (#post-note-tab) tabsPJAX Support:
$(document).on('pjax:success', function() {
TabSwapPlugin.reset();
TabSwapPlugin.init();
});
| User Permission | Behavior |
|---|---|
Has PERM_REPLY |
✅ JavaScript injected, tabs swapped |
No PERM_REPLY |
❌ No injection (user sees only Note tab) |
Q: Does this plugin modify osTicket core files?
A: No! The plugin uses osTicket's official Signal API (object.view). No core files are modified.
Q: Can I disable the plugin temporarily without losing configuration?
A: Yes! Simply Disable the plugin in Admin Panel. Your configuration is saved in the database.
Q: Does this work with osTicket 1.17 or older?
A: No. The plugin is designed for osTicket 1.18.x only. Older versions may have different DOM structure.
Q: Is it compatible with PHP 8.x?
A: Yes! The plugin is tested with PHP 7.4, 8.0, 8.1, 8.2, and 8.3.
Q: Does this work with custom osTicket themes?
A: Mostly yes, but custom themes may have different DOM structure. The plugin relies on standard element IDs (#post-reply-tab, #post-note-tab).
Q: Can I use this with other plugins?
A: Yes, but test for conflicts. Plugins that modify the same DOM elements may interfere.
Q: What happens if a user has no reply permission?
A: The plugin detects this and does not inject JavaScript. Users without reply permission only see the Note tab (nothing to swap).
Q: Does this affect API ticket creation?
A: No, this is a frontend-only plugin. API operations are unaffected.
Q: Why do canned responses still insert into Reply form?
A: This is osTicket core behavior, not controllable by plugins. After selecting a canned response, manually switch to the Reply tab or copy content to Note form.
This Plugin is released under the GNU General Public License v2, compatible with osTicket core.
See LICENSE for details.
For questions or issues, please create an issue on GitHub:
Issue Tracker: https://github.com/markus-michalski/osticket-tab-swap/issues
When reporting issues, please include:
php -v)Developed by Markus Michalski
Contributions welcome!
See CHANGELOG.md for version history.