Is it possible to transfer parameters from one project to another?
And with parameters I mean the feature that replaces strings with values which are defined on project or document level.
There are parameters defined in project Item A.
I create a new project Item B
I want to transfer the defined parameters from project A to project B.
I tried to export the parameters and the only way I can find is to mark the values in the GUI, and paste them to a text or excel file.
I could not find a way to import any parameters.
I know If I just copy paste the project item the parameters might be tranfered but that does not cover the case when I want to update parameters!
In Unix the command would be like this:
im editissue --field=Parameters=`im issues --field=Parameters <Source_ID>` <Target_ID>
not sure what the CMD/PowerShell alternative is
Hope it helps
Thanks so far.
The CMD alternative seems to be this:
im editissue --field=Parameters="im issues --fields=Parameters <Source_ID>" <Target_ID>
but according to the error message (see Attachment) it cannot save the item because of "specical characters" in the field.
The parameters do not have any special characters but I gess the output of the "im issues" command gives the parameters and all of its meta data in sort of table view and so this cannot be set to the target "Parameters" fields.
Is there a way to export only one parameter? So one could iteraterate over all parameters via an CMD line loop?
I was a litte bit assuming this error.
we do have 3 "special Chars" in the result: ";" and "=" and the "carriage return". All of that has to be masked, which means prefixed with a "\" like "\;", "\=" and usually a "\n".
Haven't done it yet, although I have written many of such small helper classes in the past. I would write a small java class to perform this "replacement", and would then stay inside java to call the Integrity API.
Not sure how fluent you are in java, that's why I mentioned powershell as alternative. I am pretty sure that also powershell can do this.
If I am not mistaken, there is also a custom developed solution available to move params into an Excel Sheet, allowing you to review the parameters, and then push the data back into another project. Not sure who has written this small utility, remember only that there was a screenshot that looked like Excel and a set of multiple Integrity parameters 🙂
I am not fluent in JAVA at all and also power shell is fairly new to me.
The custom tool that you are talking about sounds very good to me, If someone could point me to this I would be very happy.
Still wondering why this is not possible with board tools?!
I was looking into this issue from yesterday and gave quite much time to explore the possibilities and way around...
I suggest you JAVA API is better way for this rather then going with CMD :-
I tried in multiple ways like :-
1.) @echo off
for /f "delims=" %%i in ('im issues --fields="Parameters" 10014') do set output=%%i
for /f "delims=" %%i in ('im editissue --field="Parameters=%output%" 11309') do set output=%%i
store these 3 lines in .bat file and run through CMD. But not updating all the parameters. Only one parameter is passing.
2.) If we try to put complete command in CMD itself getting same issue as you mentioned and i searched about that issue :-
Look for this above community link to take a detailed discussion related to this. And i guess Shell can be a way to achieve this but not tried.
Hope it may help you a little.
Thanks for the solution which you provided of Copying of Parameter Values from 1 doc to other doc. Github solution helpful for me.