-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated Set-JiraIssue to allow for optional Summary and Description #24
Conversation
OOB ConvertFrom-Json implementation does not allow for overriding JSON maxlength. Default is easy to exceed with large issue lists. Change adds a ConvertFrom-Json2 function which allows override of maxlength, sets the default to Max(int) and replaces all calls to ConvertFrom-Json with ConvertFrom-Json2
Added an extra 2 ad the end of the function name, doh.
A couple of the other functions rely on expanded types so replicating expanded types functionality in PS.
Hi lipkau, I can understand why Set-JiraIssue may not need Summary and Description to be mandatory, but I'm not sure I understand a use case where New-JiraIssue does not require at least a summary. If you could, would you mind running Get-JiraIssueCreateMetadata and checking to see whether Summary and Description are flagged as Required? Also, I disagree with your change to Set-JiraConfigServer, as modifying a global variable within the scope of a module is a bad design practice. Users may not want this variable changed, and it would still need to be called each time a user opens a new PowerShell window. You can use New-JiraSession to create a persistent, authenticated session using a cookie, or you can modify the PSDefaultParameterValues variable in your PowerShell profile. Let me know about those two fields in the create metadata, and if they're not flagged as required, we can adjust the parameter values. Thanks! |
Regarding the credentials change.
|
Also: |
In response to discussion around #24, I've updated Priority to be a non-mandatory parameter for this function. If you attempt to create a new issue for a project and issue type where Priority is mandatory, you'll receive an error back from JIRA just as if you'd omitted a custom field that was mandatory.
I'm having some issues with GitHub and pull requests; the updated changes are in branch pr/24 (latest commit 640b3fe). Take a look when you get a chance and see if it matches what you're looking for. It surprises me that Priority isn't mandatory - I've never seen that before - but I made the change. Now, if you don't supply Priority in a case where it is required, JIRA will send back the same error it would if you omitted another mandatory field. I don't mean to say that PSDefaultParameterValues is a bad practice in general, but I believe it should be a user-level customization rather than a module-level customization. In my opinion, modifying it in your profile is great, but modules shouldn't mess with your settings. That's just my opinion, though. Regarding a JIRA trial server - that would be awesome. Would you mind if I drop you an e-mail to discuss further (with the address on your GitHub profile)? |
Switching to ConvertFrom-Json2
sure. go ahead. |
I found in my projects, that often Summary and Descriptions are not mandatory fields