Out there in the world of Atlassian tools, we are wondering about something about how others approach an issue we are having .....
What users in upper level managment (non-IT) do y'all allow into Jira software with agent access?
Is it normal for say, the CEO or other c-type people in the company (who are NOT IT types at all) to have access to Jira Software?
What are the use-cases and what are the solutions for either direction, access or just viewer access or what?
Trying to come up with solutions not just block people here, but where is the line where it decreases productivity and causes the less than extroverted developer type to limit their communications, and other such side effects.
Hello @Khushbu Jowaheer
I check you code and it work pretty well.
It seems like groovy do not cast objects properly
try to replace def properties with
Map properties = [(SD_PUBLIC_COMMENT): new JSONObject(["internal": true] as Map)]
And your code is too complicated for your goal.
What are tryin to achieve? As i understand you want to add comment to parent issue when subtask is closed and there are another unresolved subtasks. And this is postfunction in subtasks workflow.
Am I right?
Hi Mark,
As you mentioned, each time a sub task is closed, a comment is added to parent issue. I have changed the code above. The issue is still the same. Customer are able to view the comment in their request that y i want the comment to be internal. Please see screenshot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this code bellow :
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.util.json.JSONObject
final SD_PUBLIC_COMMENT = "sd.public.comment"
def commentManager = ComponentAccessor.getCommentManager()
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def parent = issue.getParentObject() as MutableIssue
def properties = [(SD_PUBLIC_COMMENT): new JSONObject(["internal": true] as Map)]
log.warn("properties: " + properties)
def subtasks = parent.getSubTaskObjects()
if (subtasks.find {it.status.name != "Done"}){
commentManager.create(parent,user, "I resolved this issue even though there were unresolved sub-tasks... slapped wrists", null, null, new Date(),properties,true)
}
this is postfunction on subtasks workflow. On transition that goes to "Done" status
I check it on ScriptRunner v5.4.7 and it works!
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.
No problem :) If it help you, mark answer as accepted :)
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.