Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
1ca61787f8
commit
fc5cab6a56
@@ -531,10 +531,15 @@ const IMPORTERS: ImporterConfig[] = [
|
||||
title: "title", subject: "title",
|
||||
body: "body", content: "body", notes: "body", description: "body",
|
||||
caseid: "_caseext", matterid: "_caseext", casenumber: "_casenum",
|
||||
casename: "_casename", casetitle: "_casename", matter: "_casename", mattername: "_casename",
|
||||
},
|
||||
transform: (r, ctx) => {
|
||||
r.case_id = (r._caseext && ctx.caseByExt.get(String(r._caseext))) || (r._casenum && ctx.caseByNumber.get(String(r._casenum))) || null;
|
||||
delete r._caseext; delete r._casenum;
|
||||
r.case_id =
|
||||
(r._caseext && ctx.caseByExt.get(String(r._caseext))) ||
|
||||
(r._casenum && ctx.caseByNumber.get(String(r._casenum))) ||
|
||||
(r._casename && ctx.caseByTitle.get(String(r._casename).toLowerCase().trim())) ||
|
||||
null;
|
||||
delete r._caseext; delete r._casenum; delete r._casename;
|
||||
if (!r.case_id || !r.body) return null;
|
||||
return r;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user