Enhancement #4589

Make some subscription item properties final, i.e. read-only for the user after they are first created

Added by Tuukka Lehtonen about 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:
Priority:4Due date:
Assignee:Tuukka Lehtonen% Done:

100%

Category:HistorySpent time:-
Target version:1.13.1
Release notes:
Story pointsS
Velocity based estimate-
ReleaseSimantics 1.13.2Release relationshipAuto

Description

Currently the user is free to modify a subscription item's properties in any which way he likes. However there are problems in the current implementation that actually prevent the following attributes from being changed after history collection has previously been initialized with the one set of settings:
  • sampling interval
  • deadband
  • unit

Changing the sampling interval causes seemingly random disappearance of data due to not having all the same levels of detail of data collected anymore.

Changing the deadband can also possibly affect the levels of detail of data collected and thus the problems are equal to changing the sampling interval.

Changing the unit needs to be prevented only because FileHistory currently tries to perform some kind of actual conversion based on the previous and new unit and fails miserably in doing so. For example changing unit "" <-> "s" fails because a unit adapter can't be constructed for an empty unit.

Another possible fix for these problems would be to abolish all the history data collected so far for a changed item. But we'll go with the read-only workaround for now.

Also the following subscription item properties should be made read-only either because their modification doesn't work or they are simply not intended for modification:
  • Variable ID
  • Datatype

Also the name should not be modifiable, but preventing that requires just a bit more effort than the others.


Related issues

Related to Platform - Enhancement #4588: Support L0.readOnly in BasicPropertyTab contributions Closed

Associated revisions

Revision 28492
Added by Tuukka Lehtonen about 4 years ago

Made the following subscription item properties read-only:
  • Deadband
  • SamplingInterval
  • Unit
  • Datatype
  • VariableId

in order to workaround history collection problems that exist in modifying any of Deadband, SamplingInterval and Unit.
Datatype and VaribleId were made read-only because they should be such already from the user's point of view.

refs #4589

Revision 28493
Added by Tuukka Lehtonen about 4 years ago

Variable ID is for visualization only in the ChartAndSubscriptionItemDialog, therefore unescape it to make it more readable.
However, remember that this makes the URI unusable for direct browsing.

Also added some layout grabbing where suitable.

refs #4589

History

#1 Updated by Tuukka Lehtonen about 4 years ago

  • Description updated (diff)
  • Category set to History
  • Assignee set to Tuukka Lehtonen

#2 Updated by Tuukka Lehtonen about 4 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#3 Updated by Tuukka Lehtonen about 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF