How to integrate Insight version 2.x with JIRA Service Desk

A current restriction in JIRA Service Desk require some manual steps to enable the Insight custom field in the Customer Portal.
This is how you make it happen for Insight. 

Step 1 - Configure the Insight custom field

Once your asset structure is set up, you can create one or more Insight custom fields. Add the field/s to the relevant JIRA Screens. You can read about how to configure the custom field to specific object schemas here: Insight Custom Field

Step 2 - Add the Insight custom field to the JIRA Service Desk Screens

Add the Insight custom field to relevant JIRA Service Desk Screens.

Step 3 - Add the Insight custom field to the JIRA Service Desk

Navigate to your Service Desk and go to the tab "Customer Portal". Choose the "Request type" where you want to insert your Insight custom field and then click "Edit form". In the "Fields" tab, click on the "Add a field" button. Choose the Insight custom field you want to add. 

At this stage, the Insight custom field will appear under the category "Hidden fields with preset values" and you are not able to show the field because of the limitation in JIRA Service Desk. Let's do some magic in step 4!

Step 4 - Execute the following SQL query

For MySQL:

 

UPDATE AO_54307E_VIEWPORTFIELD SET FIELD_TYPE = 'text' WHERE FIELD_ID in (SELECT concat('customfield_', ID) FROM customfield WHERE customfieldtypekey LIKE 'com.riadalabs.jira.plugins.insight%');

 

For PostgreSQL:

 

UPDATE "AO_54307E_VIEWPORTFIELD" SET "FIELD_TYPE" = 'text' WHERE "FIELD_ID" IN (SELECT 'customfield_' || "id" FROM "customfield" WHERE "customfieldtypekey" LIKE 'com.riadalabs.jira.plugins.insight%');

 

For HSQL:

 

UPDATE AO_54307E_VIEWPORTFIELD SET FIELD_TYPE = 'text' WHERE FIELD_ID in (SELECT concat('customfield_', ID) FROM customfield WHERE customfieldtypekey LIKE 'com.riadalabs.jira.plugins.insight%');

 

For SQL Server:

 

UPDATE AO_54307E_VIEWPORTFIELD SET FIELD_TYPE = 'text' WHERE FIELD_ID in (SELECT 'customfield_' + CAST(ID AS VARCHAR) FROM customfield WHERE customfieldtypekey LIKE 'com.riadalabs.jira.plugins.insight%');

 

For Oracle:

 

UPDATE AO_54307E_VIEWPORTFIELD SET FIELD_TYPE = 'text' WHERE FIELD_ID in (SELECT 'customfield_' || ID FROM customfield WHERE customfieldtypekey LIKE 'com.riadalabs.jira.plugins.insight%');

 

 

 

Icon

If you have a different database schema then the default one, you have to add the schema before the table names. An example for SQL Server with a schema name "jiraschema" would be:

 

 

UPDATE jiraschema.AO_54307E_VIEWPORTFIELD SET FIELD_TYPE = 'text' WHERE FIELD_ID in (SELECT 'customfield_' + CAST(ID AS VARCHAR) FROM jiraschema.customfield WHERE customfieldtypekey LIKE 'com.riadalabs.jira.plugins.insight%');

 

 

Contact us if you run into difficulties with the database update!

 

Step 5 - Reload the page and show the field.

Reload the web browser and click on the action "Show" for the Insight custom field and you are ready to launch! 

The result might look something like this:

Step 6 - Enable access to Service Desk Customers

To enable access to Service Desk Customers, a new Project Role in JIRA, you have to to go the configuration of the Object Schema that you want to expose. Click the "Enable" button and you are ready to go!

  • No labels