search cancel

Already existing table data is rewritten to the MDB instead of just the newly created

book

Article ID: 215560

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager

Issue/Introduction

Product: Service Catalog

Differing from v17.1 all fields, even the ones not uses, are written to the DB.

Service offering Add new software unit“

Even after adding just a single data set, all of the already existing ones are rewritten to the MDB instead just the single one.

All of the data sets are rewritten into the DB.

That causes the data refresh in the CMDB AND duplication of existing relations.

Cause

Possible causes:

The function ca_fdGetSelectedTableRows(ca_fd.formId, table) reads all of the table’s data sets!

The function ca_fdAddTableRow(ca_fd.formId,table,{…},false ) selects all data sets, although the parameter is set to false.

The table properties mode is set to data instead of selection

That has been chosen, to allow the user to select data sets

Note: Worked pretty fine in 17.1 version

Sample offering details to note the behavior.

  1. open Server offering
  2. Select a method -> onChangeVerfahren() …ca_reportQuery('SWFV-SWE-Softwareeinheit',…
    Populating the table with all software units, already existing for this method onfillSWE_Table(rows,table,false) …ca_fdAddTableRow(ca_fd.formId,table,{…},false);…

  1. Add data set
  2. Record data set
  3. Save selected data set onClickSave() …

ca_fdGetSelectedTableRows(ca_fd.formId, table) // extract the selected/added data sets

            ca_fdRemoveAllTableRows(ca_fd.formId, table); // clear the target-table from values, that have not been added/changed

            ca_fd.js.onfillSWE_Table(selectedRows,table,true); // adding just new values to the target-table

            // alert('finished copying?!');

            ca_fdDisableField(ca_fd.formId, 'lbl_save'); // deactivate the save button

  1. Save table

The data sets marked red should NOT be added again.

The data sets marked blue are the ones, that should be added, only.

Environment

Release : 17.3

Component : CA SERVICE CATALOG

Patch Level : SLCM 17.3.05

Resolution

Below are few things that are to be noted as per the issue summary

1) Fourth parameter in the addTableRow api is only valid in case of a table being in selection mode.

2) Table when in "Data" mode will treat all rows added as selected because there is no option for the user to select specific rows.

3) Because of point 2, getSelectedTableRows will return all rows of table.

4) The reason for this being different in 17.1 and 17.3 is a reported defect in 17.1, where table is not differentiating the addtablerow behavior based on the table mode, which is fixed in 17.2 RU7 onwards.