Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

sanjay
Contributor
December 16, 2020

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
sanjay
Contributor
December 22, 2020

Hi All is there any suggestions on this ?

Please guide us !

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 23, 2020

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

sanjay
Contributor
December 24, 2020

Hi@ Nic Brough _Adaptavist_,

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

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 16, 2020

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)

sanjay
Contributor
December 17, 2020

Hi @Nic Brough -Adaptavist- 

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

0 votes
sanjay
Contributor
December 16, 2020

Hi @Jack Brickey 

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

 

Regards,

Sanjay Dhandare

sanjay
Contributor
December 24, 2020

Hi Jack,

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

Regards,

Sanjay Dhandare

0 votes
Jack Brickey
Community Champion
December 16, 2020

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

Ankit Choudhary December 16, 2020

Hi Jack,

 

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

Jack Brickey
Community Champion
December 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. 

sanjay
Contributor
December 16, 2020

Thanks @Jack Brickey for updating we are already using Script runner 

Jack Brickey
Community Champion
December 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.

Suggest an answer

Log in or Sign up to answer