Opened 9 years ago

Closed 9 years ago

#1998 closed defect (fixed)

Viewing a job when a project is active changes the job's project to that project

Reported by: Nicklas Nordborg Owned by: everyone
Priority: critical Milestone: BASE 3.8
Component: core Version:
Keywords: Cc:

Description

This is not something that is easy to see since the project that is associated with a job is not displayed anywhere in the gui.

Adding some debug output reveals that a job that is created with one active project and then viewed when another project is active is switching to the other project.

Change History (2)

comment:1 by Nicklas Nordborg, 9 years ago

I think this has happened as a side-effect of #1802 [6447]. This change added Transactional as an implemented interface to the Job class, which means that the onBeforeCommit() method is called every time a transaction is committed. Before this change the method was only called when the job was created. The onBeforeCommit() method include code for setting the active project, but this must be moved behind a conditional statement that is only executed for CREATE actions. See Job.java lines 325-342.

comment:2 by Nicklas Nordborg, 9 years ago

Resolution: fixed
Status: newclosed

(In [7119]) Fixes #1998: Viewing a job when a project is active changes the job's project to that project

Note: See TracTickets for help on using tickets.