ucEditPostUpdate

Purpose

Update of external database objects or anything that requires the change to be committed is best done at this point

Applies To

Edit Issue screen

Signature

public void ucEditPostUpdate (
      Problem pProblem, 	// the problem or case
      ArrayList pReleases, 	// the list of releases
      ArrayList pModules,	// the list of modules
      ArrayList pUdfs, 		// the list of UDF's
      SesameSession session)    // the current Sesame Session

Notes

This is called during the edit process after the main problem update, but before email is generated

Example

  public void ucEditPostUpdate (
                       Problem item,                    // the item or case
                       ArrayList releases,              // the list of releases
                       ArrayList modules,               // the list of modules
                       ArrayList udfs,                  // the list of UDF's
                       SesameSession session) {         // the current sesameSession
    
        super.ucEditPostUpdate(item, releases, modules, udfs, session);

        String areaId = null;
        String projectId = null;
        String status = null;
        String category = null;

        if (item != null) {
            areaId = item.getAreaId();
            projectId = item.getProjctId();
            status = item.getStatus();
            category = item.getCategory();
        }

        String oldStatus = (String) session.getAttribute("UC__OLD_STATUS");
        session.removeAttribute("UC__OLD_STATUS");

        // send email only on new closure of record
        if (A_IT.equals(areaId) && "CLOSED".equals(status) 
            && ! "CLOSED".equals(oldStatus) 
            && "IT_LICENSE_KEY_DELIVERY".equals(category) ) {
            sendLicenseKeyEmail(item, udfs, session);
        }
    }