c9604780dd0b68875f447e935e4e89eac57f183d
hiram
  Mon Jan 19 13:30:56 2026 -0800
write liftRequest entry into the hgcentral.ottoRequest table refs #31811

diff --git src/hg/hubApi/liftOver.c src/hg/hubApi/liftOver.c
index b79f1055256..bb894bb5f4b 100644
--- src/hg/hubApi/liftOver.c
+++ src/hg/hubApi/liftOver.c
@@ -299,26 +299,40 @@
     if (! (endsWith(dir, ".ucsc.edu/") && sameWord(name, "liftRequest") && sameWord(ext, ".html")))
           apiErrAbort(err400, err400Msg, "can not find required inputs for endpoint '/liftRequest");
     } else {
       if (! debug)
           apiErrAbort(err400, err400Msg, "can not find required inputs for endpoint '/liftRequest");
     }
 
 char *toAddr = cfgOption("chainFileRequestEmail");
 char *fromAddr = cfgOption("apiFromEmail");
 
 if (isNotEmpty(toAddr) && isNotEmpty(fromAddr))
     {
     struct dyString *msg = newDyString(0);
     /* may need to encode these inputs to make them safe */
     dyStringPrintf(msg, "Lift over request\nfrom: %s\nto: %s\nemail '%s'\ncomment: '%s'", fromGenome, toGenome, email, comment);
-    /* our mailViaPipa never has any relevant return code indicating
-    *    success or failure.  So, ignore the return integer:
+    /* Even if the mailViaPipe returned a relevant return code, and I'm not
+    *    sure it would, there isn't much we can do about it from here.
     */
     (void) mailViaPipe(toAddr, "liftOver request", msg->string, fromAddr);
 
     /* some kind of response here back to the request page */
     struct jsonWrite *jw = apiStartOutput();
     jsonWriteString(jw, "msg", dyStringCannibalize(&msg));
     apiFinishOutput(0,NULL,jw);
+    char *ottoTable = cfgOption("ottoTable");	/* probably ottoRequest */
+    if (isNotEmpty(ottoTable))
+        {
+        struct sqlConnection *conn = hConnectCentral();
+        if (sqlTableExists(conn, ottoTable))
+	    {
+            struct dyString *update = newDyString(0);
+            sqlDyStringPrintf(update,
+		"INSERT INTO %s VALUES ( '%s','%s','%s','%s')",
+		ottoTable,  fromGenome, toGenome, email, comment);
+            sqlUpdate(conn, dyStringCannibalize(&update));
+	    }
+        hDisconnectCentral(&conn);
+        }
     }
 }	/*	void apiLiftRequest(char *words[MAX_PATH_INFO])	*/