This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# “Do the simplest thing that will work.”
|
||||
|
||||
//COMMENT FLAGS:
|
||||
//TODO: means something that needs to be done but is awaiting something else. This is a *MUST* do.
|
||||
//LOOKAT: means something that I want to think about and revisit later but is not urgent
|
||||
//BEFORE_RELEASE: means something that MUST be changed before release, usually special debugging code for development or testing
|
||||
|
||||
|
||||
|
||||
Error messages / Numbers
|
||||
|
||||
@@ -22,9 +22,6 @@ Overall plan for now: anything standing in the way of making the initial client
|
||||
- v7importusers (on hold?)
|
||||
- Mostly done for now with the exception of client id and headoffice id which await the client and headoffice objects respectively and their importers
|
||||
|
||||
- Why are inactive users allowed to login?
|
||||
- Seed data is seeding users inactive, sb active
|
||||
|
||||
- USER OBJECT
|
||||
- Check biz rules in v7 for anything that might be missed in RAVEN biz rules
|
||||
- NEED a document with checklist to go over to ensure that a v7 object ported to RAVEN is "DONE" i.e. not missing any biz rules or properties or something
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
|
||||
|
||||
//TODO: Centralize this code somewhere else, it's going to be needed for backup as well
|
||||
//LOOKAT: Centralize this code somewhere else, it's going to be needed for backup as well
|
||||
//consider the 1 hour thing, is this legit depending on client?
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
/*
|
||||
TODO:
|
||||
LOOKAT:
|
||||
A backup archive consists of a similar format to the v7 data dumper utility, json file per object in subdirectories corresponding to object type all in a zip archive
|
||||
|
||||
Route to trigger restore from selected file
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
//UPDATE: I think it should be ok so commenting this out for now pending something coming up in testing
|
||||
// //TODO: I decided not to allow trial to import v7 data.
|
||||
// //LOOKAT: I decided not to allow trial to import v7 data.
|
||||
// //This was a snap decision, I didn't think about it much other than
|
||||
// //I'm concerned right now as of April 17 2018 during development that
|
||||
// //a trial user will import their old AyaNova data and then ... well somehow continue to use it I guess,
|
||||
|
||||
@@ -132,12 +132,12 @@ namespace AyaNova.Biz
|
||||
//Now can do user locale settings properly
|
||||
await DoImport("GZTW.AyaNova.BLL.User", "locale", AyaType.User, job.GId, importMap, importFileName, zipEntries);
|
||||
|
||||
//CLIENT
|
||||
//TODO: CLIENT
|
||||
//do import for client here
|
||||
//Now can do user client settings properly
|
||||
//await DoImport("GZTW.AyaNova.BLL.User","clientid", AyaType.User, job.GId, importMap, importFileName, zipEntries);
|
||||
|
||||
//HEADOFFICE
|
||||
//TODO: HEADOFFICE
|
||||
//do import for ho here
|
||||
//Now can do user ho settings properly
|
||||
//await DoImport("GZTW.AyaNova.BLL.User","headofficeid", AyaType.User, job.GId, importMap, importFileName, zipEntries);
|
||||
@@ -146,8 +146,6 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
|
||||
//TODO: second pass now that all objects are in the db, need to go through again and set properties based on all imported data, e.g. scheduleableUserGroups are tags that must now be set on users
|
||||
|
||||
//----------------
|
||||
JobsBiz.LogJob(job.GId, "ImportAyaNova7 finished", ct);
|
||||
JobsBiz.UpdateJobStatus(job.GId, JobStatus.Completed, ct);
|
||||
|
||||
@@ -297,7 +297,7 @@ namespace AyaNova.Biz
|
||||
}
|
||||
//Get a list of non-exlusive jobs that are due
|
||||
|
||||
//TODO: Parallelize / background this block
|
||||
//LOOKAT: Parallelize / background this block
|
||||
//http://www.dotnetcurry.com/dotnet/1360/concurrent-programming-dotnet-core
|
||||
|
||||
//var backgroundTask = Task.Run(() => DoComplexCalculation(42));
|
||||
|
||||
@@ -32,9 +32,7 @@ namespace AyaNova.Biz
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
TODO: add methods here to deal with various tag operations in the db
|
||||
*/
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//CREATE
|
||||
|
||||
@@ -30,10 +30,7 @@ namespace AyaNova.Biz
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
TODO: add methods here to deal with various tag operations in the db
|
||||
*/
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//CREATE
|
||||
internal async Task<TagMap> CreateAsync(TagMapInfo inObj)
|
||||
|
||||
@@ -238,6 +238,30 @@ namespace AyaNova.Biz
|
||||
}
|
||||
|
||||
|
||||
|
||||
//TODO: Validation rules that require future other objects that aren't present yet:
|
||||
/*
|
||||
//Don't allow to go from non scheduleable if there are any scheduled workorder items because
|
||||
//it would damage the history
|
||||
BrokenRules.Assert("UserType","User.Label.MustBeScheduleable","UserType",(mUserType==UserTypes.Schedulable) && (ScheduledUserCount(this.mID,false)>0));
|
||||
|
||||
mUserType = value;
|
||||
|
||||
BrokenRules.Assert("UserTypeInvalid","Error.Object.FieldValueNotBetween,User.Label.UserType,1,7","UserType",((int)value<1 || (int)value>6));
|
||||
|
||||
bool bOutOfLicenses=OutOfLicenses;
|
||||
BrokenRules.Assert("ActiveLicense","Error.Security.UserCapacity","Active",bOutOfLicenses);
|
||||
BrokenRules.Assert("UserTypeLicense","Error.Security.UserCapacity","UserType",bOutOfLicenses);
|
||||
|
||||
//Case 850
|
||||
BrokenRules.Assert("ClientIDInvalid", "Error.Object.RequiredFieldEmpty,O.Client", "ClientID",
|
||||
(mUserType== UserTypes.Client && mClientID==Guid.Empty));
|
||||
|
||||
BrokenRules.Assert("HeadOfficeIDInvalid", "Error.Object.RequiredFieldEmpty,O.HeadOffice", "HeadOfficeID",
|
||||
(mUserType == UserTypes.HeadOffice && mHeadOfficeID == Guid.Empty));
|
||||
|
||||
*/
|
||||
|
||||
if (!inObj.UserType.IsValid())
|
||||
{
|
||||
AddError(ValidationErrorType.InvalidValue, "UserType");
|
||||
@@ -290,6 +314,10 @@ namespace AyaNova.Biz
|
||||
AddError(ValidationErrorType.InvalidValue, "Roles");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -327,11 +355,12 @@ namespace AyaNova.Biz
|
||||
|
||||
public async Task<bool> ImportV7Async(JObject j, List<ImportAyaNova7MapItem> importMap, Guid jobId)
|
||||
{
|
||||
//TODO: Some of these items will need to be imported in future USEROPTIONS object that doesn't exist yet
|
||||
#region V7 record format
|
||||
/*
|
||||
{
|
||||
"DefaultLanguage": "Custom English",
|
||||
TODO: "DefaultServiceTemplateID": "ca83a7b8-4e5f-4a7b-a02b-9cf78d5f983f",
|
||||
"DefaultServiceTemplateID": "ca83a7b8-4e5f-4a7b-a02b-9cf78d5f983f",
|
||||
"UserType": 2,
|
||||
"Active": true,
|
||||
"ClientID": "00000000-0000-0000-0000-000000000000",
|
||||
@@ -537,7 +566,7 @@ namespace AyaNova.Biz
|
||||
#endregion set locale
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case "clientid":
|
||||
{
|
||||
var V7Id = new Guid(j["ID"].Value<string>());
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace AyaNova.Generator
|
||||
|
||||
|
||||
/*
|
||||
TODO: Generator tasks that should happen:
|
||||
LOOKAT: Generator tasks that should happen:
|
||||
- Periodically erase any temp files written to userfiles root (attachments temp files) that are older than a day
|
||||
- These files should be normally erased within seconds after uploading and processing into their permanent folder but shit will go wrong
|
||||
*/
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace AyaNova.Util
|
||||
exec("CREATE TABLE aevent (id BIGSERIAL PRIMARY KEY, created timestamp not null, ownerid bigint not null," +
|
||||
"ayid bigint not null, aytype integer not null, ayevent integer not null, textra varchar(255))");
|
||||
|
||||
//TODO: do I *really* need these or do they bloat unnecessarily? Need to test with big dataset
|
||||
//LOOKAT: do I *really* need these or do they bloat unnecessarily? Need to test with big dataset
|
||||
//index for quick searching
|
||||
// exec("CREATE INDEX ayid_idx ON aevent (ayid);");
|
||||
// exec("CREATE INDEX aytype_idx ON aevent (aytype);");
|
||||
@@ -226,7 +226,7 @@ namespace AyaNova.Util
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
//LICENSE table new columns
|
||||
//TODO: DO I need this anymore???
|
||||
//LOOKAT: DO I need this anymore???
|
||||
if (currentSchema < 8)
|
||||
{
|
||||
LogUpdateMessage(log);
|
||||
|
||||
@@ -306,7 +306,8 @@ namespace AyaNova.Util
|
||||
|
||||
|
||||
///////////////////////////////////////////
|
||||
// Check if DB is empty
|
||||
// Check if DB is empty
|
||||
// CALLED BY LICENSE CONTROLLER AND LICENSE.CS FOR TRIAL Request check
|
||||
//
|
||||
internal static bool DBIsEmpty(AyContext ctx, ILogger _log)
|
||||
{
|
||||
|
||||
@@ -334,6 +334,7 @@ namespace AyaNova.Core
|
||||
/// <returns>Result string</returns>
|
||||
internal static string RequestTrial(string email, string regto, ILogger log)
|
||||
{
|
||||
//BEFORE_RELEASE: DO THE FOLLOWING BEFORE RELEASE:
|
||||
//TODO: TESTING REMOVE BEFORE RELEASE
|
||||
//for test purposes if this route is hit and this code executed then the dbid is temporarily changed to the special trial request
|
||||
//dbid so I can test remotely without hassle
|
||||
@@ -513,7 +514,8 @@ namespace AyaNova.Core
|
||||
|
||||
//Update current license
|
||||
CurrentInDbKeyRecord.Key = RawTextNewKey;
|
||||
//TODO: reason, resultcode etc
|
||||
//LOOKAT: reason, resultcode etc
|
||||
//There is similar block related to this in ayschema for db schema version 8
|
||||
ctx.SaveChanges();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -252,7 +252,7 @@ namespace AyaNova.Util
|
||||
u.Roles = roles;
|
||||
u.LocaleId = ServerBootConfig.AYANOVA_DEFAULT_LANGUAGE_ID;
|
||||
u.UserType = userType;
|
||||
//TODO: if usertype is subcontractor or client or headoffice it needs to set a corresponding user's parent org record id to go with it
|
||||
//TODO: After have USER and HEADOFFICE and VENDOR, if usertype is subcontractor or client or headoffice it needs to set a corresponding user's parent org record id to go with it
|
||||
|
||||
ct.User.Add(u);
|
||||
}
|
||||
|
||||
@@ -73,10 +73,6 @@ namespace raven_integration
|
||||
a = await Util.DeleteAsync("Tag/" + tagId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
||||
Util.ValidateViolatesReferentialIntegrityError(a);
|
||||
|
||||
//TODO:
|
||||
//Test delete parent object deletes tagmaps (widget delete)
|
||||
|
||||
|
||||
//DELETE TAGMAP
|
||||
a = await Util.DeleteAsync("TagMap/" + tagMapId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
||||
Util.ValidateHTTPStatusCode(a, 204);
|
||||
|
||||
Reference in New Issue
Block a user