CA Service Management

  • 1.  Description truncation in SDM 14.1 Cum2

    Posted Jun 08, 2016 11:29 AM

    In previous releases of SDM the system allowed a user to enter more than 4000 characters in the Description field of tickets and when a [Save] was attempted it would give an error indicating that the length was too long and needed to be shortened before the ticket could be saved.  In 14.1 it just cuts off the text when the paste happens but doesn't give any other indication that a truncation has occurred.  Any thoughts on how this functionality can be added back in?



  • 2.  Re: Description truncation in SDM 14.1 Cum2

    Broadcom Employee
    Posted Jun 08, 2016 01:08 PM

    Derek,

     

    I see that Service Desk appears to react in the same fashion in 12.9. I'm unable to find any Options Manager configuration to change the behavior, which makes me think that it would require a customization to make it work differently. You may also want to consider posting an "Idea" to the Idea Wall.



  • 3.  Re: Description truncation in SDM 14.1 Cum2

    Broadcom Employee
    Posted Jun 10, 2016 04:30 AM

    Hi Derek,

     

    I can confirm that in version 12.6, for example, if the data that was being pasted into the field exceeded the size of the field, (all of) the data was pasted into the form anyway and then, when Save was attempted, a warning message was received, such as: ""Response contains 4034 characters, but its maximum size is 1000".

     

    The user would then be required to truncate the data, perhaps starting with the last character in the field and deleting up until at least the 1000th character. After sufficient truncation, Save would succeed.

     

    Note that the only indicator of sufficient truncation would be clicking on Save and seeing whether or not the warning message was received again.

     

    In 14.1, the field size is 4000 characters instead of 1000 characters and the size is constrained per the form.  And so it is not possible to paste more than 4000 characters into the field.  There is no warning message displayed if the data that was copied to the clipboard contains more than 4000 characters.

     

    For 14.1, to determine if the full content was pasted or not, in some (or even most) cases, it may be possible, to compare the text that exists just before the cursor position to the text that is near the end of the original source.  If there is no match, then truncation occurred. If it matches, then truncation "probably" did not occur.

     

    I wrote "probably" because of #2 below.

     

    Basically, the method may not work always.  For example, it could be that:

    1. The content that is being copied is not familiar to the user.

    2. The content just before 4000 characters matches the text at the very end of the original source content.

    3. The copy/paste is done without any awareness of the limit and the absence of any warning message.

    4. The copy/paste is done quickly and the user does not remember to do the manual comparison.

     

    So, for 14.1, there is an associated risk whenever the intention is to copy data that could exceed for 4000 characters.

     

    You could open a support case to propose that the problem be fixed as a bug in the product (I cannot say if this would be accepted as such at this point). Or, as Alex mentioned, you could open an enhancement Idea.

     

    Karen



  • 4.  Re: Description truncation in SDM 14.1 Cum2



  • 5.  Re: Description truncation in SDM 14.1 Cum2
    Best Answer

    Posted Jun 10, 2016 10:27 AM

    Until CA come to fix that "Bug" let's have a community fix

    add the below code into a sitemods.js file under the you site/mods/www/wwwroot/scripts.

     

    function preSaveTrigger(){

    var zmaxLen = 4000; //your max number of characters for the description

    element = document.main_form.elements;

      if (typeof element['SET.description'] == "object"){

      var zdescriptionLength = element['SET.description'].value.length;

      if (zdescriptionLength >= zmaxLen) {

        var z_description_id = element['SET.description'].id;

        var z_descriptionTemp = document.getElementById(z_description_id);

        var zerrorMsg = "Description contains " + zmaxLen + " characters, but its maximum size is " + zdescriptionLength;

       detailReportValidation(z_descriptionTemp,true,zerrorMsg);

        return false

      }  else {

        detailReportValidation(z_descriptionTemp,false);

      }

      }

      return true

    }

     

    clear sdm and browser client cache

    NOt super clean but you mimic the old 12.9 behavior until then.

     

    Hope this help

    /J