I have a plugin in JIRA 5.0 using Web work.
In input.vm, I place an File input element. Using Web item to navigate to plugin.
After open my plugin, all drop down menus are stuck. Nothing happen when clicking on it.
It does not happen when I remove File input element.
Anyone could explain this and how can I use Input file element in file .vm?
Thanks in advance,
You seem to have figured this out. Adding the elements you described isn't resolving the error for me. Can you provide more details on what you added to your form? Here is the content of my form:
<input type="hidden" name="pID" value="$metadata.projectID"> <input type="hidden" name="pDocAO" value="$pDocAO"> <input id="fileToUploadInput" type="file" name="attach1" size="30"> <input type="hidden" name="id" value=""> <div id="attach-max-size"></div>
But I still get the same error.
Just think of it in this way. If you use the input="file", AJS will pick up on it and will act on in. Therefore, you can refer to how JIRA does the file import.
So, if you provide id's without values, it's definately not going to work.
<div id="attach-max-size" class="hidden">$attachmentSize</div> <input type="hidden" id="id" name="id" value="$randomId" />
Note, both my values have meaning. The attachment size is JIRA's attachment size limit. Random Id is the id of the issue that I am refering to.
Thanks for the clarification. I've explored your suggestions and it works as you describe.
I'm upgrading a custom plugin from 4.4.x to 5.2.5 and one of the things we do in this plugin is provide the ability to attach files at the project level, not just at the issue level. I'm not just providing a different way to create issue attachments. So, the restriction to match an issue id is not applicable. To your knowledge, is there a way to override or skip this built-in validation? It's quite annoying for my purposes.
Try this code. It work for me.
<label class="field-label" for="attachment">Attachment <span class="vp-optional">(optional)</span></label>
<div id="attach-max-size" class="hidden">15728640</div>
<input id="attachment" type="file" name="attachment"/>
<div class="hidden"><input type="hidden" value="14000" name="pid"></div>
Good morning, After a long weekend cleaning up, I am still in the cleanup mode 😊. I am curious to know: When do you feel the urgency to cleanup your Atlassian Tools? How many times do y...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs