Codota Logo
WorklogService.validateUpdate
Code IndexAdd Codota to your IDE (free)

How to use
validateUpdate
method
in
com.atlassian.jira.bc.issue.worklog.WorklogService

Best Java code snippets using com.atlassian.jira.bc.issue.worklog.WorklogService.validateUpdate (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: com.atlassian.jira/jira-rest-plugin

@Override
public Worklog validateAndPerformAndAutoAdjustEstimate(JiraServiceContext serviceContext, Issue issue, WorklogInputParameters worklogInputParameters)
{
  WorklogResult worklogResult = getWorklogService().validateUpdate(serviceContext, worklogInputParameters);
  return getWorklogService().updateAndAutoAdjustRemainingEstimate(serviceContext, worklogResult, true);
}
origin: com.atlassian.jira/jira-core

public void doValidation()
{
  final CommentVisibility commentVisibility = getCommentVisibility();
  final Visibility visibility = Visibilities.fromGroupAndStrRoleId(commentVisibility.getGroupLevel(), commentVisibility.getRoleLevel());
  // Call the correct validation on the service so that we can get the worklog to update
  final WorklogInputParametersImpl.Builder builder = WorklogInputParametersImpl
      .timeSpent(getTimeLogged())
      .worklogId(getWorklogId())
      .startDate(getParsedStartDate())
      .comment(getComment())
      .visibility(visibility);
  if (ADJUST_ESTIMATE_NEW.equalsIgnoreCase(adjustEstimate))
  {
    final WorklogNewEstimateInputParameters params = builder
        .newEstimate(getNewEstimate())
        .buildNewEstimate();
    worklogResult = worklogService.validateUpdateWithNewEstimate(getJiraServiceContext(), params);
  }
  else
  {
    final WorklogInputParameters params = builder.build();
    worklogResult = worklogService.validateUpdate(getJiraServiceContext(), params);
  }
}
origin: com.atlassian.jira/jira-rest-plugin

@Override
public Worklog validateAndPerformAndLeaveEstimate(JiraServiceContext serviceContext, Issue issue, WorklogInputParameters worklogInputParameters)
{
  WorklogResult worklogResult = getWorklogService().validateUpdate(serviceContext, worklogInputParameters);
  return getWorklogService().updateAndRetainRemainingEstimate(serviceContext, worklogResult, true);
}
origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

public void updateWorklogAndAutoAdjustRemainingEstimate(User user, RemoteWorklog remoteWorklog)
    throws RemoteException, RemotePermissionException, RemoteValidationException
{
  JiraServiceContext serviceContext = new JiraServiceContextImpl(user, new SimpleErrorCollection());
  Long id = SoapUtils.toLongRequired(remoteWorklog.getId());
  String timeSpent = remoteWorklog.getTimeSpent();
  Date startDate = remoteWorklog.getStartDate();
  String comment = remoteWorklog.getComment();
  String groupLevel = remoteWorklog.getGroupLevel();
  String roleLevelId = remoteWorklog.getRoleLevelId();
  final WorklogInputParameters params = WorklogInputParametersImpl
      .timeSpent(timeSpent)
      .worklogId(id)
      .startDate(startDate)
      .comment(comment)
      .groupLevel(groupLevel)
      .roleLevelId(roleLevelId)
      .build();
  WorklogResult worklogResult = worklogService.validateUpdate(serviceContext, params);
  checkAndThrowValidationException(serviceContext.getErrorCollection());
  if (worklogResult == null)
  {
    throw new RemoteValidationException(getI18nHelper().getText("error.unexpected.condition", "WorklogService.validateUpdate"));
  }
  worklogService.updateAndAutoAdjustRemainingEstimate(serviceContext, worklogResult, true);
  checkAndThrowRemoteException(serviceContext.getErrorCollection());
}
origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

public void updateWorklogAndRetainRemainingEstimate(User user, RemoteWorklog remoteWorklog)
    throws RemoteException, RemotePermissionException, RemoteValidationException
{
  JiraServiceContext serviceContext = new JiraServiceContextImpl(user, new SimpleErrorCollection());
  Long id = SoapUtils.toLongRequired(remoteWorklog.getId());
  String timeSpent = remoteWorklog.getTimeSpent();
  Date startDate = remoteWorklog.getStartDate();
  String comment = remoteWorklog.getComment();
  String groupLevel = remoteWorklog.getGroupLevel();
  String roleLevelId = remoteWorklog.getRoleLevelId();
  final WorklogInputParameters params = WorklogInputParametersImpl
      .timeSpent(timeSpent)
      .worklogId(id)
      .startDate(startDate)
      .comment(comment)
      .groupLevel(groupLevel)
      .roleLevelId(roleLevelId)
      .build();
  WorklogResult worklogResult = worklogService.validateUpdate(serviceContext, params);
  checkAndThrowValidationException(serviceContext.getErrorCollection());
  if (worklogResult == null)
  {
    throw new RemoteValidationException(getI18nHelper().getText("error.unexpected.condition", "WorklogService.validateUpdate"));
  }
  worklogService.updateAndRetainRemainingEstimate(serviceContext, worklogResult, true);
  checkAndThrowRemoteException(serviceContext.getErrorCollection());
}
com.atlassian.jira.bc.issue.worklogWorklogServicevalidateUpdate

Javadoc

Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by calling #hasPermissionToUpdate(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.worklog.Worklog)to update a worklog for this issue.

Popular methods of WorklogService

  • createAndAutoAdjustRemainingEstimate
  • validateCreate
  • getById
    Used to get a worklog by its id.
  • createAndRetainRemainingEstimate
    Persists a new com.atlassian.jira.issue.worklog.Worklog on the given Issue. This method will make no
  • createWithNewRemainingEstimate
    Persists a new com.atlassian.jira.issue.worklog.Worklog on the given Issue. This method will adjust
  • deleteAndAutoAdjustRemainingEstimate
    Deletes the specified com.atlassian.jira.issue.worklog.Worklog. This method will auto-adjust the iss
  • deleteAndRetainRemainingEstimate
    Deletes the specified com.atlassian.jira.issue.worklog.Worklog. This method will make no adjustment
  • deleteWithNewRemainingEstimate
    Deletes the specified com.atlassian.jira.issue.worklog.Worklog. This method will adjust the issues r
  • getByIssueVisibleToUser
    Returns a PagedList over all all child worklogs of a specified issue that the provided user has perm
  • updateAndAutoAdjustRemainingEstimate
    Updates the provided com.atlassian.jira.issue.worklog.Worklog. This method will auto-adjust the issu
  • updateAndRetainRemainingEstimate
    Updates the provided com.atlassian.jira.issue.worklog.Worklog. This method will make no adjustment t
  • updateWithNewRemainingEstimate
    Updates the provided com.atlassian.jira.issue.worklog.Worklog. This method will adjust the issues re
  • updateAndRetainRemainingEstimate,
  • updateWithNewRemainingEstimate,
  • validateCreateWithNewEstimate,
  • validateDelete,
  • validateDeleteWithNewEstimate,
  • validateUpdateWithNewEstimate,
  • createWithManuallyAdjustedEstimate,
  • deleteWithManuallyAdjustedEstimate,
  • hasPermissionToDelete

Popular in Java

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • findViewById (Activity)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Reference (javax.naming)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now