@ -30,27 +30,27 @@
class DeliverWorkPackageCreatedJob
class DeliverWorkPackageCreatedJob
include MailNotificationJob
include MailNotificationJob
def initialize ( user _id, work_package_id , current_use r_id)
def initialize ( recipient _id, work_package_id , autho r_id)
@user_id = user _id
@recipient_id = recipient _id
@work_package_id = work_package_id
@work_package_id = work_package_id
@current_user_id = current_use r_id
@author_id = autho r_id
end
end
private
private
def notification_mail
def notification_mail
@notification_mail || = UserMailer . work_package_added ( user , work_package , current_use r)
@notification_mail || = UserMailer . work_package_added ( recipient , work_package , autho r)
end
end
def user
def recipient
@user || = Principal . find ( @user _id )
@recipient || = Principal . find ( @recipient _id )
end
end
def work_package
def work_package
@work_package || = WorkPackage . find ( @work_package_id )
@work_package || = WorkPackage . find ( @work_package_id )
end
end
def current_use r
def autho r
@current_use r || = Principal . find ( @current_use r_id )
@autho r || = Principal . find ( @autho r_id )
end
end
end
end