fcatae / Arda

Arda is an open source tool designed to manage team workloads.
42 stars 18 forks source link

[Kanban] AppointmentRepository.GetAllAppointments does not return UserName #46

Closed fcatae closed 7 years ago

fcatae commented 7 years ago

It returns the user unique name, but not the user name.

            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 7 years ago

The same applies to public List<AppointmentViewModel> GetAllAppointments(string user)

fcatae commented 7 years ago

It also happens at public AppointmentViewModel GetAppointmentByID(Guid id)

fcatae commented 7 years ago

It does not return UserName, but it returns UniqueName.

Workaround: lookup username by UniqueName.

fcatae commented 7 years ago

Closing as won't fix. Reason: it requires an additional join to retrieve the username. However, this information is not important and it is quite expensive (in terms of network bandwidth). There is no demand to justify it.