Why does a scripted field of the script runner destroys the complete view screen of all issues?

Markus Farnung November 3, 2020

I created a scripted field of type html in the script runner settings.

It looks like this:

<!DOCTYPE html>
<html lang="en">
<head><meta http-equiv=Content-Type content="text/html; charset=utf-8">
</head>
<body>

...

</body>
</html>

 

Normally I'm using it in a transition dialog of a workflow.

There it works as expected.

But when I integrate the same field in the screen, which is used to view the issues, the complete view is destroyed. First I see the content of the html field and then only some part of the description. All the other fields of the screen are not visible. It is also not possible to scroll the view. It looks like, that Jira just wants to show the content of the html customer field and noting else.

Does somebody know why the scripted html field is destroying the complete normal view of an issue? Thanks.

2 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 3, 2020

A well formed html document should only have a single header, type, body etc, and your code is injecting others into the body of a page.  Most browsers cannot cope with this and a typical response to a broken web page is to simply stop rendering when you reach the bit that is broken.

You should remove pretty much every line of html you've put in your question - the doctype, html, head and body tags are causing the problem because browsers won't handle more than one of them in a page.

0 votes
Markus Farnung November 5, 2020

Got it. Thanks.

Suggest an answer

Log in or Sign up to answer