Thank you for quick reply.
Your suggested method worked perfectly.
Only thing is, instead of getFieldById("pid"), I had to use projectID.getFormValue().
Here is the snippet from my code.
Project project = ComponentAccessor.getProjectManager().getProjectObj(Long.parseLong(projectID.getFormValue()))
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