Skip to end of banner
Go to start of banner

Examples

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 138 Next »

Action usage examples

Examples give users ideas on actual usage. We use automation to generate, test, and run these actions, so names and combinations may be odd or repetitive (wink). In many cases, other actions or environmental setup is required for the action to run, so you will need to adjust the action parameters and setup appropriate for your environment. 

Command line environments can be different, especially between Windows and non-Windows systems. Our Tips page talks about command line escaping differences and there are differences with respect to environment variable references ($ for non-Windows and %...% for Windows). These differences can impact examples, so recognize and adjust for your platform. In particular, all examples here are run with the standard bash shell on Linux.



addCustomer

--action addCustomer --customer "customer1@examplegear.com" --continue
--action addCustomer --customer "customer1@examplegear.com" --name "Customer 1" --continue
--action addCustomer --project "zclicustomers" --customer "customer1@examplegear.com"
--action addCustomer --project "zclicustomers" --customer "customer2@examplegear.com" --name "Customer 2"

addOrganization

--action addOrganization --name "Example Gear 2"
--action addOrganization --name "Example Gear 2" --continue
--action addOrganization --project "zcliorgs" --name "Example Gear 2"
--action addOrganization --project "zsdcli" --name "Example Gear" --continue

addOrganizationUsers

--action addOrganizationUsers --organization "Example Gear 2" --participants "Test Automation {Appfire}"
--action addOrganizationUsers --organization "Example Gear 2" --participants "Test Developer (Bob Swift Atlassian Apps),Test Automation {Appfire}"
--action addOrganizationUsers --organization "Example Gear 3" --participants "Test Developer (Bob Swift Atlassian Apps),Test Automation {Appfire}" --autoOrganization

addParticipants

--action addParticipants --request "ZSDCLI-3" --participants "Test Developer (Bob Swift Atlassian Apps)"

addRequestType

--action addRequestType --project "zsdcli" --name "zsdcli" --description "added by zsdcli" --issueType "10000"

createRequest

--action createRequest --project "zsdcli" --type "39813" --summary "my request with components" --description "description is required" --components "Intranet,Jira"
--action createRequest --project "zsdcli" --type "39822" --field "summary=my request" --field "description=description is required"
--action createRequest --project "zsdcli" --type "39822" --fields "summary:my request,description:description is required" --field1 "priority" --value1 "INVALID"
--action createRequest --project "zsdcli" --type "39822" --summary "my request for another user" --description "description is required" --forUser "Test Developer (Bob Swift Atlassian Apps)"
--action createRequest --project "zsdcli" --type "39822" --summary "my request for another user" --description "description is required" --organization "@reporter"
--action createRequest --project "zsdcli" --type "39822" --summary "my request" --description "List \\n - one \\n - two \\n - three"
--action createRequest --project "zsdcli" --type "Get a guest wifi account" --summary "my request with description from file" --file "/opt/atlassian/pipelines/agent/build/src/itest/jsm/resources/description.txt" --components "Intranet,Jira"
--action createRequest --project "zsdcli" --type "Get a guest wifi account" --summary "my request with organization" --description "description is required" --organization "Example Gear"
--action createRequest --project "zsdcli" --type "Get a guest wifi account" --summary "my request with participant" --description "description is required" --participants "Test Developer (Bob Swift Atlassian Apps)"
--action createRequest --project "zsdcli" --type "Get a guest wifi account" --summary "my request with warnings" --description "description is required" --field "NOT_VALID=xxx" --field "NOT_VALID2"
--action createRequest --project "zsdcli" --type "Get a guest wifi account" --summary "my request with warnings" --description "description is required" --field1 "NOT_VALID" --value1 "xxx" --field2 "NOT_VALID2"

getCustomer

--action getCustomer --project "zclicustomers" --customer "customer1@examplegear.com"

getCustomerList

--action getCustomerList --project "zclicustomers"

getFieldList

--action getFieldList
--action getFieldList --project "zsdcli" --type "@all"
--action getFieldList --project "zsdcli" --type "Get a guest wifi account"

getMyRequestList

--action getMyRequestList
--action getMyRequestList --outputFormat 2
--action getMyRequestList --outputFormat 2 --project "zsdcli" --type "39822"
--action getMyRequestList --regex ".*participant.*"

getOrganizationList

--action getOrganizationList
--action getOrganizationList --project "zcliorgs"

getOrganizationUserList

--action getOrganizationUserList --organization "Example Gear 2"

getParticipantList

--action getParticipantList --request "ZSDCLI-3"

getProjectList

--action getProjectList

getRequest

--action getRequest --request "ZSDCLI-1"
--action getRequest --request "ZSDCLI-13" --outputFormat 2
--action getRequest --request "ZSDCLI-2" --outputFormat 2
--action getRequest --request "ZSDCLI-3"
--action getRequest --request "ZSDCLI-8"
--action getRequest --request "ZSDCLI-9"

getRequestType

--action getRequestType --project "zsdcli" --type "Get a guest wifi account"

getRequestTypeList

--action getRequestTypeList --project "zsdcli"

getServerInfo

--action getServerInfo
--action getServerInfo --outputFormat 2

removeOrganization

--action removeOrganization --organization "Example Gear 3" --continue

removeOrganizationUsers

--action removeOrganizationUsers --organization "Example Gear 2" --participants "Test Automation {Appfire}"

removeParticipants

--action removeParticipants --request "ZSDCLI-3" --participants "Test Developer (Bob Swift Atlassian Apps)"

run

--action run -i "-a getServerInfo --outputFormat 2 --outputType text" -i "-a getReplacementVariableList --outputType text"
--action run --input "-a addCustomer --customer participant2+3928095@examplegear.com --name \"Participant 2\" --continue" --input "-a addOrganizationUsers --organization \"Example Gear 2\" --participants @customer@"

runFromCustomerList

--action runFromCustomerList --project "zclicustomers" --regex "Customer 1" --common "-a getCustomer --customer @customer@ --project zclicustomers"

runFromMyRequestList

--action runFromMyRequestList --project "zsdcli" --type "39822" --common '-a getServerInfo --field1 "request: @request@, requestId: @requestId@" '

runFromOrganizationList

--action runFromOrganizationList --common '-a getServerInfo --field1 "organization: @organization@, id: @organizationId@" '
--action runFromOrganizationList --project "zcliorgs" --common '-a getServerInfo --field1 "organization: @organization@, id: @organizationId@" '

runFromProjectList

--action runFromProjectList --common '-a getServerInfo --field1 "serviceDesk: @serviceDesk@, serviceDeskId: @serviceDeskId@, projectKey: @projectKey@, projectId: @projectId@" '
  • No labels