<commit_before>angular.module('GitKan.board')

.controller('ColumnsCtrl', function($scope, $rootScope, $stateParams, $dialog, gh) {
   gh.listRepoIssues($stateParams.owner, $stateParams.repo)
      .then(function(issues) {
         $scope.allIssues = issues;
      });

   $scope.hasLabel = function(column) {
      return function(issue) {
         var labels = _.map(issue.labels, function(lbl) {
            return _.last(lbl.name.split('-')).trim();
         });
         return _.contains(labels, column);
      };
   };

   $scope.getColumnWidth = function() {
      return {width: (100.0 / $scope.config.columns.length) + '%'};
   };

   $scope.showIssueDetails = function(issue) {
      var opts = {
         backdrop: true,
         keyboard: true,
         backdropClick: true,
         templateUrl: "board/controllers/issue_details/issue_details.tpl.html",

         controller: 'IssueDetailsCtrl'
      };

      var selected_issue = issue;
      var d = $dialog.dialog(angular.extend(opts, {resolve: {
         issue: function() {return angular.copy(selected_issue);}
      }}));
      d.open();
   };

   /**
    Called when an issue starts being dragged so to set the mime-type/data for
    the drag event.  This data is used by other systems to determine if
    they can handle the event.

    It is good to pass as many versions of the data as possible so that we
    can interoperate with as many other systems as possible.
    */<commit_msg>Fix bug that crept in when reorg of board files was done so that issue details can be opened again.<commit_after>angular.module('GitKan.board')

.controller('ColumnsCtrl', function($scope, $rootScope, $stateParams, $dialog, gh) {
   gh.listRepoIssues($stateParams.owner, $stateParams.repo)
      .then(function(issues) {
         $scope.allIssues = issues;
      });

   $scope.hasLabel = function(column) {
      return function(issue) {
         var labels = _.map(issue.labels, function(lbl) {
            return _.last(lbl.name.split('-')).trim();
         });
         return _.contains(labels, column);
      };
   };

   $scope.getColumnWidth = function() {
      return {width: (100.0 / $scope.config.columns.length) + '%'};
   };

   $scope.showIssueDetails = function(issue) {
      var opts = {
         backdrop: true,
         keyboard: true,
         backdropClick: true,
         templateUrl: "board/issue_details/issue_details.tpl.html",

         controller: 'IssueDetailsCtrl'
      };

      var selected_issue = issue;
      var d = $dialog.dialog(angular.extend(opts, {resolve: {
         issue: function() {return angular.copy(selected_issue);}
      }}));
      d.open();
   };

   /**
    Called when an issue starts being dragged so to set the mime-type/data for
    the drag event.  This data is used by other systems to determine if
    they can handle the event.

    It is good to pass as many versions of the data as possible so that we
    can interoperate with as many other systems as possible.
    */
{'fraction_non_alphanumeric': 0.12157648630594522, 'fraction_numerical': 0.0026720106880427524, 'mean_word_length': 2.591127098321343, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4101245', 'n_tokens_mistral': 885, 'n_tokens_neox': 865, 'n_words': 245}