{"id":20541159,"url":"https://github.com/netways/rt-extension-dbcustomfield","last_synced_at":"2026-04-18T00:31:27.618Z","repository":{"id":148513503,"uuid":"115522229","full_name":"NETWAYS/rt-extension-dbcustomfield","owner":"NETWAYS","description":"Connect databases to CustomFields","archived":false,"fork":false,"pushed_at":"2024-01-16T11:14:14.000Z","size":217,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-03-08T03:57:14.090Z","etag":null,"topics":["database","extension","management","organisation","request-tracker","ticket-system","workflow"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NETWAYS.png","metadata":{"files":{"readme":"README","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-12-27T13:09:43.000Z","updated_at":"2023-06-28T07:38:12.000Z","dependencies_parsed_at":"2024-01-16T13:20:00.926Z","dependency_job_id":null,"html_url":"https://github.com/NETWAYS/rt-extension-dbcustomfield","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/NETWAYS/rt-extension-dbcustomfield","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Frt-extension-dbcustomfield","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Frt-extension-dbcustomfield/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Frt-extension-dbcustomfield/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Frt-extension-dbcustomfield/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NETWAYS","download_url":"https://codeload.github.com/NETWAYS/rt-extension-dbcustomfield/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Frt-extension-dbcustomfield/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31951233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","extension","management","organisation","request-tracker","ticket-system","workflow"],"created_at":"2024-11-16T01:19:47.885Z","updated_at":"2026-04-18T00:31:27.595Z","avatar_url":"https://github.com/NETWAYS.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    RT::Extension::DBCustomField - Link custom field values with external\n    sources\n\nDESCRIPTION\n    This extension allows to link custom field values to external databases.\n\n    Specific custom field types provided by this extension allow users to\n    choose from a list of suggestions what they want to associate with a\n    ticket. This works with the help of auto-completion which is invoked\n    once a user typed two or more characters.\n\n    Stored and displayed is by default what the user chose. However, by\n    configuring custom templates it is possible to change what is displayed\n    to the user. This applies to the list of suggestions as well as to the\n    actual value users will see when viewing the ticket.\n\n    Pleaes note that what is displayed to the user is not necessarily what\n    is internally stored by RT for the custom field. Any time a ticket is\n    viewed by a user the extension fetches what to display from the external\n    database. This way it is possible to e.g. only store a primary key value\n    and display just an associated name to users.\n\nRT VERSION\n    Works with RT 4.4.2\n\nREQUIREMENTS\n    DBI (\u003e= 1.37)\n\n    As well as an appropriate driver for the databases you want to\n    integrate. (e.g. DBD::mysql for MySQL)\n\nINSTALLATION\n    perl Makefile.PL\n    make\n    make install\n        May need root permissions\n\n    Edit your /opt/rt4/etc/RT_SiteConfig.pm\n        Add this line:\n\n            Plugin('RT::Extension::DBCustomField');\n\n    Clear your mason cache\n            rm -rf /opt/rt4/var/mason_data/obj\n\n    Restart your webserver\n\nCONFIGURATION\n    First you need to define $DBCustomField_Connections which is a hash of\n    available database connections.\n\n            Set($DBCustomField_Connections, {\n                    'sugarcrm' =\u003e {\n                            'dsn' =\u003e 'DBI:mysql:database=SUGARCRMDB;host=MYHOST;port=3306;mysql_enable_utf8=1',\n                            'username' =\u003e 'USER',\n                            'password' =\u003e 'PASS'\n                    }\n            });\n\n    Then it is required to define $DBCustomField_Queries which is a hash of\n    available query definitions. Every query definition has a name and\n    consists of two queries. One for the auto-completion suggestions and one\n    to fetch display values with.\n\n            Set ($DBCustomField_Queries, {\n                    'companies' =\u003e {\n                            # The connection to use\n                            'connection' =\u003e 'sugarcrm',\n\n                            # The query to fetch auto-completion suggestions with. `field_value' is mandatory\n                            # and any occurrence of `?' is replaced with a user's input.\n                            'suggestions' =\u003e q{\n                                    SELECT\n                                    cstm.net_global_id_c AS field_value, cstm.shortname_c AS shortname, a.name\n                                    FROM accounts a\n                                    INNER JOIN accounts_cstm cstm ON cstm.id_c = a.id AND cstm.net_global_id_c\n                                    WHERE a.deleted = 0 AND (cstm.net_global_id_c = ? OR cstm.shortname_c LIKE ? OR a.name LIKE ?)\n                                    ORDER BY shortname\n                            },\n\n                            # The display template to use for each entry returned by the suggestions query. To reference specific\n                            # columns here encapsulate their name with curly braces. The default is just `{field_value}'\n                            # HTML support: Yes\n                            'suggestions_tpl' =\u003e q{\n                                    \u003cdiv\u003e\n                                            \u003cstrong\u003e{shortname}\u003c/strong\u003e\n                                            \u003cdiv\u003e{name} (\u003cstrong\u003e{field_value}\u003c/strong\u003e)\u003c/div\u003e\n                                    \u003c/div\u003e\n                            },\n\n                            # The query to fetch display values with. `field_value' is only required when not defining\n                            # a custom display template. A single occurrence of `?' is replaced with the value internally\n                            # stored by RT.\n                            'display_value' =\u003e q{\n                                    SELECT\n                                    cstm.net_global_id_c AS field_value, cstm.shortname_c AS shortname\n                                    FROM accounts a\n                                    INNER JOIN accounts_cstm cstm ON cstm.id_c = a.id AND cstm.net_global_id_c\n                                    WHERE cstm.net_global_id_c = ?\n                            },\n\n                            # The display template to use when showing the custom field value to users. To reference specific\n                            # columns here encapsulate their name with curly braces. The default is just `{field_value}'.\n                            # HTML support: Yes, but try to avoid manipulating the layout too much (e.g. with block elements)\n                            'display_value_tpl' =\u003e '{shortname} (\u003ci\u003e{field_value}\u003c/i\u003e)'\n                    },\n            });\n\n    Last you need to define $DBCustomField_Fields which maps query\n    definitions to specific custom fields. This controls which suggestions a\n    user receives when typing something into a custom field input. Note that\n    these custom fields need to be of the type provided by this extension.\n\n            Set($DBCustomField_Fields, {\n                    'Client' =\u003e 'companies'\n            });\n\n    By default the limit of suggestions displayed to the user is 10. To\n    adjust this you can use the following:\n\n            Set($DBCustomField_Suggestion_Limit, 25);\n\n  ADVANCED CONFIGURATION\n    __TICKET__\n        Can be used as part of any query to reference a ticket's ID. (Is\n        replaced by this extension with an integer.)\n\n    __VALUE__\n        Can be used only as part of the `display_value' query to reference\n        the `field_value'. (Is replaced by this extension with whatever has\n        been stored internally by RT.)\n\nAUTHOR\n    NETWAYS GmbH \u003csupport@netways.de\u003e\n\nBUGS\n    All bugs should be reported on GitHub\n    \u003chttps://github.com/NETWAYS/rt-extension-dbcustomfield\u003e\n\nCOPYRIGHT AND LICENSE\n    This software is Copyright (c) 2018 by NETWAYS GmbH\n\n    This is free software, licensed under:\n\n        The GNU General Public License, Version 2, June 1991\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetways%2Frt-extension-dbcustomfield","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetways%2Frt-extension-dbcustomfield","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetways%2Frt-extension-dbcustomfield/lists"}