Some problems found when trying to send emails

Feb 16, 2013 at 5:35 PM
Hi!

I was checking How to send mails when a Project started and I discovered that it has a problem.

I got an exception at TeamService class, it's caused by a null object ... the object is from the AuthorizationService class.

I realized that when calling the "GetProjectMembers_skipAuth" method, it was calling another method that required authorization, so it threw an exception.

To solve the problem, i had to do some changes:
  1. Added a ITaksRepository object to the TeamService class
  2. Changed a line on the "GetProjectMembers_skipAuth" method:
    ICollection<TodayMemberPalnnedhours> hours = taskRepository.GetTodayPlannedHoursByProjectUId(projectUId);
Using a direct call to the repository solves the problem.

One of the new requirements of my company is "send a mail to the meber when a task is assigned to him" and "send a mail to the S.M when a task is finished or canceled". It would be great to see that functions on the next release, and an option to activate/deactivate it for the Factory Owner.

I hope that helps you, have a nice weekend!
Coordinator
Feb 18, 2013 at 6:22 PM
Hi Thanks again!

I end up solving the problem in a diffenet way:

I moved the following lines:

ICollection<TodayMemberPlannedHours> hours = tasksService.GetTodayMemberPlannedHours(projectUId, null);
AssignTodayPlannedHoursToMembers(members, hours);


from the method "GetProjectMembers_skipAuth" to the method "GetProjectMembers".

There was no need for the members planned hours to be attached to members at the _skipAuth.

Thanks

Klot



From: [email removed]
To: [email removed]
Date: Sat, 16 Feb 2013 09:35:10 -0800
Subject: Some problems found when trying to send emails [thescrumfactory2012:433374]

From: mjpena
Hi!

I was checking How to send mails when a Project started and I discovered that it has a problem.

I got an exception at TeamService class, it's caused by a null object ... the object is from the AuthorizationService class.

I realized that when calling the "GetProjectMembers_skipAuth" method, it was calling another method that required authorization, so it threw an exception.

To solve the problem, i had to do some changes:
  1. Added a ITaksRepository object to the TeamService class
  2. Changed a line on the "GetProjectMembers_skipAuth" method:
    ICollection<TodayMemberPalnnedhours> hours = taskRepository.GetTodayPlannedHoursByProjectUId(projectUId);
Using a direct call to the repository solves the problem.

One of the new requirements of my company is "send a mail to the meber when a task is assigned to him" and "send a mail to the S.M when a task is finished or canceled". It would be great to see that functions on the next release, and an option to activate/deactivate it for the Factory Owner.

I hope that helps you, have a nice weekend!
Read the full discussion online.
To add a post to this discussion, reply to this email (thescrumfactory2012@discussions.codeplex.com)
To start a new discussion for this project, email thescrumfactory2012@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com