This resource is for KnowledgeTree community members. Commercial Customers can log new support cases via the KnowledgeTree Support Portal


KnowledgeTree Community Edition

CLONE -Conditional Metadata not working in KTAPI get_metadata(SUP-2537)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Priority One: Immediate fix Priority One: Immediate fix
  • Resolution: Fixed
  • Affects Version/s: 3.6.1
  • Fix Version/s: Backlog
  • Component/s: None
  • Description:
    Hide
    We are developing a simple plugin for a client with KT comercial 3.7

    When retrieving the metadata with the sample code below:
    $ktapi = new KTAPI();
    $session = $ktapi->start_system_session();
    $documentK = $ktapi->get_document_by_id($document->iId);
    $metadata = $documentK->get_metadata();

    I have access to all metadata of document except Conditional metada, after if I execute a simple update to metadata with no changes:
     $documentK->update_metadata($metadata);

    All the Conditional metadata are lost.

    How can we resolve this issue ? We must have access to all metadata and have the possibility to change some info, save and don´t lost any metadata.

    Regards,
    Vitor Simoes
    Show
    We are developing a simple plugin for a client with KT comercial 3.7 When retrieving the metadata with the sample code below: $ktapi = new KTAPI(); $session = $ktapi->start_system_session(); $documentK = $ktapi->get_document_by_id($document->iId); $metadata = $documentK->get_metadata(); I have access to all metadata of document except Conditional metada, after if I execute a simple update to metadata with no changes:  $documentK->update_metadata($metadata); All the Conditional metadata are lost. How can we resolve this issue ? We must have access to all metadata and have the possibility to change some info, save and don´t lost any metadata. Regards, Vitor Simoes
  • Environment:
    CentOS 5.2 i386

Activity

Monique Chavda made changes - 01/Mar/10 08:16 AM
Field Original Value New Value
Project KnowledgeTree Commercial Support [ 10030 ] KnowledgeTree Community Edition [ 10000 ]
Key SUP-2653 KTS-4605
Issue Type Support Case [ 7 ] Bug [ 1 ]
Workflow Commercial Support Workflow 3 [ 29226 ] KT Workflow 5 [ 29227 ]
Affects Version/s 3.6.1 [ 10646 ]
Affects Version/s KnowledgeTree Commercial Edition 3.7 [ 10673 ]
Hardware Specification (Tools) Intel Core 2 Duo T7500 2Gigs ram
Operating System & Version (Tools) Windows Vista Home Premium 32bits PT
Operating System & Version (Server) CentOS 5.2 i386
Hardware Specification (Server) Intel(R) Xeon(TM) CPU 3.06GHz
Hide
Monique Chavda added a comment - 01/Mar/10 08:17 AM
Comments from Megan

I looked into this again and uncovered a couple of bugs very quickly! However, they're unrelated. The problem for this issue, is that when the metadata is retrieved it doesn't include the conditional metadata, in the code it says - "/* this is not implemented...*/". But when it updates the metadata it does all fields, since the conditional fieldset is empty it writes null values in.

So there are 3 issues here:

1. get_metadata does not return the conditional metadata.

2. update_metadata updates all fields / fieldsets and doesn't skip the ones that aren't included.

3. update_metadata writes "n/a" in for null values if they were empty in the get_metadata query.

All 3 are bugs which will need to be logged and pulled into our sprints.
Show
Monique Chavda added a comment - 01/Mar/10 08:17 AM Comments from Megan I looked into this again and uncovered a couple of bugs very quickly! However, they're unrelated. The problem for this issue, is that when the metadata is retrieved it doesn't include the conditional metadata, in the code it says - "/* this is not implemented...*/". But when it updates the metadata it does all fields, since the conditional fieldset is empty it writes null values in. So there are 3 issues here: 1. get_metadata does not return the conditional metadata. 2. update_metadata updates all fields / fieldsets and doesn't skip the ones that aren't included. 3. update_metadata writes "n/a" in for null values if they were empty in the get_metadata query. All 3 are bugs which will need to be logged and pulled into our sprints.
Monique Chavda made changes - 01/Mar/10 08:17 AM
Fix Version/s Backlog [ 10578 ]
Priority Priority One: Required [ 1 ]
Monique Chavda made changes - 01/Mar/10 08:17 AM
Link This issue is required by SUP-2537 [ SUP-2537 ]
Craig van wyk made changes - 16/Mar/10 01:27 PM
Status Open [ 1 ] Closed [ 6 ]
Resolution Fixed [ 1 ]
Jarques made changes - 23/Mar/10 07:24 AM
Link This issue Similar to KOA-631 [ KOA-631 ]
Jarques made changes - 23/Mar/10 07:24 AM
Link This issue is related to KTE-186 [ KTE-186 ]

People

Dates

  • Created:
    01/Mar/10 08:15 AM
    Updated:
    23/Mar/10 07:24 AM
    Resolved:
    16/Mar/10 01:27 PM