Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can we create Sub-Task based on number of rows in CSV file while creating ticket ?

Hi All,

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.

4 answers

0 votes
Jack Community Leader Dec 16, 2020

There is no way that Jira could open the file and interrogate the number of rows.

Hi Jack,

 

Can it be done with the help of script by reading attachment file or there is no possibility of implementing it?

Jack Community Leader Dec 16, 2020

so very sorry! So you will need an addon for sure, e.g. Automation for Jira, Scriptrunner, power scripts. If you have a scripting or automation addon already then the supporting docs should help guide you on this common UC. 

Thanks @Jack for updating we are already using Script runner 

Jack Community Leader Dec 16, 2020

so unsure if Scriptrunner can even do this TBH. There are some discussions in the Community about working w/ Attachments so you might check there and also the docs associated. BTW, A4J will not help here.

Hi @Jack 

Thanks for quick response but we are working on Jira Server so please guide us from server perspective.

 

Regards,

Sanjay Dhandare

Hi Jack,

I am able to achieve this via Script Runner plugin Thanks for your valuable feedback.

Regards,

Sanjay Dhandare

0 votes

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)

Hi @Nic Brough _Adaptavist_ 

Thanks for your valuable suggestions and even I got the same result for Script Runner.

Hi All is there any suggestions on this ?

Please guide us !

I think we'd have made them by now, if there were.

Hi@ Nic Brough _Adaptavist_,

I am able to achieve this via Script Runner plugin Thanks for your valuable feedback.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

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 ...

7,071 views 8 28
Join discussion

Community Events

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

Events near you