Comments
-
Hey Raf. In right under a year of working with ScriptRunner I haven't heard anything like this. I heard about something similar, but all the information was still in the database. Submit a support ticket at: https://productsupport.adaptavist.com We'll allocate some resources to help you solve your problem. Cheers! Dyelamos
-
Hi Antoine. You are experiencing a form of the bug: https://productsupport.adaptavist.com/browse/SRJIRA-2027 We're sorry for your troubles, if you watch this ticket you'll be able to know when it gets fixed. Cheers! Dyelamos
-
Hello Vidic You might be suffering from a know bug that arises when you create two fragments that are exactly the same: https://productsupport.adaptavist.com/browse/SRPLAT-217 If you are, there is a workaround in that very bug to solve your problem. Cheers! Dyelamos
-
Sarah please do as I tell you: Paste this script in your verification script box as is: Do not modify anything import static com.atlassian.jira.issue.IssueFieldConstants.FIX_FOR_VERSIONS import static com.atlassian.jira.issue.IssueFieldConstants.RESOLUTION def resolution = getFieldById(RESOLUTION) def version =…
-
Hi Eric. Katy gave you a very good example, and it only needed a very slight modification to make it work: Here is the code for your custom field. I tested it this very morning: import com.atlassian.jira.component.ComponentAccessor def cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Sprint") def…
-
Hello Tom. Sorry I misunderstood you. Yes you are correct, for that use case, disjoint might work. However I'm not 100% sure if there are any edge cases that might fail with this. Give it a go, and see if it works. If you have any problems with it, I'll be glad to have another look. Could you accept one of the answers so…
-
For more reference: https://math.stackexchange.com/questions/1631396/what-is-the-difference-between-disjoint-union-and-union
-
Hey Tom. I don't understand why you are using disjoint instead of intersect. Disjoint might not fully work as you intend, since it isn't taking into consideration what intersects with each set, but what doesn't intersect. If this does work for you, go ahead, but if you found that assert was the problem, why don't you use…
-
Hello Ana. To be honest I thought this was solved long ago, apologies for taking this long. Regarding your error: This is a Static type checking error. Bottom line, it isn't a problem. Read this part of our documentation. That explains why it isn't really an error. Regarding your question: I really don't understand why…
-
Ah! Apologies, I thought your actual fruits only had 1 value. If it's a list you are going to have to use Collection.intersect() So for example, you could do this: <span>def actualFruitNames = cfValues['Actual Fruits']*.name<br>assert actualFruitNames.size() == cfValues['Necessary Fruit…
-
Hi Christian. We do not officially support interaction with third party addons, since they work in a very different way than we do. However, it seems like your issue doesn't have do with this. when you do this: def new_value = issue.getCustomFieldValue(delivery_date_READ) def old_value =…
-
Oh Illiterati. I'm so very sorry but I misread the title of your question. Your question involves JIRA cloud and I only work with JIRA server. I could still find out how to do this for you, although i don't think this is a feature in development for cloud. Give me a few days and I'll chase down the right person to help…
-
Hi Germani. The creating subtask builtin listener or postfunction has a field called additional issue actions. You could write something like this: def cf = customFieldManager.getCustomFieldObjects(issue).find {it.name == 'Time estimated in hours'} issue.setCustomFieldValue(cf, 2) That way, you will have set your issue…
-
Hi Tom! So this is happening because you are using some concepts that aren't in groovy. Your line: cfValues['Actual Fruits']*.name.contains(cfValues['Necessary Fruit List']*.name Is using contains, which implies that the left part of the operator should contain at least the totality right part of the operator. However, you…
-
Illiterati This is a feature that will be released as a canned Scripted field, and it is currently under development by me! You can follow it's progress if you watch this ticket. I can't tell you when it will be released exactly, but maybe it is worth waiting for it to be released than to actually debug. If you still want…
-
Suresh: Why don't you use behaviours? Cheers! Dyelamos
-
Okay Johannes, hold onto your horses cause this isn't very simple. Step 1 You can create a field with your expiration day. That field could be visible or hidden. Step 2 You need to also create a new state in your workflow with a name that is "LICENSE EXPIRED" or something like that. Step 3 Afterwards, you create a scripted…
-
Hi Johannes. I don't think that is entirely impossible, but I don't think this is a good idea. Option 1: What you could do would be to add a hidden field with your desired date. And then add a scripted field that takes that date into the timestamp, and takes it to 0 slowly. However that would not work: The thing with…
-
Buenas Pablo. Could you kindly provide your code for your behaviour and or a screenshot of the configuration? Cheers! DYelamos
-
Hi Sarat. I think I gotcha. Try this: import static com.atlassian.jira.issue.IssueFieldConstants.FIX_FOR_VERSIONS import static com.atlassian.jira.issue.IssueFieldConstants.RESOLUTION def resolution = getFieldById(RESOLUTION) def version = getFieldById(FIX_FOR_VERSIONS) if (resolution.getValue()?.name == "Fixed") {…
-
Suresh: We log to the atlassian main log. Regards. Dyelamos
-
Suresh, sorry for the late response, we've been a bit busy in Adaptavist this week. I've looked through our code and I can't find a particular way of setting the checkbox. Let's do this: import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.customfields.manager.OptionsManager def…
-
What version of SR are you guys running on? If your instance looks okay, don't worry about it. However, do keep this in check, or written somewhere just in case it could grow out of control. Maybe you did it the right way but there are a lot of people that basically force a reindex everytime an issue is viewed. I'm sure…
-
Hello Gil. This is weird but I've posted an answer to this question before and it hasn't appeared. As I said in my previous answer, yes, this is totally possible. You simply need to select a different template from the scripted field configuration screen: the HTML template Afterwards, just make sure that your HTML is…
-
Static field checking doesn't actually mean that it isn't going to work. I agree with Alex that this is bizarre, however I would recommend that you save the script and check that it works.
-
Suresh Is this error a static field checking? Or is it an actual exception? Cheers! DYelamos
-
You would need to use something like this:] import com.atlassian.jira.component.ComponentAccessor import com.atlassian.servicedesk.api.portal.Portal import com.atlassian.servicedesk.api.portal.PortalService def portalManager = ComponentAccessor.getOSGiComponentInstanceOfType(PortalService) Portal targetPortalResult =…
-
Hello Sergio. Yes you can do this, although I would not advise it. Having a script job searching every issue in the background can be quite load heavy for your instance. You can get the email of a user using this: def email = ComponentAccessor.getUserManager().getUserByKey("asdasd").getEmailAddress() If this helped, please…
-
Yes it is. You would use a script post function on your desired transition within your subtask. The code would do the following: Get parent of the issue of the issue like so def parentIssue = issue.getParentObject() After getting the parent, you can fetch the values of your fields and set them easily. There are multiple…
-
Roberto. If you are getting that response it can mean one of two things: 1. Your request isn't well formed. 2. your username and password are not correct. The best way you have of testing this would be to use a rest call plugin in firefox or similar, or the terminal if you are well versed and send the petition. Once and…