<commit_before>if (Meteor.isClient) {

  var resetAddInteractionForm = function () {
    // Reset form, hide modal, and return to caller
    $(".add-interaction").parsley().reset();
    $(".add-interaction")[0].reset();
    $("#add-interaction-modal").modal("hide");
  }

  Template.AddInteraction.helpers({
    contactInfo: function () {
      var id = Session.get("editContactId");
      return Contacts.findOne({_id: id});
    }
  });

  Template.AddInteraction.events({
    "submit .add-interaction": function (event, template) {
      event.preventDefault();

      var id = Session.get("editContactId");
      var interactionDate = $("#add-interaction-date-field").val();
      var estimatedAttendees = $("#add-interaction-estimated-attendees-field").val();
      var purpose = $("#add-interaction-purpose-field").val();
      var outcome = $("#add-interaction-outcome-field").val();
      var followUpAction = $("#add-interaction-follow-up-field").val();
      var notes = $("#add-interaction-notes-field").val();

      var interaction = {
        interactionId: Random.id(),
        contactId: id,
        interactionDate: interactionDate,
        estimatedAttendees: estimatedAttendees,
        purpose: purpose,
        outcome: outcome,
        followUpAction: followUpAction,
        notes: notes
      };

      var isValidId = id !== "" && id;
      var isValidInteractionDate = interaction.interactionDate !== "" && interaction.interactionDate;<commit_msg>Added owner field to new interactions<commit_after>if (Meteor.isClient) {

  var resetAddInteractionForm = function () {
    // Reset form, hide modal, and return to caller
    $(".add-interaction").parsley().reset();
    $(".add-interaction")[0].reset();
    $("#add-interaction-modal").modal("hide");
  }

  Template.AddInteraction.helpers({
    contactInfo: function () {
      var id = Session.get("editContactId");
      return Contacts.findOne({_id: id});
    }
  });

  Template.AddInteraction.events({
    "submit .add-interaction": function (event, template) {
      event.preventDefault();

      var id = Session.get("editContactId");
      var interactionDate = $("#add-interaction-date-field").val();
      var estimatedAttendees = $("#add-interaction-estimated-attendees-field").val();
      var purpose = $("#add-interaction-purpose-field").val();
      var outcome = $("#add-interaction-outcome-field").val();
      var followUpAction = $("#add-interaction-follow-up-field").val();
      var notes = $("#add-interaction-notes-field").val();

      var interaction = {
        interactionId: Random.id(),
        contactId: id,
        interactionDate: interactionDate,
        estimatedAttendees: estimatedAttendees,
        purpose: purpose,
        outcome: outcome,
        followUpAction: followUpAction,
        notes: notes,
        owner: Meteor.userId()
      };

      var isValidId = id !== "" && id;
      var isValidInteractionDate = interaction.interactionDate !== "" && interaction.interactionDate;
{'fraction_non_alphanumeric': 0.15833333333333333, 'fraction_numerical': 0.0006666666666666666, 'mean_word_length': 3.162274618585298, 'pattern_counts': {'":': 2, '<': 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': '1186333', 'n_tokens_mistral': 849, 'n_tokens_neox': 845, 'n_words': 164}