Defect #24041

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

Added by Marius BALTEANU 9 months ago. Updated 7 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Time tracking
Target version:3.4.0
Resolution:Fixed Affected version:3.3.1

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.

issue_3.png (22.1 KB) Marius BALTEANU, 2016-10-10 23:42

issue_2.png (22.7 KB) Marius BALTEANU, 2016-10-10 23:42

update_issue_subject.patch Magnifier (1.67 KB) Marius BALTEANU, 2016-10-10 23:46

update_issue_subject_v2.patch Magnifier (1.67 KB) Marius BALTEANU, 2016-10-12 08:34

update_issue_subject_v3.patch Magnifier (4.29 KB) Marius BALTEANU, 2016-10-25 10:18

Associated revisions

Revision 15951
Added by Jean-Philippe Lang 7 months ago

Issue subject is not updated when you select another issue on time entry form (#24041).

History

#1 Updated by Marius BALTEANU 9 months ago

Updated the patch to use the actual condition

#2 Updated by Marius BALTEANU 8 months ago

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

#3 Updated by Toshi MARUYAMA 8 months ago

  • Target version set to 3.2.5

#4 Updated by Marius BALTEANU 8 months 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 %>

#5 Updated by Jean-Philippe Lang 7 months 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.

#6 Updated by Jean-Philippe Lang 7 months 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.

Also available in: Atom PDF