Xporter: Error with images and wiki render

Yanet Morales July 16, 2020

I'm having this same issue with images in Description and trying to render the content using wiki. I tried to replace the size of images without success. I'm trying this

 

${wiki%{'${escape:JQLIssues[j].Description}'.replace(new RegExp('width=\d+,height=\d+!','g'),'width=200,height=200!')}}

 

I noticed that the image tag is coming like this: 

!image-20200417-132307.png|width=1801,height=561!

I tried to remove the whole image and try to change the size without success.

 

Any thoughts?

3 comments

Comment

Log in or Sign up to comment
Brigitte Bedard January 15, 2021

I have the same problem and submitted a ticket.  I want to remove the image completely.  Did you succeed?  I notice that you are missing the ':' after wiki.  

I tried this and it is not working.

${wiki:%{'${TestExecutions[n].TestRuns[a].TestSteps[r].Action}'.replace(/\!.*?\!/,'')}}
Yanet Morales March 30, 2021

Hi, Brigitte. Nice catch with the :! I did not have any success on this and, after expend almost one week trying different things I just gave up and decide to not use wiki....now the exported info is comming with all the tags. I just decided to give another try in a few months and see if there is any update on this.....

Yanet Morales March 30, 2021

Also, sorry for my late response, :(

Nicolás Figueroa October 21, 2022

Hello, I was dealing with the same problem.

I tried many different possibilities to try to resize or delelte the image from the wiki format but is like it's not working with javascript.

So I achive a solution with a workarround, using a property that delete all the images from wiki fields and then I add it with a iteration.

${prop(document.wiki.process.images,false)}

https://confluence.getxray.app/display/public/XPORTERCLOUD/Props#Props-ProcessWikiImage

 

And then in the same iteration of the Description field I use:

#{for images}

${Images[n].Image|maxwidth=600|maxheight=550}

#{end}

 

The problem is this will populate with all the images that the issue/issues have.

 

I was trying to find a way to create a if that take the value images value from the Description and apply it in the #{for images} but no success at the momment.

 

Xporter support is very slow and at the end of the day I gave them the solutions....

Manuel Ersch
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 12, 2024

Probably does not help you any more and maybe there is even a better way now to do it. But as this thread was one of the first hits and it helped me to find a solution that worked for me eventually, I want to share with those that still struggle with this.

${wiki:%{'${TestSteps[n].Action}'.replace(/width=\d+,height=\d+/g, 'width=150,height=150')}}

 

TAGS
AUG Leaders

Atlassian Community Events