This commit is contained in:
@@ -327,6 +327,11 @@ namespace Sockeye.Biz
|
||||
var g = new GZCase();
|
||||
g.CaseId = jRFCase["id"].Value<long>();
|
||||
g.Closed = DateUtil.EpochToDateNullIsNull(jRFCase["dtClosed"].Value<long?>());
|
||||
//NOTE: closed in rockfish was the date at midnight in GMT
|
||||
//so to be in the same day as here need to add a few hours, let's say 8 am for each so add 8 hours
|
||||
if(g.Closed!=null){
|
||||
g.Closed=((DateTime)g.Closed).AddHours(8);
|
||||
}
|
||||
|
||||
//fuckery to try to insert a at least semi close date when created date is missing
|
||||
DateTime? dtTemp = DateUtil.EpochToDateNullIsNull(jRFCase["dtCreated"].Value<long?>());
|
||||
@@ -360,13 +365,13 @@ namespace Sockeye.Biz
|
||||
//if needed in future can manually xfer it over from the rockfish.sqlite db directly using DB BRowser for sqlite which allows opening the blob from the rfcaseblob table and saving it
|
||||
res = await client.GetAsync($"{URL_ROCKFISH}api/rfcase/{g.CaseId}/attachments");
|
||||
responseText = await res.Content.ReadAsStringAsync();
|
||||
var jaAttachments = JArray.Parse(responseText);
|
||||
if (jaAttachments.Count() > 0)
|
||||
var jAttachments = JObject.Parse(responseText);
|
||||
if (jAttachments["attach"].Count() > 0)
|
||||
{
|
||||
g.Notes += "\n********\nRockfish attachments\n";
|
||||
foreach (JObject jAttachmentRecord in jaAttachments["attach"])
|
||||
foreach (JObject jAttachmentRecord in jAttachments["attach"])
|
||||
{
|
||||
g.Notes += $"FileName: \"{jAttachmentRecord["name"].Value<string>()}\", rfcaseblob table id: {jAttachmentRecord["id"].Value<long>()}";
|
||||
g.Notes += $"File: \"{jAttachmentRecord["name"].Value<string>()}\", rfcaseblob table id: {jAttachmentRecord["id"].Value<long>()}\n";
|
||||
|
||||
}
|
||||
g.Notes += "\n********\n";
|
||||
@@ -375,9 +380,10 @@ namespace Sockeye.Biz
|
||||
GZCaseBiz biz = GZCaseBiz.GetBiz(ct);
|
||||
await biz.CreateAsync(g);
|
||||
|
||||
//attachments example
|
||||
//attachments example 86400000
|
||||
// /api/rfcase/4360/attachments
|
||||
//{"dlkey":"ZFkAUpo1L0Gi3Q9aO5szkA","attach":[{"id":259,"name":"desired weight calcs.txt"}]}
|
||||
//{"dlkey":"iR6ncD70CkzkozyT0otA","attach":[]}
|
||||
|
||||
|
||||
|
||||
|
||||
16
todo.txt
16
todo.txt
@@ -4,6 +4,22 @@ import trial requests
|
||||
import licenses
|
||||
import all vendor data packets from shareit into purchases
|
||||
|
||||
- direct open a case by case number like workorder
|
||||
(id's differ so it isn't easy to just open a case in the url)
|
||||
|
||||
bugs:
|
||||
search:
|
||||
Exception data:
|
||||
Severity: ERROR
|
||||
SqlState: 42703
|
||||
MessageText: column "name" does not exist
|
||||
InternalPosition: 8
|
||||
InternalQuery: SELECT name FROM apurchase WHERE id = '732'
|
||||
Where: PL/pgSQL function aygetname(bigint,integer,integer) line 53 at EXECUTE
|
||||
File: parse_relation.c
|
||||
Line: 3599
|
||||
Routine: errorMissingColumn
|
||||
|
||||
|
||||
DTR
|
||||
License routes test locally and ensure works for v7 and v8
|
||||
|
||||
Reference in New Issue
Block a user