NOTICE: Branded Content
NOTICE: Certain versions of content (“Material”) accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.
Quality Center / ALM User Discussions
cancel

Send email after Req. is 'really' deleted

Highlighted
justmike23 Frequent Contributor.
Frequent Contributor.

Send email after Req. is 'really' deleted

we found out that there is no action when Req is actually delete.
We can catch action for Req_CanDelete or action which start delete procedure, but after all of that there is always a pop-up "do You want to delete Req',
If I click NO then delete did not took a place. But how to catch if Req. got actually deleted and send email when it got deleted.

5 REPLIES
Knowledge Partner
Knowledge Partner

Re: Send email after Req. is 'really' deleted

Hi JustMike,

When we are on any specific requirement REQ_ID will be captured in the workflow "req_moveto" event.

Say for example you have chosen not to delete this requirement.

In the next step , you can find existence of req using

Reqfact.item(req_id)

If it returns object,that means didn't get deleted, we should not send email in this case, if it doesn't return any object and if it alerts something like REQ ID doesn't exist, then it means req got deleted and we can send email.

Regards,srihari
Micro Focus Expert
Micro Focus Expert

Re: Send email after Req. is 'really' deleted

Hi,

Workflow code only catches situations where users delete items via the UI but not via OTA/REST. If you need to inform users in any case I'd suggest to consider database triggers. Of course you have to be aware that low-level database access is not officially supported and you might have to add the triggers after any ALM patch / upgrade. And your system might send a HUGE number of mails if you delete a large bunch of items...

Regards,

Dirk

justmike23 Frequent Contributor.
Frequent Contributor.

Re: Send email after Req. is 'really' deleted

Hello,

Yes, THANK YOU FOR ANSWER.

I have got the same idea but how to send an email if the object got deleted?

Dim objReqFactory
Dim objReq
Set objReqFactory = TDConnection.ReqFactory
Set objReq = objReqFactory.Item(CLng(iObjectId))

objReq.Mail CStr(strTo), CStr(strCC), 8, CStr(strSubject), CStr(strComment)   ' THIS WILL NOT SEND EMAIL AS OBJECT DOES NOT EXIST ANYLONGER

Knowledge Partner
Knowledge Partner

Re: Send email after Req. is 'really' deleted

Hi JustMike,

I will try to explore more on your question, on how to preserve REQ object data prior to deletion, so we can use the object data after actual deletion.

On a side note, Have you tried "Alert Rules" option in Customization section, here we have a rule "when a requirement is modified or deleted,alert traced to requirements and child requirements".

Sends email to "Author".

Regards,Srihari

justmike23 Frequent Contributor.
Frequent Contributor.

Re: Send email after Req. is 'really' deleted

hello,

Yes I  have tried to at first get and save gloably an indicator to Req. object then after delete use it for SendEmail but it is not sending it.

Did not tried as we would like to perform diferent action on modified than on deleted.