hashmapinc / Drillflow

A dockerized WITSML API Server that is agnostic of the backend.
Apache License 2.0
17 stars 13 forks source link

DEV:LOG:Log get from store query returns logCurveInfo elements not present in original query #470

Open Mike-d-s opened 5 years ago

Mike-d-s commented 5 years ago

Epic

361 Log CRUD implementation

Bug: When performing a get from store query for log with a reduced number of elements for logCurveInfo, the server returns more elements that requested.

Execute this query:

<?xml version="1.0" encoding="UTF-8"?>
<logs xmlns="http://www.witsml.org/schemas/1series"     
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.witsml.org/schemas/1series  ../xsd_schemas/obj_log.xsd" 
    version="1.4.1.1">
    <log uidWell="Energistics-Well-0001" uidWellbore="Energistics-w1-wellbore-0001" uid="Test_depth_log2">
        <nameWell></nameWell>
        <nameWellbore></nameWellbore>
        <name></name>
        <logCurveInfo uid="">
            <mnemonic></mnemonic>
            <unit></unit>
            <minIndex uom=""></minIndex>
            <maxIndex uom=""></maxIndex>
            <curveDescription></curveDescription>
        </logCurveInfo>
        <commonData>
            <dTimCreation></dTimCreation>
            <dTimLastChange></dTimLastChange>
            <itemState></itemState>
            <comments></comments>
        </commonData>
    </log>
</logs>

With minimal log header data and a reduced number of elements for the logCurveInfo. the server returns the following (note server return abridged to first log curve returned for brevity):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<logs version="1.4.1.1" xmlns="http://www.witsml.org/schemas/1series"
    xmlns:ns2="http://www.energistics.org/schemas/abstract">
<log uid="Test_depth_log2">
<nameWell>Well Energistics-well-0001</nameWell>
<nameWellbore>Wellbore Energistics-w1-wellbore-0001</nameWellbore>
<name>Test_depth_log2</name>
<logCurveInfo uid="lci-11">
<mnemonic>Avg TQ</mnemonic>
<classIndex>0</classIndex>
<unit>kft.lbf</unit>
<mnemAlias>tqAv</mnemAlias>
<nullValue>-999.25</nullValue>
<minIndex uom="m">499.0</minIndex>
<maxIndex uom="m">509.01</maxIndex>
<sensorOffset uom="m">0.0</sensorOffset>
<traceState>raw</traceState>
<typeLogData>double</typeLogData>
</logCurveInfo>

(Note server return abridged to first log curve returned for brevity)

Expect to get mnemonic, unit, minIndex, maxIndex, curveDescription as requested, plus also expect to get typeLogData since it's mandatory in the schema (thought not part of the request).

Actual return contains more than requested.

niaalex commented 5 years ago

Re-test required / ETA is noon 6/17