Giter Club home page Giter Club logo

ampla-data's People

Contributors

bitdeli-chef avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ampla-data's Issues

Repository.GetVersions() will throw exceptions with empty values in the AuditLog

When a user changes the default value for a record, the GetAuditData will return an empty string for the original value.

For instance, changing an int field from default (null) to 100 will show the following:

  • Original Value =
  • Edited Value = 100.

When the Repository.GetVersions() tries to convert the empty string to an int, it will be throw an exception.

[FormatException:  is not a valid value for Boolean.]
   System.ComponentModel.BooleanConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +291
   System.ComponentModel.TypeConverter.ConvertFromInvariantString(String text) +43
   AmplaWeb.Data.Binding.ModelData.ModelProperties`1.TryConvertFromString(Type type, String propertyName, String stringValue, Object& value) in D:\GitHub\Ampla\Ampla-Data-MVC\src\AmplaWeb.Data\Binding\ModelData\ModelProperties.cs:229
   AmplaWeb.Data.Binding.ModelData.ModelProperties`1.TrySetValueFromString(TModel model, String propertyName, String value) in D:\GitHub\Ampla\Ampla-Data-MVC\src\AmplaWeb.Data\Binding\ModelData\ModelProperties.cs:174
   AmplaWeb.Data.Binding.ViewData.AmplaViewProperties`1.UpdateModel(TModel model, String name, String value, Boolean useDisplayName) in D:\GitHub\Ampla\Ampla-Data-MVC\src\AmplaWeb.Data\Binding\ViewData\AmplaViewProperties.cs:68
   AmplaWeb.Data.Binding.AmplaGetDataVersionsBinding`1.Bind() in D:\GitHub\Ampla\Ampla-Data-MVC\src\AmplaWeb.Data\Binding\AmplaGetDataVersionsBinding.cs:62
   AmplaWeb.Data.AmplaRepository.AmplaRepository`1.GetVersions(Int32 id) in D:\GitHub\Ampla\Ampla-Data-MVC\src\AmplaWeb.Data\AmplaRepository\AmplaRepository.cs:204
   AmplaWeb.Data.Adapters.RepositoryAdapter`1.GetVersions(Int32 id) in D:\GitHub\Ampla\Ampla-Data-MVC\src\AmplaWeb.Data\Adapters\RepositoryAdapter.cs:55
   AmplaWeb.Data.Controllers.RepositoryController`1.Versions(Int32 id) in D:\GitHub\Ampla\Ampla-Data-MVC\src\AmplaWeb.Data\Controllers\RespositoryController.cs:78

Cause and Classification are special fields

One of the problems with the the Downtime Cause and Classification fields is that they are either ids or the names.

When reading data the Cause and Classification fields will return Cause and Classification as int when ResolveIdentifiers = false and will return the fields as string when ResolveIdentifiers = true.

When reading data in the GetData request the Cause and Classification will read either string or int depending on the ResolveIdentifiers property.

When writing data in the SubmitData the Cause and Classification will need to be int.

This makes it difficult to map the Ampla records to and from the <TModel> object, especially if there are Cause and Classification properties.

Deleted records are always hidden

There is no option to be able to include deleted records. Even when specified in the [AmplaDefaultFilter("Deleted=")] attribute.

Example:

[AmplaLocation(Location = "Enterprise.Site.Area.Point")]
[AmplaModule(Module = "Production")]
[AmplaDefaultFilters("Deleted=")]
public class Model
{
    public int Id { get; set; }
    /// ...
}

Repository will allow invalid operations for Metrics module

Ampla's Data Webservice doesn't provide enough meta data from the GetViews webservice to determine what operations are allowed.

The GetViews() meta data returned will specify that the following operations are allowed but will throw when the SubmitData or UpdateRecordStatus methods are called.

  • AddRecord
  • UpdateRecord
  • ConfirmRecord
  • UnconfirmRecord
  • DeleteRecord

FindById will return multiple records for a single id

When using a default filter, it is possible to return multiple records for a single id. This will occur when the Metrics module has a default query that for current shift.

The filter:
Id = 100, GroupBy = Hour, Sample Period = Current day

will include the current period records as well as the record specified by 100.

Unable to set the Downtime Cause Location to empty or null

When writing to the Ampla Data Webservice, if the Cause Location is null or string.Empty then web-service will throw the following fault.

    <s:Fault>
      <faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode>
      <faultstring xml:lang="en-AU">Value cannot be null.
Parameter name: name</faultstring>
      <detail>
        <ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
          <HelpLink i:nil="true" />
          <InnerException i:nil="true" />
          <Message>Value cannot be null.
Parameter name: name</Message>
          <StackTrace>   at Citect.Common.ArgumentCheck.IsNotNullOrEmpty(String argumentValue, String parameterName) in c:\Projects\Platform\v5.2\Code\Common\ArgumentCheck.cs:line 113
   at Citect.Ampla.Framework.ChildItemsCollection.get_Item(String name) in c:\Projects\Platform\v5.2\Code\Framework\ChildItemsCollection.cs:line 124
   at Citect.Ampla.Framework.AllItemsCollection.get_Item(String name) in c:\Projects\Platform\v5.2\Code\Framework\AllItemsCollection.cs:line 57
   at Citect.Ampla.Public.WebService.Data.V200806.DataWebService.buildEditedData(Int32 recordIndex, SubmitDataRecord record, Int32 setIdInt, ErrorHelper errors, FieldDescriptorCollection fieldDescriptors, Guid session) in c:\Projects\Applications\v5.2\Code\WebServices\Public\WebService\Data\V200806\DataWebServiceImplementation.cs:line 3019
   at Citect.Ampla.Public.WebService.Data.V200806.DataWebService.buildSubmitDataEditableCollection(ErrorHelper errorHelper, SubmitDataRecord[] sets, Guid session, String userName) in c:\Projects\Applications\v5.2\Code\WebServices\Public\WebService\Data\V200806\DataWebServiceImplementation.cs:line 2900
   at Citect.Ampla.Public.WebService.Data.V200806.DataWebService.SubmitData(SubmitDataRequestMessage requestMessage) in c:\Projects\Applications\v5.2\Code\WebServices\Public\WebService\Data\V200806\DataWebServiceImplementation.cs:line 945
   at SyncInvokeSubmitData(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp; rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace>
          <Type>System.ArgumentNullException</Type>
        </ExceptionDetail>
      </detail>
    </s:Fault>


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.