Tip: delete removed tasks from PWA (without Hide button!)

B

Boris Key

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

I tested this trick on our server. Projects looks good after that and were not corrupted

Hope this helps someone
 
B

Bob

Thanks,
I'm just getting our instance and people interacting well enough that I can
start looking at some customization like this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top