# Modify Issue without a user

**URL:** <https://community.developer.atlassian.com/t/modify-issue-without-a-user/14644>\
**Category:** Jira Server\
**Created:** [February 9, 2018, 8:06pm UTC](https://community.developer.atlassian.com/t/modify-issue-without-a-user/14644 "2018-02-09T20:06:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon23458333](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@anon23458333](https://community.developer.atlassian.com/u/anon23458333)\
**Post date:** [February 9, 2018, 8:06pm UTC](https://community.developer.atlassian.com/t/modify-issue-without-a-user/14644/1 "2018-02-09T20:06:17Z")

</div>

I’m trying to modify an issue, but getting a permission error when I pass null as the user. However, I can’t pass a valid user in, since I’m not running in a context where there is a user (basically a cron job). There isn’t any particular user who can be said to have ‘performed’ the action, so I’d rather just leave the user field empty, but not sure how to bypass the permissions issue.

Here’s my (partial) code at the moment

```java
public void setCustomField(CustomField field, Issue issue, String value) {
      ApplicationUser user = null; // What do I put here instead of null?
      IssueInputParameters issueInputParameters = issueService.newIssueInputParameters();
      issueInputParameters.addCustomFieldValue(field.getId(), value);
      issueInputParameters.setSkipScreenCheck(true);
      issueInputParameters.setRetainExistingValuesWhenParameterNotProvided(true, true);
      UpdateValidationResult updateValidationResult = issueService.validateUpdate(user, issue.getId(), issueInputParameters);	
     //....
}

```

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/daniel/32/35798_2.png) [@daniel](https://community.developer.atlassian.com/u/daniel)\
**Post date:** [February 10, 2018, 5:22am UTC](https://community.developer.atlassian.com/t/modify-issue-without-a-user/14644/2 "2018-02-10T05:22:34Z")

</div>

IssueService (and most of the other \*Service) enforces permissions (and other validations). In this case it’s that anonymous doesn’t have the rights to create issues.

The workaround is to use IssueManager or other service. Take a look at the source of IssueService to see what it is doing.
