I wrote some time ago about the same issue. This behaviour of MSP is really
inconvenient. So I had to find a solution and I found it. It assumes you
have access to MS SQL server, hosting your MS Project data.
------------
Hello!
Many of us surfer from issue on user's timesheet and resourse assignment
views, then "dead" tasks are always there (with X sign on the left). It
become when you reassign tasks to another resourse or delete it.
Looking on some advice here and with help of MS doc Pjsvrdb.htm, I prepared
small SQL script, which delete such kind of dead tasks (do not really know
to whom they may be useful)
delete from MSP_WEB_ASSIGNMENTS
where WASSN_ID IN (
select ma.WASSN_ID from MSP_WEB_ASSIGNMENTS ma
join MSP_WEB_PROJECTS mp
ON ma.WPROJ_ID = mp.WPROJ_ID
join MSP_WEB_RESOURCES mr
ON ma.WRES_ID = mr.WRES_ID
where
ma.WASSN_DELETED_IN_PROJ <>0
-- AND mp.PROJ_NAME like '25713%' --uncomment it for specific project
)
To make it automatically and to lose headache about it forever, you may
create scheduled job in MS SQL server to run this query every night or more
often
To see list of such tasks you may run next query:
select ma.WASSN_ID, mp.PROJ_NAME, ma.TASK_NAME,mr.RES_NAME, * from
MSP_WEB_ASSIGNMENTS ma
join MSP_WEB_PROJECTS mp
ON ma.WPROJ_ID = mp.WPROJ_ID
join MSP_WEB_RESOURCES mr
ON ma.WRES_ID = mr.WRES_ID
where
ma.WASSN_DELETED_IN_PROJ <>0
order by 1
to delete projects for specific project manager:
delete from MSP_WEB_ASSIGNMENTS
where WASSN_ID IN (
select ma.WASSN_ID from MSP_WEB_ASSIGNMENTS ma
join MSP_WEB_PROJECTS mp
ON ma.WPROJ_ID = mp.WPROJ_ID
join MSP_WEB_RESOURCES mr
ON ma.WRES_ID = mr.WRES_ID
join MSP_WEB_RESOURCES mrp
ON ma.WRES_ID_MGR = mrp.WRES_ID
where
ma.WASSN_DELETED_IN_PROJ <>0 AND
mrp.RES_NAME = 'Boris Tyukin'
)
I tested this trick on our server. Projects looks good after that and were
not corrupted
Hope this helps someone