Skip to content
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

Comments are added with non default secuirty. #172

Closed
123dev opened this issue Sep 15, 2017 · 5 comments
Closed

Comments are added with non default secuirty. #172

123dev opened this issue Sep 15, 2017 · 5 comments

Comments

@123dev
Copy link

123dev commented Sep 15, 2017

Expected Behavior

We use Add-JiraIssueComment -Issue $jiraID -Comment $comment -Credential $cred` to add comments to tickets,
We're expecting the comments to be added in default security context All Users
However they are being added with some security context that is non-default (we have many)

See attachment.
image

Steps to Reproduce (for bugs)

  1. Make sure you have multiple Security Levels defined in Jira
  2. Add-JiraIssueComment -Issue $jiraID -Comment $comment -Credential $cred`

Environment

Get-Module JiraPS -ListAvailable | select version

Version
-------
2.2.0.141

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14393.1532
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.1532
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
@lipkau
Copy link
Member

lipkau commented Sep 15, 2017

Thanks for reporting this.
Indeed I also find it weird that the default value for the visibility is Developers:
https://github.com/AtlassianPS/JiraPS/blob/master/JiraPS/Public/Add-JiraIssueComment.ps1#L48

I agree with changing the default to All Users.

Do you have more visibility roles than the 3 in the code?

@123dev
Copy link
Author

123dev commented Sep 15, 2017

Thanks Oliver.

Yes, we have more, the way Jira allows us to select is:
All Users, then lists all Project Roles and then lists all Groups (see pic)
image

I guess the best way would be for those options to be dynamically loaded, but I understand that's must bigger work.
I'd be happy with All Users being selected by default, and perhaps an option to specify different security level if one chooses to (not necessary for our use case, All users choice is good enough)

@123dev
Copy link
Author

123dev commented Sep 15, 2017

I didn't realize that this option was available.
so I just added this to my command
-VisibleRole 'All Users'

This should do it for us.
But the default eventually changing to 'All Users' would be good idea.

Thanks

@lipkau
Copy link
Member

lipkau commented Sep 18, 2017

ToDo

Change default

@lipkau
Copy link
Member

lipkau commented Sep 18, 2017

Changing the parameter is a breaking change
This is continue by: #174

@lipkau lipkau added this to the v2.3 milestone Sep 18, 2017
@lipkau lipkau self-assigned this Sep 18, 2017
lipkau added a commit to lipkau/JiraPS that referenced this issue Oct 4, 2017
lipkau added a commit that referenced this issue Oct 4, 2017
Fix default value of Visibility of comments
@lipkau lipkau closed this as completed Oct 4, 2017
@ghost ghost removed the Status:In Review label Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants