Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I see deleted comments in Jira Environment?

Shilpi Saxena
September 16, 2022

Hi Team,

I have one question- If a tester in my team has deleted some comments and as a admin I want to see what is deleted so is there any option to see it?

 

Thanks

 

1 answer

1 accepted

4 votes
Answer accepted
Thanos Batagiannis [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 10, 2017

Hi Tim,

So if you are not in an issue create screen, you can get the issue using the 

underlyingIssue

bound variable. Therefore if you want to get the value of the custom field with key customfield_13206 you will need something like 

def cf = ComponentAccessor.customFieldManager.getCustomFieldObject("customfield_13206")
def cfValue = underlyingIssue.getCustomFieldValue(cf)

 Hope that helps, ping me if you have any other questions.

Regards, Thanos

Tim Eddelbüttel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 13, 2017

Hello Thanos,

i've replaced my line with your line and this didn't work.

I get this error in atlassian-jira.log

2017-11-13 13:15:57,892 http-bio-8443-exec-6390 ERROR admin 795x1256291x1 1m0tvre 172.17.100.102 /rest/com.onresolve.jira.plugin.Behaviours/1.0/behaviours/validatorsByPid.json [c.o.jira.behaviours.BehaviourManagerImpl] *************************************************************************************
2017-11-13 13:15:57,894 http-bio-8443-exec-6390 ERROR admin 795x1256291x1 1m0tvre 172.17.100.102 /rest/com.onresolve.jira.plugin.Behaviours/1.0/behaviours/validatorsByPid.json [c.o.jira.behaviours.BehaviourManagerImpl] Script function failed on issue: (create issue) project/issuetype: PS/Additional Documents, user: admin, fieldId: __init__, file: <inline script>
java.lang.NullPointerException: Cannot invoke method getCustomFieldValue() on null object
at Script1.run(Script1.groovy:41)

Regards,
Tim

Tim Eddelbüttel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 13, 2017

Okay, i got it :) 

I think the problem was, that my variable for context was contextIssue and not underlyingIssue

 getFieldById("customfield_13206").setFormValue(contextIssue.getCustomFieldValue(customFieldManager.getCustomFieldObject("customfield_13206"))).setReadOnly(true) 

Thanks for your help.

Regards,
Tim

Thanos Batagiannis [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 13, 2017

Hey Tim, 

Sorry I misread the question (the underlying issue would be the solution if you were editing the same issue).

But in your case what you are doing with the contextIssue is the right way.

Glad you found it :)

Regards, Thanos

Jeff Pandinha
February 2, 2018

Hi Tim,

Tried your code, but it doesn't work for me. Also tried with "${}" substitution such as:

getFieldById("customfield_13206").setFormValue("${contextIssue.getCustomFieldValue(customFieldManager.getCustomFieldObject("customfield_13206"))}").setReadOnly(true)

 That still didn't work. Did you put your code as Initialiser or on the Field itself?

Thanks,
Jeff

R
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 21, 2018

Hey,

getBehaviourContextId() always returns null. Is there another method/field to get this context?

Regards.

Artemy Matvienko
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
February 26, 2018

I'm also getting null from getBehaviourContextId()

Marina Veselić
July 25, 2018

Same here! 

Michal Kurtak
September 25, 2018

Hi,

Same here. I get null for getBehaviourContextId() and null for getContextIssueId(). Have you found a workaround?

Thanks

Michal

Suggest an answer

Log in or Sign up to answer