I'm making Create Issue validator in Jira 3.13, and want to check, if any file was attached OR specific custom field was filled, but `getAttachments` throws `NullPointerException` the same as stated in some old thread http://forums.atlassian.com/thread.jspa?forumID=100&threadID=43248, which has no solution.
Maybe someone already found one?
Community moderators have prevented the ability to post new answers.
Did you manage to find a solution?
I'm also having the same problem
I am not sure if JIRA 3.13 will lwork, but I craeted a plugin for JIRA 4.4.1, and use the following line:
ArrayList attachments = (ArrayList) origIssue.getAttachments();
This works for me. I know it said it return a collection, but putting into arraylist resolve my nullpointer problem.
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.