We are working on following requirement.
Create automatic Sub-Task based on attachment i.e. Sub-Task will be create based on the rows present in the file.
This has to be done while issue creation and I have tried Post Function for this requirement.
Please help and thanks in advance.
Off-the-shelf, Scriptrunner has no librarys for parsing data out of files. It can do the rest of the work you mention - the sub-task creation, with presumably system and custom fields filled in (see https://library.adaptavist.com for lots of examples) but reading and understanding the attachment is not something it supports.
Of course, it's code, so it can be made to read the content of an attachment, and I have done that before, but only with plain text and writing the java/groovy from the ground up (work out where file physically is, open it with a file reader, grab the whole text), but for CSV you'll have to be more clever, manually writing code to parse the CSV (or find a library you can make available to SR and import it)
Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events