Giter Club home page Giter Club logo

dovetail-bootstrap's People

Contributors

barretts avatar garylcoxjr avatar gsherman avatar jmarnold avatar kevm avatar mpawelczyk avatar styson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dovetail-bootstrap's Issues

Attachment upload and download

Attachments are a PITA in Clarify. We need a standard endpoint that accepts attachment uploads.

The web end point should take a file upload and an object to which it should be attached.

The backend storage of this attachment should be modular and default the to the standard Clarify mechanism of storing it to a file path written to the doc_path record.

Alternative backends that store attachments "in the cloud" would be fantastic
@huboard:{"order":6.0,"milestone_order":8,"custom_state":""}

Swagger docs integration

One of the primary goals of Bootstrap is to be a web services platform for Clarify instances. Swagger has very nice auto documentation and client proxy support for Rest-ty APIs.

SwaggerExample

The goal is to add a Swagger fubu policy which interrogates the BehaviorGraph for IAPI endpoints and emits the correct Swagger-spec output.
@huboard:{"order":12.0}

History - Optionally intermix subcase history with case history

Clarify client mixes subcase history with case history.

Making history heterogeneous could add a bit of complexity. How does the view provide links to the child elements? We would need a a way of identifying the source object of each history element.

History.Parser.HistoryItemParser.ParseEmailLog times out on a HUGE email

likely the regex is timing out.
when we've run into issues like this before, we've executed the regex on its own thread with a timeout, so we can trap for it and handle it.

this seems like a very unrealistic test

