Project

General

Profile

Actions

Defect #24041

closed

Issue subject is not updated when you select another issue in the new "Log time" page

Added by Marius BĂLTEANU over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Time tracking
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

To reproduce:
  1. Open an issue
  2. Click "Log time"
  3. Observe that the issue subject is displayed next to issue (issue_2.png)
  4. Select another issue in the issue field
  5. Observe that the issue subject is still the same (issue_3.png) even if I selected another issue

The attached patch fixes this issue.


Files

issue_3.png (22.1 KB) issue_3.png Marius BĂLTEANU, 2016-10-10 23:42
issue_2.png (22.7 KB) issue_2.png Marius BĂLTEANU, 2016-10-10 23:42
update_issue_subject.patch (1.67 KB) update_issue_subject.patch Marius BĂLTEANU, 2016-10-10 23:46
update_issue_subject_v2.patch (1.67 KB) update_issue_subject_v2.patch Marius BĂLTEANU, 2016-10-12 08:34
update_issue_subject_v3.patch (4.29 KB) update_issue_subject_v3.patch Marius BĂLTEANU, 2016-10-25 10:18
Actions #1

Updated by Marius BĂLTEANU over 7 years ago

Updated the patch to use the actual condition

Actions #2

Updated by Marius BĂLTEANU over 7 years ago

I've found a better solution which use the existing link_to_issue method. Added some assertions too.

Actions #3

Updated by Toshi MARUYAMA over 7 years ago

  • Target version set to 3.2.5
Actions #4

Updated by Marius BĂLTEANU over 7 years ago

The same issue reproduces also in the edit time entry page where the call to "time_entries/new.js" is not made. The JS block which makes the call is rendered only for new records and it is not enough to remove the if statement.

<% if @time_entry.new_record? %>
  $(document).ready(function(){
    $('#time_entry_project_id, #time_entry_issue_id').change(function(){
      $.ajax({
        url: '<%= escape_javascript new_time_entry_path(:format => 'js') %>',
        type: 'post',
        data: $('#new_time_entry').serialize()
      });
    });
  });
<% end %>
Actions #5

Updated by Jean-Philippe Lang over 7 years ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

This should be fixed on both new and edit forms by r15951, thanks.

Actions #6

Updated by Jean-Philippe Lang over 7 years ago

  • Status changed from Resolved to Closed
  • Target version changed from 3.2.5 to 3.4.0

Some routes were changed, setting target to next major release.

Actions #7

Updated by Mischa The Evil over 6 years ago

  • Subject changed from Issue subject is not updated when you select another issue in the new "Log time" page to Issue subject is not updated when you select another issue in the new "Log time" page
Actions

Also available in: Atom PDF