Hi,
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:
java.lang.NullPointerException at com.adweb.estimations.Utilities.validateTimeTrackingByRole(Utilities.java:1773) at com.adweb.estimations.customFields.timeTrackingByRole.TimeTrackingByRoleCFType.validateFromParams(TimeTrackingByRoleCFType.java:421) at com.atlassian.jira.issue.fields.CustomFieldImpl.validateParams(CustomFieldImpl.java:741) at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndPopulateParamsWithScreenCheck(DefaultIssueService.java:897) at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndPopulateParams(DefaultIssueService.java:858) at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndUpdateIssueFromFields(DefaultIssueService.java:660) at com.atlassian.jira.bc.issue.DefaultIssueService.validateUpdate(DefaultIssueService.java:278)
My IssueInputParameters
only contains a simple new Summary. It has RetainExistingValuesWhenParameterNotProvided
set to true
.
I'm running:
It works fine on projects that do not have ADWEB configured.
thanks.
stan.
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 : https://marketplace.atlassian.com/plugins/com.adweb.estimations.estimationUpdate/versions
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.
Thanks,
Abhinav.
Hi Abhinav,
I'm still getting the error with v1.8.3, unfortunately.
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.security.JiraAuthenticationContext import com.atlassian.jira.user.ApplicationUser @CompileStatic 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' issueInParams.setRetainExistingValuesWhenParameterNotProvided(true) issueInParams.setSkipScreenCheck(true) log.debug 'IssueInputParameters configured' IssueService.UpdateValidationResult updateValidRslt = issueSvc.validateUpdate(user, theIssue.getId(), issueInParams) log.debug 'validUpdate completed' if (!updateValidRslt.isValid()) return log.debug 'IIP validated' return } log.setLevel(Level.DEBUG) testBug(this.issue, this.log) return
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> java.lang.NullPointerException at com.adweb.estimations.customFields.logWorkByRole.LogWorkByRoleCFType.validateFromParams(LogWorkByRoleCFType.java:206) at com.atlassian.jira.issue.fields.CustomFieldImpl.validateParams(CustomFieldImpl.java:741) at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndPopulateParamsWithoutScreenCheck(DefaultIssueService.java:947) at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndPopulateParams(DefaultIssueService.java:860) at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndUpdateIssueFromFields(DefaultIssueService.java:660) at com.atlassian.jira.bc.issue.DefaultIssueService.validateUpdate(DefaultIssueService.java:278) at com.onresolve.jira.groovy.test.scriptfields.scripts.Script584.testBug(Script584.groovy:32) at com.onresolve.jira.groovy.test.scriptfields.scripts.Script584.run(Script584.groovy:44)
Additional observations:
setSkipScreenCheck(true)
in the script above, this error does not happen.Let me know if I can provide any more information.
thanks.
stan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhinav, I just wanted to confirm that you saw my last reply with a reproducible test case for you.
thanks.
stan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.