IssueService permissions problem?

Using Script runner and JIRA 6.3.7, I am getting an error when updating an issue with IssueService that looks incorrect to me.

 

CustomField cfSprint = cfMgr.getCustomFieldObjects(mutableIncomplete).find {it.name == 'Sprint'}
IssueInputParameters issueInputParameters = issueService.newIssueInputParameters()
issueInputParameters.addCustomFieldValue(cfSprint.getIdAsLong(),null);


valRes = issueService.validateUpdate(authContext.getUser().getDirectoryUser(), mutableIncomplete.getId(),issueInputParameters);

The validation result fails with:

You do not have permission to edit issues in this project. 

But I have the permissions on this project...

I have assigned myself all the roles in this project. Most of these roles have the edit issue permission in the permission scheme.

I can edit and transition the issues in the UI.

Is there something I am missing here with IssueService?

5 answers

0 vote

How is the script running... service, post-function, console etc?

Post function

Basic scenario is that we are using sub tasks with hours and standard issue types with story points. When closing out a sprint the Scrum master wants to be able to pull a story with incomplete sub tasks to the close issue column. If there are unresolved sub tasks then the script should create a clone with no story points, move resolved sub tasks under it and then move original story out of sprint. The want to keep the hours they spent in the sprint in the burn downs but not earn story points. I just can't seem to get story out of sprint...

Uhmm, maybe I have to move it out of closed status first...

Yeps. Should have thought about that before :P

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

145 views 1 17
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you