[Kanban] AppointmentRepository.GetAllAppointments does not return Comment text
Closed this issue · 3 comments
fcatae commented
The behavior omits the detailed data, but it is not clear from the API.
var response = (from a in _context.Appointments
join w in _context.WorkloadBacklogs on a.AppointmentWorkload.WBID equals w.WBID
orderby a.AppointmentDate descending
select new AppointmentViewModel
{
_AppointmentID = a.AppointmentID,
_AppointmentWorkloadWBID = a.AppointmentWorkload.WBID,
_WorkloadTitle = w.WBTitle,
_AppointmentDate = a.AppointmentDate,
_AppointmentHoursDispensed = a.AppointmentHoursDispensed,
_AppointmentUserUniqueName = a.AppointmentUser.UniqueName
}).ToList();
fcatae commented
The same happens to List<AppointmentViewModel> GetAllAppointments(string user)
fcatae commented
However, GetAppointmentByID
works as expected and returns the comment text.
public AppointmentViewModel GetAppointmentByID(Guid id)
{
var appointment = (from a in _context.Appointments
join w in _context.WorkloadBacklogs on a.AppointmentWorkload.WBID equals w.WBID
join u in _context.Users on a.AppointmentUser.UniqueName equals u.UniqueName
where a.AppointmentID == id
select new AppointmentViewModel
{
_AppointmentID = a.AppointmentID,
_AppointmentUserUniqueName = u.UniqueName,
_AppointmentDate = a.AppointmentDate,
_AppointmentHoursDispensed = a.AppointmentHoursDispensed,
_AppointmentTE = a.AppointmentTE,
_AppointmentWorkloadWBID = w.WBID,
_WorkloadTitle = w.WBTitle,
_AppointmentComment = a.AppointmentComment
}).First();
fcatae commented
Rename the methods to GetAppointmentsSimple.
Closing as by design.
Reason: There is no demand for implementation. Except for GetAppointmentsByWorkload, there is no use case.