I need to update a bunch of filters and am writing JIRA/Atlassian CLI commands to do this with the 3.8.0 updateFilter action. I'm using backslash \ to escape all the double quotes, but it is complaining about ampersands &. For example:
C:\Users\rpold>"C:\Program Files (x86)\Atlassian\atlassian-cli-3.8.0\jira.bat" --action updateFilter
--search "project not in ("R&D", rndti, \"Service Packs\", ToBeDeleted)affectedVersion = \"Vers 14\"
AND status not in (closed) AND issuetype in (bug, \"Change Request\") AND created >= \"2013/07/01\"" --id 19066
I've tried R\&D and other attempts, but cannot seem to get it to accept the ampersand. If I take out the & and make it RnD, then it works. Any ideas?
Thanks! Robert
Community moderators have prevented the ability to post new answers.
You didn't escape the double quotes in "R&D".
Thanks for the reply, Bob. That was my typo in the question. I've simplified the text and will copy / paste exactly. It's still giving me grief about the ampersand. And BTW, if it wasn't obvious, I'm running on Windows 7.
C:\Users\rpoldervaart>"C:\Program Files (x86)\Atlassian\atlassian-cli-3.8.0\jira.bat" --action updateFilter --search "su mmary ~ \"R&D\"" --id 19066 This function requires a non-blank value for either id or filter parameters. 'D\""' is not recognized as an internal or external command, operable program or batch file. C:\Users\rpoldervaart>"C:\Program Files (x86)\Atlassian\atlassian-cli-3.8.0\jira.bat" --action updateFilter --search "su mmary ~ \"R\&D\"" --id 19066 This function requires a non-blank value for either id or filter parameters. 'D\""' is not recognized as an internal or external command, operable program or batch file. C:\Users\rpoldervaart>"C:\Program Files (x86)\Atlassian\atlassian-cli-3.8.0\jira.bat" --action updateFilter --search "su mmary ~ \"RandD\"" --id 19066 Paradigm 2014 - Reported Issues filter with id: 19066 updated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, I had to boot my Windows environment to check it out. Mine seems to work fine with your first one. I don't want to get into Window's command shell differences, so, just simplify by using 'R&D' instead. JIRA seems to treat that as equivalent to using double quotes in jql. And if the & still causes problems, try escaping with a Windows escape for &, see http://www.robvanderwoude.com/escapechars.phpand try ^& to escape.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good :). Differences in command shells, quoting, multiple sets of escaping rules, enough to make one go insane if one isn't already :).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that. You are right. It is Dos/Windows that is causing the problem. I still couldn't get it to go through with the first attempt with \"R&D\", however, I am able to make it work with 'R&D'. I also found it to work with putting double quotes around the ampersand, as \"R"&"D\".
Thanks again, and sorry for the question when it really wasn't related to your CLI plug-in. And thanks for the plug-in!! Very useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.