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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

how to connect shared path using jira and read a text files names in jira

Hi Team,

I have a scenario like, from JIRA I need to connect to a remote windows machine and read a list of files in a Folder like below it exists.  I need to read all the file anmes and disply in a JIRA cusotm field dropdown.  Please assist me how to connect from JIRA to remote wondows machine and read these files names? 

Remote folder in Windows Maachines.PNG


3 answers

0 votes

hi @Nic Brough -Adaptavist- 

I am working with Devender, basically we are working on project where we have need to add custom field in jira with version number. we have shared path as mentioned above in which folders describing the version numbers. We have to access folder name and show it in dropdown  as version number. this is requirement. we are not able to access this folder maybe because its on shared path. Do you know how to access it?

Welcome to the Atlassian Community!

I can think of three ways to do this, but all of them depend on knowing how you are sharing the "shared" directory.  If you cannot access it, there's nothing you can do.

Two of them are going to need you to write an app, not just a script, and the third is going to require you to code something externally (but nothing complex, and Scriptrunner can do all the work inside Jira pretty much off-the-shelf)

They all need to know exactly how the directory is shared, and the apps will require extra libraries to enable the file system reads.

0 votes

How are you exposing the file's directory to the network?

You're going to need to write something that can do a "dir" on that shared directory, get the list of file names, and drop it either into the options for a custom field, or into a database so you can use a database-picker field to draw it in.

Hi @Nic Brough -Adaptavist- ,

I am using below script and getting this error; An error occurred, the field will have no value




def list = [] 

def dir = new File("\\..../...APPS/..P01/..Setup/...Releases/..Main System/")

dir.eachFileRecurse (FileType.FILES) { file ->

list << file

println "Hello"




An error occured the filed will have no value - JIRA ERROR- Script runner.PNG

Your script appears to be referring to a local file, that's not going to work.

Hi @Nic Brough -Adaptavist- ,

Could you please share me the code snippet which can be useful in my scenario?


Thank you,

Dev G

I can't - you need to refer to your files via a listing of their network share locations, not a local file location, and I can't know what you've set up!

Hi @Nic Brough -Adaptavist- ,


I have a working script for 2 different shared paths like shown below. 

Line (7) , is obsolutley working fine but line (5) is not working where code is same .Shared path errors using Groovy script in JIRA.PNG


Please @Nic Brough -Adaptavist- , help me on this issue, its blocking my deleverables form long time. 



Note:-Same shard path is working using Python but nit with this Groovy in JIRA



Thank you in advance,

Dev G

That doesn't look like a valid path to the JVM.  Not that it's an incorrect string for the path, but it's not shared with the server, so it can't read from it.

Hi  @Nic Brough -Adaptavist- , 


Could you please help in this. Thank you.

Hi @Nic Brough -Adaptavist, 

My requirement is "Using JIRA scriopt runner, how can I access a shared folder/files on windows network?".

Then I need to read all the files names and get the list and display on JIRA cusotm filed.


Thank you,

Dev G

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events