6 Replies Latest reply on Aug 21, 2017 11:05 AM by Tracy Mixa

    The user has not yet visited the url on this machine

    Tracy Mixa

      Hello! 

      I'm at a loss here and I'm hoping someone can help.  We've been using this same wdc in a lower Tableau server environment and it has been working fine.  I tried to move it to our production server and now I'm getting the "The user has not yet visited the url 'https://tableau.***.com:443/webdataconnectors/JIRACLIP.html' on this machine" error.  I did import the connector and add it to the whitelist via tabadmin, just like I did in the lower environment.  I'm hoping it's something obvious.  Here is the javascript code:

       

      (function () {
       var myConnector = tableau.makeConnector();
       myConnector.getSchema = function (schemaCallback) {
        var cols = [
        { id : "key", alias : "Request ID", dataType : tableau.dataTypeEnum.string },
        { id : "summary", alias : "Summary", dataType : tableau.dataTypeEnum.string },
        { id : "description", alias : "Description", dataType : tableau.dataTypeEnum.string },
        { id : "reporter", alias : "Reporter", dataType : tableau.dataTypeEnum.string },
        { id : "assignee", alias : "Assignee", dataType : tableau.dataTypeEnum.string },
        { id : "priority", alias : "Priority", dataType : tableau.dataTypeEnum.string },
        { id : "status", alias : "Status", dataType : tableau.dataTypeEnum.string },
        { id : "createdDate", alias : "Created", dataType : tableau.dataTypeEnum.string },
        { id : "resolutiondate", alias : "Resolved Date", dataType : tableau.dataTypeEnum.string },
        { id : "dueDate", alias : "Due Date", dataType : tableau.dataTypeEnum.string },
        { id : "components", alias : "Components", dataType : tableau.dataTypeEnum.string },
        { id : "fixVersion", alias : "Release", dataType : tableau.dataTypeEnum.string },
        { id : "labels", alias : "Labels", dataType : tableau.dataTypeEnum.string },
        { id : "issueLinks", alias : "Linked Issues", dataType : tableau.dataTypeEnum.string },
        { id : "timeOriginalEstimate", alias : "Original Estimate", dataType : tableau.dataTypeEnum.string },
        { id : "timeEstimate", alias : "Remaining Estimate", dataType : tableau.dataTypeEnum.string },
        // CUSTOM FIELDS
        { id : "customfield_11602", alias : "Regulatory/Compliance", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_11614", alias : "Requesting Business Unit", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_11610", alias : "CL Functional Area", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_11501", alias : "Business Area(s) Affected", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_10603", alias : "System(s)", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_11604", alias : "Score", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_11611", alias : "Fast Track", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_10902", alias : "Request Number", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_11605", alias : "Acceptance Criteria", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_11612", alias : "HP Quality Center ID", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_11606", alias : "IT Contacts", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_11607", alias : "Subject Matter Expert", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_11603", alias : "UAT Testers", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_11608", alias : "Workaround", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_11917", alias : "Post Production Work", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_11918", alias : "Post Production Work Status", dataType : tableau.dataTypeEnum.string },
        { id : "customfield_12002", alias : "Elaboration Target Date", dataType : tableau.dataTypeEnum.string }
       ];
       var tableInfo = {
        id : "jiraFeed",
        alias : "Commercial Lines Intake Process JIRA Data",
        columns : cols
       };
       schemaCallback([tableInfo]);
       };
          //Retrieve data from JIRA.  doneCallback ends the retrieval of data
       myConnector.getData = function (table, doneCallback) {
              var data = [];
        var tableData = [];
        var firstAjax = [];
        var ajaxes = [];
        var startAtNum = 0;
        var totalNum;
        var baseUrl = "https://jira.******.com/rest/api/2/search?jql=project=CLIP&maxResults=1000&startAt="
        firstAjax.push($.getJSON(baseUrl + startAtNum, function (resp) {
         data.push(resp);
         totalNum = resp.total;
        }));
        $.when.apply($, firstAjax)
         .done(function(){
         var num = (totalNum - 1000) / 1000;
         if(num > 0) {
          var ceiling = Math.ceil(num);
          for(i = 1; i <= ceiling; i++) {
           startAtNum += 1000
           ajaxes.push($.getJSON(baseUrl + startAtNum, function (resp) {
            data.push(resp);
           }));
          }
          $.when.apply($, ajaxes)
           .done(function(){
            pushDataToTableauTable();
           });
         }
         else {
          pushDataToTableauTable();
         }
        });
        //format the JIRA data to be pushed to the Tableau array to be consumed by a Tableau table
        function pushDataToTableauTable() {
         for(var i = 0; i < data.length; i++) {
          var issues = data[i].issues;
          for (var t = 0, len = issues.length; t < len; t++) {
           tableData.push({
            "key": issues[t].key,
            "summary": issues[t].fields.summary,
            "description": issues[t].fields.description,
            "priority": issues[t].fields.priority.name,
            "status": issues[t].fields.status.name,
            "customfield_11602": issues[t].fields.customfield_11602,
            "duedate": issues[t].fields.duedate,
            "customfield_11614": issues[t].fields.customfield_11614,
            "customfield_11610": issues[t].fields.customfield_11610,
            "customfield_11501": issues[t].fields.customfield_11501,
            "customfield_10603": issues[t].fields.customfield_10603,
            "customfield_11604": issues[t].fields.customfield_11604,
            "reporter": issues[t].fields.reporter.displayName,
            "assignee": issues[t].fields.assignee,
            "createdDate": issues[t].fields.created,
            "resolutiondate": issues[t].fields.resolutiondate,
            "customfield_11611": issues[t].fields.customfield_11611,
            "customfield_10902": issues[t].fields.customfield_10902,
            "customfield_11605": issues[t].fields.customfield_11605,
            "components": issues[t].fields.components,
            "fixVersion": issues[t].fields.fixVersion,
            "customfield_11612": issues[t].fields.customfield_11612,
            "customfield_11606": issues[t].fields.customfield_11606,
            "labels": issues[t].fields.labels,
            "issueLinks": issues[t].fields.issueLinks,
            "timeOriginalEstimate": issues[t].fields.timeoriginalestimate,
            "timeEstimate": issues[t].fields.timeestimate,
            "customfield_11607": issues[t].fields.customfield_11607,
            "customfield_11603": issues[t].fields.customfield_11603,
            "customfield_11608": issues[t].fields.customfield_11608,
            "customfield_11917": issues[t].fields.customfield_11917,
            "customfield_11918": issues[t].fields.customfield_11918,
            "customfield_12002": issues[t].fields.customfield_12002
           });
          }
         }
         table.appendRows(tableData);
         doneCallback();
        }
       };
       tableau.registerConnector(myConnector);
       $(document).ready(function () {
              tableau.connectionName = "JIRA-CLIP";
              tableau.submit();
      });
      })();