It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Why am I getting NPE in com.adweb.estimations.Utilities.validateTimeTrackingByRole

Stan Huang Sep 24, 2016


I'm getting the following NPE when calling IssueService.validateUpdate from a ScriptRunner custom post function in a project configured with ADWEB JIRA Ultimate Role Tracking & Estimation: 


	at com.adweb.estimations.Utilities.validateTimeTrackingByRole(
	at com.adweb.estimations.customFields.timeTrackingByRole.TimeTrackingByRoleCFType.validateFromParams(
	at com.atlassian.jira.issue.fields.CustomFieldImpl.validateParams(
	at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndPopulateParamsWithScreenCheck(
	at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndPopulateParams(
	at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndUpdateIssueFromFields(
	at com.atlassian.jira.bc.issue.DefaultIssueService.validateUpdate(


My IssueInputParameters only contains a simple new Summary. It has RetainExistingValuesWhenParameterNotProvided set to true.

I'm running:

  • Atlassian JIRA Project Management Software v7.1.1 
  • Adaptavist ScriptRunner for JIRA v4.3
  • ADWEB JIRA Role Based Estimations and Tracking v1.7

It works fine on projects that do not have ADWEB configured.



1 answer

1 vote
Abhinav Ojha Sep 26, 2016

Hi Stan,

From the information provided by you, it seems that you are using an older version of the JIRA Ultimate Role Tracking & Estimation add-on. Just to make sure, we have tested our add-on with all the configuration provided by you, with the latest version of the add-on. I think, the latest version should not have this NPE.

Please take the latest update from here : 

for your JIRA version, latest will be v1.8.3.

Please keep checking for the updates, as we are adding cool new features on a regular basis.

Let us know, if you have any other issues or queries.



Stan Huang Oct 02, 2016

Hi Abhinav,

I'm still getting the error with v1.8.3, unfortunately.

  • I created a new, simple project (BUG) using the "Basic software development" template.
  • ADWEB is NOT configured for this project.
  • I created one issue in that project, using all default values except for the Summary, which I set to "Summary"
  • I added a workflow transition that loops from TO DO -> TO DO and associated that transition with a post function script:
package com.onresolve.jira.groovy.test.scriptfields.scripts

import org.apache.log4j.Logger
import org.apache.log4j.Level
import groovy.transform.CompileStatic
import com.atlassian.jira.bc.issue.IssueService
import com.atlassian.jira.bc.issue.IssueService.IssueResult
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.IssueInputParameters
import com.atlassian.jira.user.ApplicationUser

private static void testBug(Issue issue, Logger log)
    log.debug 'Entered testBug'
    String issueKey = 'BUG-1'
    IssueService issueSvc = ComponentAccessor.getIssueService()
    IssueInputParameters issueInParams = issueSvc.newIssueInputParameters()
    ApplicationUser user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
    log.debug 'Initialization complete'

    IssueService.IssueResult issueRslt = issueSvc.getIssue(user, issueKey)
    Issue theIssue = issueRslt.getIssue()
    log.debug issueKey + ' retrieved'

    log.debug 'IssueInputParameters configured'
    IssueService.UpdateValidationResult updateValidRslt = issueSvc.validateUpdate(user, theIssue.getId(), issueInParams)

    log.debug 'validUpdate completed'
    if (!updateValidRslt.isValid())

    log.debug 'IIP validated'


testBug(this.issue, this.log)


When executing this code, I get this error in the log:

2016-10-02 23:46:42,483 DEBUG [workflow.ScriptWorkflowFunction]: Entered testBug
2016-10-02 23:46:42,484 DEBUG [workflow.ScriptWorkflowFunction]: Initialization complete
2016-10-02 23:46:42,484 DEBUG [workflow.ScriptWorkflowFunction]: BUG-1 retrieved
2016-10-02 23:46:42,485 DEBUG [workflow.ScriptWorkflowFunction]: IssueInputParameters configured
2016-10-02 23:46:42,525 DEBUG [osgi.ActiveObjectsServiceFactory]: getService bundle [com.adweb.estimations.estimationUpdate]
2016-10-02 23:46:42,550 ERROR [workflow.ScriptWorkflowFunction]: *************************************************************************************
2016-10-02 23:46:42,553 ERROR [workflow.ScriptWorkflowFunction]: Script function failed on issue: BUG-1, actionId: 71, file: <inline script>
	at com.adweb.estimations.customFields.logWorkByRole.LogWorkByRoleCFType.validateFromParams(
	at com.atlassian.jira.issue.fields.CustomFieldImpl.validateParams(
	at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndPopulateParamsWithoutScreenCheck(
	at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndPopulateParams(
	at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndUpdateIssueFromFields(
	at com.atlassian.jira.bc.issue.DefaultIssueService.validateUpdate(
	at com.onresolve.jira.groovy.test.scriptfields.scripts.Script584.testBug(Script584.groovy:32)

Additional observations:

  • If I disable the ADWEB add on (across the entire JIRA instance), the error does not occur, even though ADWEB is not even setup for this project.
  • If I re-enable ADWEB, the error occurs.
  • If I do not call setSkipScreenCheck(true) in the script above, this error does not happen.

Let me know if I can provide any more information.




Stan Huang Oct 05, 2016

Hi Abhinav, I just wanted to confirm that you saw my last reply with a reproducible test case for you.




Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Marketplace Apps & Integrations

Webinar alert! An IT Admin's Guide to Securing Collaboration at Scale

Hello, Atlassian Community! My name is Dave Meyer and I'm a Principal Product Manager at Atlassian. I wanted to give this community a heads up about an upcoming Webinar that might be of interest...

181 views 2 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you