Admin Tools: Improved daily file export
Closed this issue · 2 comments
Will be pointless when upgraded to pick the files directly. In the mean time:
Current Behavior
In Admin Tools there is an Assignments csv exporter that pulls from the rat_archive. This meets the requirements.
Desired Behavior
- Export table in excel. This will make it easier to read/use.
- Marking files that have changed from yesterday.
Solution for marking files: Make changes in code:
rat_archive %>% filter(is.na(end_date)) %>%
arrange(Box) %>%
mutate(Changed = ifelse(Assigned_Filename == Old_Assigned_Filename, "", "*")) %>%
select(Rat_name, Box, Assigned_Filename, Changed, Assigned_Experiment) %>%
write.csv(paste0(user_settings$projects_folder, "files.csv"), row.names = FALSE)
Point 2 addressed with changes to the code.
So ideally probably add:
InitializeMain()
rat_archive %>% filter(is.na(end_date)) %>%
arrange(Box) %>%
mutate(Changed = ifelse(Assigned_Filename == Old_Assigned_Filename, "", "*")) %>%
select(Rat_name, Box, Assigned_Filename, Changed, Assigned_Experiment) %>%
write.csv(paste0(projects_folder, "files.csv"), row.names = FALSE) #change this to table in xlsx
at the end of supervisor-assign