Feature #3372

Task #3374: Migrate all core modules from legacy Mentat

Task #3376: Polish mentat-inspector.py module

mentat-inspector.py - Implement 'overwrite' argument for 'tag' and 'set' actions

Added by Jan Mach about 2 years ago. Updated over 1 year ago.

Status:ClosedStart date:03/22/2017
Priority:HighDue date:
Assignee:Pavel Kácha% Done:

100%

Category:Development - Core
Target version:2.0

Description

It seems that it would be useful to have overwrite argument for tag and set actions, because they could set the message key only in case it is not already set.

Associated revisions

Revision bf0598d3
Added by Jan Mach about 2 years ago

Implemented support for conditional value overwriting and uniqueness.

The jpath_set() method now optionally enables user to specify, whether already existing value should be overwritten or not, and whether value should be unique or not. The uniqueness option works only for lists at the end of JPath. (Redmine issues: #3392, #3361 and #1017, enables #3372 and #3396)

Revision e0c5c266
Added by Jan Mach about 2 years ago

Implemented support for overwrite and unique options for tag and set inspection actions.

It is now possible to choose, whether already existing value should be overwritten or unique. Uniqueness work only for lists at the end of JPath. (Redmine issues: #3372 and #3396)

History

#1 Updated by Jan Mach about 2 years ago

  • Priority changed from Normal to High
  • Parent task set to #3376

#2 Updated by Jan Mach about 2 years ago

  • Status changed from New to Resolved
  • Assignee changed from Jan Mach to Pavel Kácha

This should now be resolved and working on current implementation of filtering grammar. Filtering actions set and tag now have optional argument 'overwrite’, which enables inserting values into target list only in case they do not already exist.

Examples can currently be found only in source code of following modules and unit tests:

#3 Updated by Pavel Kácha about 2 years ago

  • Status changed from Resolved to Closed

#4 Updated by Jan Mach over 1 year ago

  • % Done changed from 0 to 100

Also available in: Atom PDF