This commit is contained in:
@@ -316,9 +316,66 @@ namespace Sockeye.Biz
|
||||
res = await client.GetAsync($"{URL_ROCKFISH}api/rfcase/list");
|
||||
responseText = await res.Content.ReadAsStringAsync();
|
||||
var jaRFCaseList = JArray.Parse(responseText);
|
||||
//some cases are missing the start date so substitute a close other case date (not critical but sb at least in the ballpark for list viewing purposes)
|
||||
DateTime dtTempCreated = new DateTime(2000, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
||||
foreach (JObject jRFCase in jaRFCaseList)
|
||||
{
|
||||
todo: iterate cases, import and tag with the caseproject name from the case project list above
|
||||
|
||||
var g = new GZCase();
|
||||
g.CaseId = jRFCase["id"].Value<long>();
|
||||
g.Closed = DateUtil.EpochToDateNullIsNull(jRFCase["dtClosed"].Value<long?>());
|
||||
|
||||
//fuckery to try to insert a at least semi close date when created date is missing
|
||||
DateTime? dtTemp = DateUtil.EpochToDateNullIsNull(jRFCase["dtCreated"].Value<long?>());
|
||||
if (dtTemp == null)
|
||||
{
|
||||
dtTemp = dtTempCreated;
|
||||
}
|
||||
else
|
||||
{
|
||||
dtTempCreated = (DateTime)dtTemp;
|
||||
}
|
||||
g.Created = (DateTime)dtTemp;
|
||||
g.Name = jRFCase["title"].Value<string>();
|
||||
g.Notes = jRFCase["notes"].Value<string>();
|
||||
|
||||
var releaseNotes = jRFCase["releaseNotes"].Value<string>();
|
||||
if (!string.IsNullOrWhiteSpace(releaseNotes))
|
||||
g.Notes += $"\nRelease notes:{releaseNotes}";
|
||||
|
||||
//Project name to tags
|
||||
g.Tags.Add(CaseProjectList.FirstOrDefault(z => z.Id == jRFCase["rfCaseProjectId"].Value<long>()).Name.Replace("z_", "legacy-"));
|
||||
|
||||
//priority to tags
|
||||
g.Tags.Add($"{jRFCase["priority"].Value<long>()}-priority");
|
||||
|
||||
//release version to tags
|
||||
var ver = jRFCase["releaseVersion"].Value<string>();
|
||||
if (!string.IsNullOrWhiteSpace(ver))
|
||||
g.Tags.Add($"release-{ver}");
|
||||
|
||||
GZCaseBiz biz = GZCaseBiz.GetBiz(ct);
|
||||
await biz.CreateAsync(g);
|
||||
|
||||
/*
|
||||
{
|
||||
"id": 4057,
|
||||
"title": "sockeye:forking-case:Fork AyaNova to new RockFish replacement called \"Sockeye\"",
|
||||
"rfCaseProjectId": 44,
|
||||
"priority": 1,
|
||||
"notes": "Replace RockFish with a new server app forked from AyaNova 8 called \"Sockeye\".\nWas going to try to put rockfish code into Ayanova itself but that's not practical too many differences in biz objects but the bones are similar and if I keep it close can help drive parallel development.\n\nTODO:\nfork RAVEN to sockeye, change AyaNova db name stuff to sockeye so can boot and work and replace db at any time\nstrip out licensing code right away to make life easier for the rest\n\nDetermine what overlaps and needs to be kept and what should go, document it fully here step by step\nAyaNova's expected routes and the mycommerce route called with sales data need to be replicated exactly so there is no loss\nWhat objects need to be added and accomodating future cases\n\nduplicate raven to sockeye then get stripping and set up in a parallel route on devops for testing etc.\n=-=-=-\n\n- Import from rockfish via api calls so can do it anytime and won't be a problem of dupes or anything",
|
||||
"dtCreated": null,
|
||||
"dtClosed": null,
|
||||
"releaseVersion": "",
|
||||
"releaseNotes": ""
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
//attachments example
|
||||
// /api/rfcase/4360/attachments
|
||||
//{"dlkey":"ZFkAUpo1L0Gi3Q9aO5szkA","attach":[{"id":259,"name":"desired weight calcs.txt"}]}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace Sockeye.Models
|
||||
public string DbId { get; set; }
|
||||
public DateTime? LastUpdated { get; set; }
|
||||
public DateTime SubscriptionExpire { get; set; }
|
||||
public decimal Cost { get; set; }
|
||||
public bool Trial { get; set; }
|
||||
public string TrialContact { get; set; }
|
||||
public string TrialEmail { get; set; }
|
||||
|
||||
@@ -22,16 +22,16 @@ namespace Sockeye.Util
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
|
||||
private const int DESIRED_SCHEMA_LEVEL = 16;
|
||||
|
||||
internal const long EXPECTED_COLUMN_COUNT = 497;
|
||||
internal const long EXPECTED_COLUMN_COUNT = 498;
|
||||
internal const long EXPECTED_INDEX_COUNT = 74;
|
||||
internal const long EXPECTED_CHECK_CONSTRAINTS = 238;
|
||||
internal const long EXPECTED_CHECK_CONSTRAINTS = 239;
|
||||
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 32;
|
||||
internal const long EXPECTED_VIEWS = 0;
|
||||
internal const long EXPECTED_ROUTINES = 2;
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
|
||||
|
||||
///////////////////////////////////////// (C497:I74:CC238:FC32:V0:R2)
|
||||
///////////////////////////////////////// (C498:I74:CC239:FC32:V0:R2)
|
||||
|
||||
/*
|
||||
|
||||
@@ -888,7 +888,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
|
||||
await ExecQueryAsync("CREATE TABLE asubscriptionserver (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, active BOOL NOT NULL DEFAULT true, created TIMESTAMPTZ NOT NULL, "
|
||||
+ "name TEXT NOT NULL, notes TEXT, datacenter TEXT NOT NULL, timezone TEXT NOT NULL, dbid TEXT, lastupdated TIMESTAMPTZ, subscriptionexpire TIMESTAMPTZ NOT NULL, "
|
||||
+ "trial BOOL NOT NULL DEFAULT true, trialcontact TEXT, trialemail TEXT, trialcompany TEXT, operatingsystem TEXT, customersubdomain TEXT, "
|
||||
+ "trial BOOL NOT NULL DEFAULT true, trialcontact TEXT, trialemail TEXT, trialcompany TEXT, operatingsystem TEXT, customersubdomain TEXT, cost DECIMAL(38,18) NOT NULL default 7, "
|
||||
+ "wiki TEXT, tags VARCHAR(255) ARRAY, customerid BIGINT REFERENCES acustomer(id) )");
|
||||
|
||||
|
||||
|
||||
4
todo.txt
4
todo.txt
@@ -8,4 +8,6 @@ import all vendor data packets from shareit into purchases
|
||||
DTR
|
||||
License routes test locally and ensure works for v7 and v8
|
||||
automatic jobs to create purchase record from vendor data
|
||||
send license emails based on event etc, really gets into the new stuff here
|
||||
send license emails based on event etc, really gets into the new stuff here
|
||||
Need ui that shows money required for paying future for yearly subs so at a glance know what money need in bank each month
|
||||
Also, sidebar, check if can pay d.o. in advance, or do I want that??
|
||||
|
||||
Reference in New Issue
Block a user