Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..
385 views

Attachment file name is "NaN" when downloading a related ticket attachments from within a record

Jump to solution

in HPSM 9.41 there is a new function to have access to attachements from other related ticket.

We tried in this funtion in a system demo and realised, there is a bug, the downloaded filename is replaced by a "NaN" instead of the correct filename.

The error is caused by a type error in the ScriptLibrary "sdUtil" in line 639.

you have to correct the existing code:

sHtmlReturn += "<td class=\""+sRowClass+"\" ><a href=\"scattach://"+attachment.uid+":" + + attachment.filename + ":incidents:" + interaction_id + "\">" + attachment.filename + "</a></td>";

with the code:

 

sHtmlReturn += "<td class=\""+sRowClass+"\" ><a href=\"scattach://"+attachment.uid+":" + attachment.filename + ":incidents:" + interaction_id + "\">" + attachment.filename + "</a></td>";

the error is cause by a duplicated "+" in front of attachement.filename

 

Greets

Matthias

0 Likes
1 Solution

Accepted Solutions
Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..

Re: Attachment file name is "NaN" when downloading a related ticket attachments from withi

Jump to solution

So make it short, here is the solution again.

In the ScriptLibrary "sdUtil" in line 639 correct the wrong code from:

sHtmlReturn += "<td class=\""+sRowClass+"\" ><a href=\"scattach://"+attachment.uid+":" + + attachment.filename + ":incidents:" + interaction_id + "\">" + attachment.filename + "</a></td>";

to the corrected version of this code block:

 

sHtmlReturn += "<td class=\""+sRowClass+"\" ><a href=\"scattach://"+attachment.uid+":" + attachment.filename + ":incidents:" + interaction_id + "\">" + attachment.filename + "</a></td>";

the error is caused by a duplicated  "+" in front of "attachment.filename".

 

View solution in original post

0 Likes
3 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Attachment file name is "NaN" when downloading a related ticket attachments from withi

Jump to solution

Hello mweisenburger.

hope you are doing well.

 

I already checked the information you posted and confirmed the bug on the script, our suggestion to follow is report this issue with details steps to follow to R&D team in order to create a general 9.41 hotfix. Please let us know when the issue is reported.

 

 

Carlos Villalobos R
Customer Support Engineer
If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..

Re: Attachment file name is "NaN" when downloading a related ticket attachments from withi

Jump to solution

Hi Carlos,

after we found the error we already searched in the softwaresupport, the issue was already available:

QCCR1E131661: https://softwaresupport.hpe.com/km/KM02146625

 

But unfortunaltly without a resolution, so we analysed and solved it on our own.

Greets

Matthias

0 Likes
Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..

Re: Attachment file name is "NaN" when downloading a related ticket attachments from withi

Jump to solution

So make it short, here is the solution again.

In the ScriptLibrary "sdUtil" in line 639 correct the wrong code from:

sHtmlReturn += "<td class=\""+sRowClass+"\" ><a href=\"scattach://"+attachment.uid+":" + + attachment.filename + ":incidents:" + interaction_id + "\">" + attachment.filename + "</a></td>";

to the corrected version of this code block:

 

sHtmlReturn += "<td class=\""+sRowClass+"\" ><a href=\"scattach://"+attachment.uid+":" + attachment.filename + ":incidents:" + interaction_id + "\">" + attachment.filename + "</a></td>";

the error is caused by a duplicated  "+" in front of "attachment.filename".

 

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.