Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hi,
I'm setting assignee in a script runner post function via
issueService.assign(user, assignResult) ....
I see this assignee in the issue. But in the issue navigator it still shows unassigned.
If I update the issue (f.e. update the description) or reindex the issue manually , the assignee is also show in the issue navigator.
Extra funny: I'm using the script in 2 projects. In first project I don't have the update problem.
I've also tried to reindex in the post function => no effect for the 2 nd project.
boolean wasIndexing = ImportUtils.isIndexIssues(); IssueManager issueManager = ComponentAccessor.getIssueManager(); ComponentAccessor.getIssueIndexManager().reIndex(executionResult.getIssue()); ImportUtils.setIndexIssues(wasIndexing);
What could be the reason. Bug in JIRA or ???
What could the issueService.assign() forget ot trigger ?
Thanks
Dieter
Hi there,
Your projects use the same workflow?
If not, check the order of post functions on the one you get the right result and copy it to the one you have the problem.
Yes the workflow is similar and should be ok. Post function is before index in worfklow => should be ok. But I found out the diferrence between the other project. The working project has an additional StateListener (Scriptrunner) setting some date values. So the issue is updated again => and this "solves" the update for the assignee (lucky strike). So the real problem is that the issueService.assing() has some refesh problem ??? Any idea therefore?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why don't you use issue.assigneeId = "username" in your scripts?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
doesn't help I don't think this would be stored anyway.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry you are right. I made a copy mistake so issue.assigneeId = "username" seems to work thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But then you don't find this issue if you search FYI project = XY and assignee = Testuser This issue is then NOT in the result list. If you update the issue => it's in the result list. So again an refresh problem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So long as your function is "first", you should be fine with issue.assigneeId = ... I would not use issueService for this, it will create a new history change group.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My init script can't be first (before create issue) because in front there's an email parser that creates the issue and my script cames afterwards. @Jamie: Do you have any idea for this refresh problem? There should be a reason. Thxs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jamie Echlin : Do you have any idea for this refresh problem? There should be a reason.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.