Hi All,
We have a user who's unable to attach files to JIRA issues and receives the following errors when she tries:
-----------------------------------------
File "<<filename.ext>>" was not uploaded
JIRA could not attach the file as there was a missing token. Please try attaching the file again
-----------------------------------------
She's tried in various browsers, on various issues and with different file types (.jpg, .pdf, .png) and gets the same error every time. It doesn't matter how long she's been logged in to JIRA, and she's tried clearing her cache. Still no joy.
Any thoughts?
Many thanks,
Jodie
First, make sure you have 1, 2, 3, 4 and 5 as the options - the principle here is to get Jira to serve up all of the options, and then remove the ones you don't want after it's rendered.
Second, you didn't say where your javascript is, or how you've embedded it, but the way to do it in off-the-shelf Jira is to add it to the description of a custom field. I've had problems doing that sometimes, unless I added it to the last field appearing on the screen. You could also add it to select.vm or maybe use message fields, but the other methods all require coding or plugins.
Third, some simple code
{code}
<script language="JavaScript" type="text/javascript">
<!--
window.onload = function()
{
var listBox = document.getElementById("customfield_10312");
if (listBox)
{
for (j = listBox.length - 1; j>=0; j--)
{
if (listBox.options[j].value=="2") { listBox.remove(j); }
if (listBox.options[j].value=="4") { listBox.remove(j); }
}
}
}
// -->
</script>
{code}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.