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

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.

People

Dates

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