Comments
-
Can you show me the code as it looks like on your end?
-
I suggest using IssueManager to update issues instead of IssueService. Like so: import com.atlassian.jira.event.type.EventDispatchOption import com.atlassian.jira.component.ComponentAccessor issue.setPriority(priority) def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()…
-
Hi Nico, Not sure what exactly is going wrong, as I don't see what does the log say. But simply looking at your code I think your problem might be here: newIssue.setCustomFieldValue(customFieldManager.getCustomFieldObject(13704), it) You are setting a value fora multi-group picker type field. The expected value for this…
-
If there's no reference to this feature in product documentation, then I'd contact vendor support and ask them.
-
Hi Kevin, I don't quite understand what exactly you are trying to achieve here. By the looks of it, your "Budget Status" field is a scripted field with HTML template. You want to get this field's value, cut off all HTML tags and pass the actual value somewhere else (to another field)? If this is the case, then I suggest…
-
I suppose I could help you here. Could you please clarify what is the field type of your "Story Maturity" field (i.e. Select List (single choice), Text field, etc..)
-
Hi Marco, If we are talking about a transition validator, the script should be something like this: import com.atlassian.jira.component.ComponentAccessor import com.opensymphony.workflow.InvalidInputException def cfMgr = ComponentAccessor.getCustomFieldManager() def companyAndRole =…
-
The reason why you have to re-get your issue as MutableIssue is because SearchService returns a DocumentIssueImpl object, which does not have any setter methods. As for the error above you need to pass 'mutableIssue' variable into updateIssue() method instead of 'issue'
-
No problem. I've updated the code above.
-
Not out of the box I'm afraid. However this can be achieved through a groovy script if you have addons like Scriptrunner or JMWE
-
Hi Paul, Here's how you do it: import com.atlassian.jira.issue.MutableIssue def issues = results.getIssues().collect{ComponentAccessor.getIssueManager().getIssueByCurrentKey(it.getKey())} for (def issue : issues){ issue = issue as MutableIssue issue.setCustomFieldValue(.........) }
-
1. Create a scripted field which would return a link depending on your meetingId value. 2. Use your scripted field's value in your email template.
-
Hi Donn, Check out this documentation. Hope this helps.
-
That's really odd. Check if you have any post-functions on this transition, which could cause such behaviour.
-
Feel free to ignore this error. Static type checking in Scriptrunner is not always accurate. It should work as is (assuming your custom field type is numbers field :))
-
On a side note, if you are cloning an issue, you might wanna use cloneIssueWithAllFields() method in your IssueFactory. This will dispense you from having to set all field values manually.
-
You need to use createIssueLink() method from IssueLinkManager interface. Make sure you that you are getting the id of you new issue correctly. You need to call getId() from the object which is returned by your createIssueObject() method.
-
Hi Andrew, Indeed, you are passing the wrong data type to setIssueType() method. You are passing a String, when in fact you need to pass it IssueType object. To make this work you need something like this: import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.config.IssueTypeManager import…
-
Hi David, To get this to work, you need to match your summary against a regex, containing your custom field value. Try this: import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.fields.CustomField import com.opensymphony.workflow.InvalidInputException import java.util.regex.Matcher import…
-
Hello, Create a regex which satisfies your requirements and match your fix version value against it.
-
Hi, Judging by your code, it's not working because: 1) There's no changelog in Issue Created event, and thus there's not point in trying to get field values from there. Get them from the issue directly. 2) It's supposed to trigger on sub-task creation, right? If so you need to change the logic of using your issue variable,…
-
Hi @James Fleming, I suppose you can use startOfWeek() and endOfWeek() functions for this. Check out this documentation for more info. Hope this helps.
-
Hi Garry, Let me get this straight. 1. You have a transition screen with 'Original Estimate' field on it. 2. You have a scripted validator on this transition which checks if the value entered in 'Original Estimate' is less than 2 hours and if it isn't you want an error message displayed on screen?
-
The script should return logical true for the transition to become available or logical false otherwise. The 'return' statement does that in this case. 'every' closure returns true if the condition inside the closure is true for every element of the 'issuesInEpic' list.
-
Ok, so we know that we are getting the correct issues and we are getting their statuses right. The problem seems to be in 'return' statement. Try chaning it to: return issuesInEpic.every{it.getStatus().getName().equalsIgnoreCase("Done")}
-
That's odd. I've added some logging to the code above to be able to see what exactly is going on there. Could you please update your code with it and send me a screenshot of your script logs.? To quickly get to them, open your conditions tab and click on the last green ckeckmark (or red X) in your scripted condition. Make…
-
What @Mohamed Benziane said, or you can use a scripted condition for your transition, like so: List<String> forbiddenIssueTypes = Arrays.asList("issueType1", "issueType2", "issueType3") return !forbiddenIssueTypes.contains(issue.getIssueType().getName())
-
Just to clarify, your Intake and Estimate issues are connected to an epic via "epic link" field and not a simple issue link, right?
-
Condition is the correct approach here. Make sure you put it on your transition that leads to "In Progress" status. The code is as follows: import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.CustomFieldManager import com.atlassian.jira.issue.Issue import org.slf4j.Logger import…
-
Indeed, This error occurs because the issue this script is executed in is NOT a subtask and as such does not have a "parent". That's why the parent here is null, hence the error. Now that we have this out of the way, I think I can still help you with this, but first could you clarify what exactly do you mean by "siblings"?