I am using scriptrunner 6.16.0 in JIRA 8.13.2. When a user attach a file when creating a new issue / edit existing issue in JIRA, I would like to rename the file.
I am trying to achieve this using scriptrunner using a validator (during transition). I was able to use TemporaryWebAttachment object to get the filename, but this value cannot be modified.
Any suggestion on how to rename this filename?
Thanks
Perhaps you can create a new TemporaryWebAttachment with data from the original one and use that?
Related
I am trying to get the attachments of some emails and check if that attachment already exists in SharePoint. However, since the flow may have already run over some attachments that have already been received, they may or may not already be in SharePoint, so I first have to check SharePoint if the attachment exists and if they don't, create the file using the email attachment content.
So what I have so far is replicating a process that was described here
The problem that quickly arises is that under "Get file content using path" action, the File Path input box(circled below) won't let me append a file path that isn't currently already in a document folder.
Not sure if this is still a valid way to accomplish it or if there's another way. I have checked all over the place and still haven't been able to find a solution. If there's anybody that can help it would be greatly appreciated!!
To tackle this what you can do is to create a variable using Initialize variable action and compose the path e.g. '/DocumentLibrary/file.ext' that you want to check if exists. then you can refer to that variable in your folder path box for Get file content using path action. Please see the screenshot:
Next you can configure run afterfor file creation action and create file if Get file content using path action has failed, otherwise do other stuff that is required. I have tested this for sending different emails based upon file found or not found and it works well.
Hope this solves your issue.
Can we update or change a file using Freemarker?
I am using Android studio templates to create few and I also want to update few files as well. Is it possible to do so? I am new to this and unable to find enough info.
Thanks in advance.
Freemarker is a template engine to generate text output. What you can do is replace an existing file, with a new one.
Backgorund:
I am a newbie in the NetSuite world. We are trying to integrate NetSuite with our ERP and I am doing some preliminary research to find out what would be the best option moving ahead. The primary objective of the first task is to download huge volume of data from NetSuite to our end and find alternatives approaches.
I did some research on SuiteScript/SuiteTalk/Analytics and some facts I have come to find and my questions are below:
Custom search can be created and save SuiteScript/SuiteTalk.
This saved search can be invoked via both SuiteScript as well as SuiteTalks
Well have a confusion, is the Saved Search the View, which SuiteAnalytics can access? (NOT MY MAIN QUESTION THOUGH!!).
Using SuiteScript, return of Saved Search execution can be saved on as a flat file, and that file can be moved to File Cabinet. Exposing a REST API using RESTlet, this file can be downloded. [But have not implemented this yet!!]
[MAIN QUESTION] IS IT POSSIBLE TO DO THE SAME, CREATE A FLAT FILE AT NETSUITE END USING SUITTALK? AND ALSO HOW TO DO SAVE/MOVE THE FILE TO FILE CABINET AFTER THAT?
I have not researched more on the topic File Cabinet and how a created file or files here are indexed?
Or Is it better to load whole result set from the SOAP call?
Your comments are highly appreciated!
Thank you!
You can certainly execute a saved search via SuiteTalk. You can also loop through all the results of the saved search and do whatever you'd like with those results, such as create a text file.
The SuiteTalk API also allows for accessing the File Cabinet to create or retrieve files, with limitations on file size.
Suitetalk can be used to create File and move file from a folder to another by changing the folder internalId of the fileObject.
Since you are using the Suitetalk to create/load Saved Search; you are required to create and save the CSV at your end using the search result and then move the file to file cabinet.
Since your objective is to get huge data from NetSuite I would recommend below option:
Use Scheduled script/Map Reduce to build a file and place it in required folder of file cabinet
Using Suitetalk you can extract that file. (Note: You don't need REST do this job. You can get the fileContents and store the result at your end. You cannot directly store the file. You will have to store the filecontents)
Thanks #netsuite-guru and #suite-resources!
So doing some further research, and considering your recommendations, the server side(at NETSUITE) scripting can be done only using SuiteScript to achieve the goal of automating - READ from NetSuite and WRITE to File to FILECABINET!
Also found another good read thread as an option to MapReduce link
But would go with "Scheduled script/Map Reduce" at this time.
My problem is: I am having data in an xml file with url "http://XXXXX.xml" and this file will be updated with a new record atleast for every 2 minutes. I need to know whenever a new record was created in that file using "Node.js", and I need to make some "updates" on the client side using that record immediately.
Can anyone please tell me the process to know when the "xml" file at a specific url was modified using node.js.
Thanks in advance.
You can read for yourself here: http://nodejs.org/docs/latest/api/fs.html#fs.watch
I need to modify a file (text file) in a SharePoint document library. Tried to open a stream using SPFile.OpenBinaryStream() and write the data. But it doesn't work out. Any help/ suggestion would be appreciated.
Have you used the SaveBinary method?
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfile.savebinary.aspx
and depending on the doc library settings you may need to do a SPFile.CheckIn to commit the changes.