Referencing the round robin assignment script from adaptavist library:https://library.adaptavist.com/entity/round-robin-assign-issue-to-users-in-a-certain-project-role, I want to get the last issue created in a project, but i also want to focus in on a certain issue type.
Here's what I changed in the script:
def lastIssueIdWithAssignee = issueManager.getIssueIdsForProject(issue.projectObject.id)
.sort()
.reverse()
.find {issue.getAsString("issuetype") == "Certification" }
So with this, I thought I'd be able to find the last Certification issue created in that project, but this doesn't seem to be the case...because the assignee keeps defaulting to the first user listed in the user key array.
Is there anything wrong with the change I made to the script?
I've just tested your code and it worked for me.
On which event(s) do you fire this script? I've tried it only with the "Issue Commented" event.
How is your scripted field defined? I've inserted only random text value without any code.
Which version of Jira/ScriptRunner do you have?
Hi, @Hana Kučerová
Version of ScriptRunner is 5.6.2.1-jira8
I use "all issue events".
The result of calculating the field value is formed as follows:
def result = RName + " (" +RDate.format("dd-MMM-yyyy") + ")"
def jqlname = URLEncoder.encode(RDate, "utf-8")
return '<a href=https://"mybazeURL"' + jqlname + '" >' + result + '</a>'
Here is "mybaseurl" - replaces full URL address, "RDate" and "RDate" - calculated value.
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.