2017-11-13 18:59:05,923 [13] ERROR Agent.Core.Configuration.UnhandledExceptionLoggingBehavior - (null) A route /agent/core/history?Id=1002813&Type=case&IsVerbose=false&_=1510627020603 caused an exception that was not handled. 
System.Threading.ThreadAbortException: Thread was being aborted.
   at Dovetail.SDK.Bootstrap.History.Parser.HistoryItemParser.ParseEmailLog(String input)
   at Dovetail.SDK.Bootstrap.History.Parser.HistoryOutputParser.EncodeEmailLog(String input)
   at Dovetail.SDK.Bootstrap.History.CommonActEntryBuilderDSLExtensions.EncodeEmail(IHistoryOutputParser historyOutputParser, HistoryItem item)
   at Dovetail.SDK.Bootstrap.History.HistoryItemAssembler.createActivityDTOFromMapper(ActEntry actEntry, IDictionary`2 templateRelatedGenerics)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Dovetail.SDK.Bootstrap.History.HistoryItemAssembler.Assemble(ClarifyGeneric actEntryGeneric, IDictionary`2 templatesByCode, HistoryRequest historyRequest)
   at Dovetail.SDK.Bootstrap.History.HistoryBuilder.Build(HistoryRequest request, Action`2 genericAction)
   at Dovetail.SDK.Bootstrap.History.AssemblerPolicies.CaseHistoryAssemblerPolicy.BuildHistory(HistoryRequest request)
   at Dovetail.SDK.Bootstrap.History.HistoryAssembler.GetHistory(HistoryRequest request)
   at FubuMVC.Core.Behaviors.OneInOneOutActionInvoker`3.performInvoke()
   at FubuMVC.Core.Behaviors.BasicBehavior.Invoke()
   at FubuMVC.Core.Continuations.ContinuationHandler.InvokeNextBehavior()
   at FubuMVC.Core.Continuations.ContinuationHandler.performInvoke()
   at FubuMVC.Core.Behaviors.BasicBehavior.Invoke()
   at FubuMVC.Core.Behaviors.BasicBehavior.<.ctor>b__0()
   at FubuMVC.Core.Behaviors.BasicBehavior.Invoke()
   at FubuMVC.Core.Behaviors.BasicBehavior.<.ctor>b__0()
   at FubuMVC.Core.Behaviors.BasicBehavior.Invoke()
   at Agent.Core.Configuration.UnhandledExceptionLoggingBehavior.wrapBehaviorInLogger(Action action)
2017-11-13 19:00:05,549 [18] WARN  Dovetail.SDK.Bootstrap.History.Parser.HistoryItemParser - (null) Could not parse email log. Contents:

Create Case

Contact, Site, Title, Description

and...

Case Type
Priority
Severity
Queue

integration tests probably wont work for customers

The integration tests probably wont work for customers.

The tests reference data that they probably don't have, such as:
const string level1Title = "Marketing Information";
const string listTitle = "CR_DESC";
const string level1Title = "PC";
const string level2Title = "Windows 3.1";
etc.

should we add some more details about running the integration tests in teh readme?
such as, if you're a customer - don't run them?

lets discuss.

Potential caching issue with variables over time

Observed in Focus:

2017-11-22 09:59:41,787 [22] ERROR Agent.Core.Configuration.UnhandledExceptionLoggingBehavior - (null) A route /agent/support/cases/16207?_=1511366386982 caused an exception that was not handled. 
System.NullReferenceException: Object reference not set to an instance of an object.
   at FChoice.Foundation.FCSession.get_UserName()
   at Dovetail.SDK.ModelMap.SdkUserNameVariable.Expand(VariableExpansionContext context)
   at Dovetail.SDK.ModelMap.Serialization.XElementSerializer.Deserialize[T](XElement element)
   at Dovetail.SDK.ModelMap.Serialization.AddArgument.Visit(XElement element, ModelMap map, ParsingContext context)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.<>c__DisplayClass3.<Visit>b__1(IElementVisitor visitor)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.Visit(XElement element, ModelMap map, ParsingContext context)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.<>c__DisplayClass3.<Visit>b__1(IElementVisitor visitor)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.Visit(XElement element, ModelMap map, ParsingContext context)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.<>c__DisplayClass3.<Visit>b__1(IElementVisitor visitor)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.Visit(XElement element, ModelMap map, ParsingContext context)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.<>c__DisplayClass3.<Visit>b__1(IElementVisitor visitor)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.Visit(XElement element, ModelMap map, ParsingContext context)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.<>c__DisplayClass3.<Visit>b__1(IElementVisitor visitor)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.Visit(XElement element, ModelMap map, ParsingContext context)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.<>c__DisplayClass3.<Visit>b__1(IElementVisitor visitor)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.Visit(XElement element, ModelMap map, ParsingContext context)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.<>c__DisplayClass3.<Visit>b__1(IElementVisitor visitor)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.Visit(XElement element, ModelMap map, ParsingContext context)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.<>c__DisplayClass3.<Visit>b__1(IElementVisitor visitor)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.Visit(XElement element, ModelMap map, ParsingContext context)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.<>c__DisplayClass3.<Visit>b__1(IElementVisitor visitor)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.Visit(XElement element, ModelMap map, ParsingContext context)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.<>c__DisplayClass3.<Visit>b__1(IElementVisitor visitor)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.XElementService.Visit(XElement element, ModelMap map, ParsingContext context)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.Serialization.ModelMapParser.parse(ModelMap map, XDocument document, ModelMapCompilationReport report)
   at Dovetail.SDK.ModelMap.Serialization.ModelMapParser.Parse(ModelMap map, String filePath)
   at Dovetail.SDK.ModelMap.Serialization.Overrides.ModelMapOverrideParser.Parse(ModelMap map, String filePath)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction)
   at Dovetail.SDK.ModelMap.ModelMapCache.findMaps(String include)
   at System.Lazy`1.CreateValue()

This happened with ALL maps.
Caching was disabled at the time.

Possible bug ModelMap ViaAdHocRelation

Commonwealth ran into a possible bug when ViaAdHocRelation is used under the context of a MapMany.To(). They do not see the ad hoc table being traversed.

I believe this is happening because currently because ad hoc relations are all being created off the root generic.

createcase api is not honoring user

I created a case using the CreateCase API, using a token for a user named "dovetail"
the case was created by the user "sa"
It should have been created as the user "dovetail"

@huboard:{"order":13.0}

HistoryItemParser logging errors, but I think these should be warnings

Since we're catching and not re-throwing these, should we just log as warnings rather than errors?

        public IEnumerable<IItem> ParseContent(string input)
        {
            try
            {
                return _historyParser.ContentItem.Many().End().Parse(input);
            }
            catch (Exception e)
            {
                _logger.LogError("Could not parse content. Contents:\n\n{0}".ToFormat(input), e);
                return fakeContent(input);
            }
        }

        public EmailLog ParseEmailLog(string input)
        {
            try
            {
                return _historyParser.LogEmail.Parse(input);
            }
            catch (Exception e)
            {
                _logger.LogError("Could not parse email log. Contents:\n\n{0}".ToFormat(input), e);
                return fakeEmailLog(input);
            }
        }

Cookies for authenticated user whose login names are not valid Clarify users is a PITA

(10101) Could not log in user 'annie', invalid username or password.

This is very much an edge case.

in development when switching databases being used for a given domain (localhost) and if your web browser has a cookie that is valid and authenticated for a users who does not exist on the new database.

The only way to be able to login is to go into developer tools and delete the Agent.auth cookie.

Maybe the web server if it sees a valid cookie for a user that does not exist could tell the browser to delete the cookie.

Logger is too verbose

2012-03-05 15:33:27,177 DEBUG Dovetail.SDK.Bootstrap.ILogger - (null) Whitelisting default extensions: gif, jpg, css, js, png, htm, html

Every request is thrown out this log
@huboard:{"order":11.0}

default rake task, unit tests, talking to database

The default rake task:
rake default # Default, compiles and runs unit tests

is touching the database, creating cases, etc.

this is unexpected.

expected it to just run unit tests, not integration tests.

Session lookup is case-sensitive resulting with multiple sessions per user

Reported in https://support.dovetailsoftware.com/agent/support/cases/24670

Steps to reproduce:

Test 1: Only use lowercase login name.

  1. recycle the app pool for Agent 21
  2. log into Agent 21 three times from different browser windows, using sa as login name.
  3. Go to Admin -> User Sessions: observe Number of User Sessions: 1 and Active Users: sa
  4. Do some "walking around" - view/edit cases, sites, contacts, etc. in all three instances
  5. Go to Admin -> User Sessions: observe Number of User Sessions: 1 and Active Users: sa

Test 2: Use mixed case login name.

  1. recycle the app pool for Agent 21
  2. log into Agent 21 three times from different browser windows but use sa, Sa, and SA as login names.
  3. Go to Admin -> User Sessions: observe Number of User Sessions: 3 and Active Users: sa, Sa, SA
  4. Do some "walking around" - view/edit cases, sites, contacts, etc. in all three instances
  5. Go to Admin -> User Sessions: observe Number of User Sessions: 1 and Active Users: sa, Sa, SA

Test 3: Only use uppercase login name.

  1. recycle the app pool for Agent 21
  2. log into Agent 21 one time using ANNIE as login name.
  3. Do some "walking around" - view/edit cases, sites, contacts, etc.
  4. log into Agent 21 from another browser window using sa as login name.
  5. Go to Admin -> User Sessions: observe Number of User Sessions: 3 and Active Users: sa, annie, ANNIE

The extra sessions are redundant.

Customer claims this leads to performance issues due to locking mechanism utilized in \source\Dovetail.SDK.Bootstrap\Clarify\ClarifySessionCache.cs. With 223 sessions in the cache it is observable by Microsoft Support and reported in https://support.dovetailsoftware.com/agent/support/cases/22928 as a possible locking issue inside log4net leading at first towards upgrading log4net to the latest version but proved to be a dead-end route because log4net is not the problem here.

Proposed solution:

  1. make sure session lookup and creation only uses lowercase login names
  2. use _logger.Push upon successful lock (SyncRoot) instead of prior to it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.