<commit_before>- thread = defined?(thread) && thread
- thread_id = target ? "_#{target.class.to_s}_#{target.id}" : ""
- form_for form_url, :html => {:id => thread ? "new_comment#{thread_id}" : "new_comment",:update_id => js_id(nil,Comment.new), :multipart => true, :method => :post, :'data-project' => (comment.project ? comment.project.permalink : nil) } do |f|

  - unless commentable_projects.nil?
    %div.project{ :style => 'padding-left: 34px; font-size: 12px' }
      Comment on:
      = select_project_for_comment(commentable_projects)

  .comment_area
    = micro_avatar(current_user)
    .body.text_area
      = comment_text_area(f, target)
      .autocomplete{ :style => 'display:none' }
      .previewBox.textilized{:style => 'display:none'}
    .extra
      %span.attach_label
        = t('comments.attach.tooltip')
      .has_tooltip
        .tooltip.attach
          = t('uploads.tooltip')
        - fallback_url = comment.project.nil?? '#' : new_project_upload_path(comment.project)
        = link_to content_tag(:span, t('uploads.comment_upload_link')), fallback_url, :class => 'attach_button attach_file', :id => 'comment_upload_link'
      = render 'uploads/upload_area', :comment => comment, :form => f
      - if target
        = last_comment_input
        - if target.is_a?(Task)
          = add_hours_link(f)
          .statuses
            = f.label :status
            - if target.status_new?
              .status.new#status_new
                = f.radio_button :status, Task::STATUSES[:new], :checked => (target.status == Task::STATUSES[:new])
                = t('tasks.status.new')
            .status.open#status_open
              = f.radio_button :status, Task::STATUSES[:open]<commit_msg>Fix: solved weird bug when creating a new comment to a task from the project overview<commit_after>- thread = defined?(thread) && thread
- thread_id = target ? "_#{target.class.to_s}_#{target.id}" : ""
- form_for form_url, :html => {:id => thread ? "new_comment#{thread_id}" : "new_comment",:update_id => js_id(nil,Comment.new), :multipart => true, :method => :post, :'data-project' => (comment.project ? comment.project.permalink : nil) } do |f|

  - unless commentable_projects.nil?
    %div.project{ :style => 'padding-left: 34px; font-size: 12px' }
      Comment on:
      = select_project_for_comment(commentable_projects)

  .comment_area
    = micro_avatar(current_user)
    .body.text_area
      = comment_text_area(f, target)
      .autocomplete{ :style => 'display:none' }
      .previewBox.textilized{:style => 'display:none'}
    .extra
      %span.attach_label
        = t('comments.attach.tooltip')
      .has_tooltip
        .tooltip.attach
          = t('uploads.tooltip')
        - fallback_url = comment.project.nil?? '#' : new_project_upload_path(comment.project)
        = link_to content_tag(:span, t('uploads.comment_upload_link')), fallback_url, :class => 'attach_button attach_file', :id => 'comment_upload_link'
      = render 'uploads/upload_area', :comment => comment, :form => f
      - if target
        = last_comment_input
        - if target.is_a?(Task)
          = add_hours_link(f)
          .statuses
            = f.label :status
            - if target.status_new?
              .status.new#status_new
                = f.radio_button :status, Task::STATUSES[:new], :checked => (target.status == Task::STATUSES[:new])
                = t('tasks.status.new')
            .status.open#status_open
              = f.radio_button :status, Task::STATUSES[:open], :checked => (target.status == Task::STATUSES[:open])
{'fraction_non_alphanumeric': 0.14882286995515695, 'fraction_numerical': 0.002242152466367713, 'mean_word_length': 2.9133771929824563, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 32, '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': '2857042', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1118, 'n_words': 203}