Hello,
I know this is not out of the box, but is there a way to do this?
I followed some instructions on how to create a powershell script to connect to Jira Cloud, but let's say you have a Powershell script with parameters that you want users to answer. How do you either upload it into the forms area of Jira Cloud or some how when you create a ticket in Jira to link back to that Powershell script to for example, create an active directory user, etc...
Hello,
This is resolved now. I found a way to integrate Powershell with the Jira Cloud Service Management system, just working out the variables when closing tickets for a specific issue. If anyone would like to know how I did so, please let me know and I'll post some codes. This can be closed as well.
Hello @Jamaal Sandy
I would like to know how this automation process is set up.
Could you kindly provide any documentation for reference on starting from scratch?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, Meng,
I'm very sorry, thought I replied to this a while back.
I'll break down some of the steps you need to get this working.
First, download a PowerShell module called JiraPS. It's a PowerShell module used by Jira.
Once you install it, you need to authenticate to your online server instance.
After that, I recommend you create custom fields in Jira Cloud, ex; first name, last name, etc.
Then once you're sure you got all the fields, you need to search for the field names.
Here's an example of a PowerShell command from the Jira PS:
$firstnamefield = (get-jirafield -field "first name").id
$firstnamefield
Once you plug that in, you'll see the field name something like customfield_10102, etc.
Here's some documentation for Jira PS:
I'll give a short example of my script because it's too long to type out.
But basically in your script, you need to find the field you searched for and get the data out of it;
example: $firstname = get-jiraissue -key "IT-1" | select-object customfield_10102).customfield_10102
This will get the first name what they typed in the service request for example when they want to create a new hire.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, Jimmy,
So my powershell script that I got assistance on creating starts off like this:
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string] $MacAddress,
[Parameter(Mandatory = $true)]
[string] $imagename,
[Parameter(Mandatory = $true)]
[string] $department,
[Parameter(Mandatory = $true)]
[string] $firstname,
[Parameter(Mandatory = $true)]
[string] $lastname,
[Parameter(Mandatory = $true)]
[string] $office,
[parameter(Mandatory = $true)]
[string] $software = @('Amazon', 'java', 'Zoom'),
I created a service request in Jira Cloud with the same fields, but would like to know when this gets created as a service request, can it some how trigger that Powershells script I have on my test server? So basically this scripts goes back to our Fog server, which uses api as well.
So I did something like this: get-jiraissue -query 'project = "ir" and created >= -1d' | ConvertTo-Json | format-list
I got the json format, but the custom fields are not showing up user friendly, has customfield_100xx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jamaal Sandy,
Welcome to the community!
Can you provide a bit more detail about what/how your Powershell scripts are connecting to Jira Cloud? Are they making REST API calls?
If that's the case you probably want to read the Jira Cloud REST API documentation to figure out how to read the parameters from the user and pass those along to the API request.
https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/
I hope that helps!
-Jimmy
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.