Comments
-
Assuming you have Scriptrunner addon, create a scripted field using 'Date Time picker' template. Use this code for your field: import java.sql.Timestamp Long created = issue.getCreated().getTime() Timestamp slaEnd = new Timestamp(created + 24*3600*1000) return slaEnd This'll add precisely 24 hours to your issue created…
-
Hi John, That's because you need to call getResolutionByName() method from an instance of Resolution Manager interface. Looking at your code and instance of this interface is stored in resolutionManager variable, so the correct code would be: issue.setResolutionObject(resolutionManager.getResolutionByName("Done")); (note…
-
Hi Ekaterina, There are a couple of ways to achieve this depending on what add-ons you have. A scripted field comes to mind or a custom field populated by some automation. If you can provide more details as to what tools you have at your disposal, I might be able to assist further.
-
What do you mean exacty by "customers can not see each other"?
-
Ah, I see. You can try the following then: import java.sql.Timestamp; Timestamp dueDate = issue.getDueDate(); return dueDate.format("MM/dd/yyyy");
-
Go to Administration -> System -> General Configuration -> Advanced Settings and check the settings for jira.date.picker.java.format and jira.date.time.picker.java.format. These settings control the way dates are displayed in date picker type fields. For the correct formats check this documentation.
-
What is your Jira version? If it's 7.x then to get and instance of SubTaskManager try this: import com.atlassian.jira.component.ComponentAccessor def subTaskManager = ComponentAccessor.getSubTaskManager()
-
Glad I could help. Please mark this solution as "Accepted" if it resolved your issue.
-
.
-
That's odd. I've just tried it in my instance and it returned issues resolved ONLY in Feb 2018. Are you positive that you have used the EXACT JQL I've provided? To be extra clear, it could've returned issues resolved in Feb 2018 AND March 2018 ONLY if you've used: resolved >= startOfMonth(-1) However it will limit the…
-
This JQL should do the trick: resolved >= startOfMonth(-1) AND resolved <= endOfMonth(-1)
-
@Meg Holbrook If you are asking about my solution, then first it checks if the attachment is an image by checking its mimetype. If it is, then it proceeds to construct a path to an actual file behind this attachment and then check that file's height and width against predetermined values (90 and 305 pixels in my case). If…
-
We've had a similar issue with signature images flooding issue attachments. Managed to resolve it by checking actual file's height and width and remove that attachment if its height and width were smaller than predefined values. Not a 100% bulletproof solution but in practice it works perfectly 99% of the time. Here's the…
-
@Angela Guarín Great news! Please mark this answer as "Accepted" if it resolved your issue.
-
Using the hotkey Ctrl+Enter to submit a comment will post it as internal.
-
@KRC Great news! Please mark this solution as "Accepted" if it resolved your issue.
-
Hi Matt, I know I'm not familliar with your business logic, but if a ticket has an assignee isn't that a good enough indicator that someone's already working on it and other agents should not interfere unless specifically asked to?
-
The error indicates that there's something wrong with the field you are trying the value of. Check if you've used the correct field name (or even better use the id instead) when declaring your custom field.
-
@Chase B. Great news! Please mark the solution as "Accepted" if it resolved your issue.
-
Well then I'd try to construct a multi-line string first and then pass it as the new field value, like so: String newValue = """ ${issue.getCustomFieldValue(myfield) ${commentBody} """
-
What is the type of your custom field? Multi-line text field?
-
Oh, my bad. I've just realized that you want a listener and not a post function where 'issue' is pre-declared. But not to worry, it's an easy fix. Simply replace 'issue' in the code with 'event.issue'.
-
Hi Aileen, I think this is your problem: if (user == "username") Looking at your code, 'user' variable is an ApplicationUser object. And you are trying to compare an object to a string which cannot be done hence your 'if' statement condition failing and all the code in its closure not being executed. The correct way to do…
-
Hi Alexander, I think you came across a known JSD bug, which prevents service desk type projects from being created if the default language is set to Russian. Check this ticket for more details. The workaround is to change you default language to English, create a project, and then change it back to Russian. It's rather…
-
Also, your code is wrong, because it returns a CustomField object instead of its value for a given issue. Please try the code I provided and see if it works.
-
Yep, your user picker data is rendered as 'Anonimous' because an incorrect search template is set for this field. Check the above comment to fix it.
-
Yeah, Scriptrunner can be very annoying at times with its Static Type Checking not always being accurate. In this case I'm quite certain you can pretty much ignore this error. Or you can change: getCustomFieldObject(14468) to getCustomFieldObject(14468.toLong()) and this should make this error go away. By searcher I mean a…
-
Hi Evan, Go to Administration -> System -> Default User Preferences and check the setting for "Default outgoing email format"
-
Hi Salil, Columns in issue filters represent differrent issue fields. So if you want specific data displayed in one of the columns you'll have to populate a custom field with that data and then add that field as a column to your issue filters. Given your requirement I'd say your best bet is a scripted field which can be…
-
You can do it like so: def parentCf = ComponentAccessor.getCustomFieldManager().getCustomFieldObject(14468) return issue.getParentObject().getCustomFieldValue(parentCf) Just make sure your scripted field is using a proper template and searcher if you want the data to be displayed correctly.