The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

RTx::FillTicketData - Automatically fill data in RT ticket from preconfigured sources.

SYNOPSIS

    # Lines to add to RT_SiteConfig.pm
    Plugin('RTx::FillTicketData');

    # Absolute path to settings file
    Set($FillTicketDataSettingsFile =>
        '/home/rt/rt4/etc/fill_ticket_data_settings.json');

DESCRIPTION

The purpose of this plugin is to provide a "Fill data" button, which, given an unique ID, will send this ID to the server and retrieve data according to the configuration provided in JSON config file. Possible external sources are: database, shell command output, plain text specified in the configuration. It's possible to fill Subject line, Body of the ticket and Custom Fields using this plugin.

There may be as many ID fields as needed (the button gets added after every such field).

The configuration file gets re-read on every request, and if changed, all database connections are reinitialized.

See etc/fill_ticket_data_settings.json (or etc/ticket_data_settings_ru.json) for the example of settings file.

get_data

Returns data from configured sources

    In: \%arg hash in the form
    (
        Object-RT::Ticket--CustomField-1-Values => $value1,
        Object-RT::Ticket--CustomField-3-Values => $value3,
        ...
    )
    Out: \%content_of - hash of values from the configured sources for the same
        fields as

AUTHOR

Ilya Chesnokov <chesnokov@cpan.org>

ACKNOWLEDGEMENTS

Work on this extension was sponsored by Beirel Telecom LLC (https://www.beirel.ru), which also generously allowed to open-source it and publish on the Internet.

LICENSE

Under the same terms as Perl itself.