kevinmarquette / jira Goto Github PK
View Code? Open in Web Editor NEWPowerShell module for Jira
License: MIT License
PowerShell module for Jira
License: MIT License
I was using the term ID but Jira called it the key in their endpoints and objects. The property should be changed to Key to match.
The command names like Get-Issue
are too generic should be branded to the module.
Need a command for assigning a fix version to an issue
How do we assign an issue?
Set-JIssue -Assignee '' -Key $issue.Key -ErrorAction 'Stop'
JiraPS accepts a empty string for unassignment.
Need a way to get available fix versions
Need to be able to test to see if a session is already established for scenarios where the controller script needs to know when to prompt for credentials or to skip the Open-JConnection
step.
Add a way to create fix versions
Add a command for saving changes to a fix version object
The current -passthru
object is a raw object from the SDK that should be wrapped into something more friendly for the end user. This same object should be returned by Get-JSession
#9
I get this when I try to login:
Open-JiraSession -Credential $credential -Uri $uri -Save
New-StoredCredential : Argument 'New-StoredCredential' is not recognized as a cmdlet: Could not load type 'System.Web.Security.Membership' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
At C:\Users\sdaa\Documents\PowerShell\Modules\jira\0.2.2\jira.psm1:88 char:21
+ $null = New-StoredCredential @storedCredential -Comment " ...
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-StoredCredential:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CmdletNotFoundException
This the current version:
$PSVersionTable
Name Value
---- -----
PSVersion 6.1.3
PSEdition Core
GitCommitId 6.1.3
OS Microsoft Windows 10.0.17134
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
I guess I need to install something to get this to work. But what exactly?
Get-Module -Name jira
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 0.2.2 jira {Add-Comment, Get-Issue, Invoke-IssueTransition, New-Issue...}
If I am going to create a Get-JSession
command #9, then I need to round out the commands with a way to remove or close that session.
How do I enter an array to the input data for customfields? I tried different versions, but I had no success so far.
Set-Jissue -key ITDR-152 -customField @{"Responsible Team" = @("System (CMDB-3605)")} -Verbose
VERBOSE: ParameterSetName [IssueID]
VERBOSE: Updating issue
VERBOSE: Saving [ITDR-152]
DEBUG: Processing [1] running queries
DEBUG: Waiting for an async result to finish
Set-Jissue : System.InvalidOperationException with Saving [ITDR-152]: [data was not an array]
At line:1 char:1
+ Set-Jissue -key ITDR-152 -customField @{"Responsible Team" = @("s ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-JIssue], JiraInvalidActionException
+ FullyQualifiedErrorId : JiraModule.JiraInvalidActionException,JiraModule.SetIssue
This is for an Insight object.
When I get the issue, it looks like this:
(Get-JIssue -Key itdr-152).customfields| ? name -like responsible*
DEBUG: Queueing running queries
DEBUG: Processing [1] running queries
DEBUG: Waiting for an async result to finish
Values Id Name
------ -- ----
{system (CMDB-3605)} customfield_11302 Responsible Team
Instead of throwing when there is not a credential that is needed, should instead prompt for it.
Need a way to set the properties on a fix version
CredentialManager
is not a valid solution for PowerShell 6.1. I need to rethink how I approach this. Either remove this dependence and feature, or gracefully handle when it is not available.
Are you aware of this module?:
https://github.com/AtlassianPS/JiraPS
It's pretty well maintained.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.