Comments
-
Hi Asha. Is there any particular reason why you are sending REST request instead of using the class methods? I haven't setup this particular example but this: def severityField = get("/rest/api/2/field") .asObject(List) .body .find { (it as Map).name == 'Severity' } as Map Can be done like this: import…
-
Hi Rafal! If this is a postfunction, you need to save your change! Let's say that I want to change the assignee of an issue in a postfunction. I would use something like this: import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.event.type.EventDispatchOptionimport…
-
Hi Alvin Check this bit of code out. This would get all of the priorities with less than "2". Priorities are ordered by id. import com.atlassian.jira.component.ComponentAccessor import static com.atlassian.jira.issue.IssueFieldConstants.PRIORITY def constantsManager = ComponentAccessor.getConstantsManager() def…
-
Hi Flower. In all honesty, you are going to need to follow a programming course if you wish to achieve this. If I give you code right now, you are not going to be equipped to deal with problems when they arise. If you cannot follow the documentation that we've laid out and understand it, you need to follow something…
-
Hi Flower. You should read all of our documentation and try to get the examples working before attempting to create a custom script yourself. You need to familiarise yourself with how Atlassian do things. Leaving that to the side, this can be done with our built-in Create Subtask function, and adding your additional code…
-
So quick update from my team: First of all, we've reopened: https://productsupport.adaptavist.com/browse/SRJIRA-2282 We will be following up on ideas on how to properly do this, so if you want, login into our service desk and voice your concerns. Second of all, I was asked to make an important point. Even though you can…
-
Hi guys, I've brought this up again in my company. When I hear back from them I'll let you know. Cheers! DYelamos
-
Hi Bentley. You are absolutely right! However if I may, finding the long ID was not as easy as I hoped. Thank you so much! Dyelamos
-
Hi Tyler. I'm not saying my way is better than yours, it isn't the action that concerns me, it is the initial search and then performing your search within a very big subset. If you do it your way: 1. Collect all of the issues of every project in your instance. <- These are a lot of issues and a very general search. 2. Go…
-
Hi Tyler. In my most modest opinion(I mean that 100%), regarding this part of your post: "These consist of checking if an issue has an estimate, Checking if an issue has time allocated to it but isn't in an active sprint and different ones related to reporting like these - they all send emails if the report's condition's…
-
Hi Tyler. This is a rather dangerous concept. Selecting all of your issues within all of your projects is a very very processing heavy move, it will of course vary depending on the size of your instance, but I've seen scripts like these resulting into support tickets for Adaptavist. Could you please explain what is is…
-
What I think you are doing now is setting a REST endpoint, and within that REST endpoint, you are yet making another call to the JIRA rest api. Instead of using the rest api from within your REST endpoint, use a normal transition method via java. Like my colleague Aidan does here. I would heavily suggest using this over…
-
Thanks: Could you mark this answer as accepted so that other users know that this thread has been answered? Do say if I can help you further. Cheers DYelamos
-
Sorry let me make sure that I understand you. You want to open a rest endpoint in your instance, that in turn accepts request from an external build tool to transition issues. Is this correct? Cheers Dyelamos
-
Hi Markus. No problem. Could you please accept my answer so that other users know that this question has been solved? Cheers DYelamos
-
Hi Try this: Add this import: import groovy.json.JsonBuilder And this line before the comment that reads "API POST" def finalJSON = new JsonBuilder(jsonBody).toString()).build() That should output the JSON in the proper format. Do say if I can help you further. Cheers! DYelamos
-
Hi Chris. No problem. Would you mind marking my answer as accepted so that other users know this thread has been answered? Thanks! DYelamos
-
Hi Markus I've marked this as a duplicate of this: https://community.atlassian.com/t5/Jira-questions/JIRA-ScriptRunner-Insight-Groovy-get-Insight-custom-field-value/qaq-p/806911 Please don't double post :) Closing this thread! Cheers! DYelamos
-
Hi Markus. Currently we do not support behaviours for JIRA. I'm actually the developer assigned to this feature. You can follow the development of this issue here: https://productsupport.adaptavist.com/browse/SRJIRA-2563 Cheers! DYelamos
-
Hi Chris. So, the short answer to this would be "yes, but it might be very very hard". Long answer: Our scripted fragments allow you to insert HTML, or JS code in mostly all parts of the JIRA UI, allowing customisation. In order to do this however, you would need to plan very carefully what you want, because I am not…
-
Hi Christian. As far as I know, this is not possible yet. However, I believe there is an issue in our backlog, that I'm ashamed to say that I can't find :( If I find the issue I will post it here so that you can follow up. If you want, open a support ticket in our portal to ask for the feature. Cheers! Dyelamos
-
Hi Jee. I can help you out with this, if you are 100% sure that this is what want. To be honest, you really don't want to control issue transition through the REST API. Using a post-function, or a listener, would be a lot easier, and it's functionality that you wouldn't have to code by yourself, since we've already…
-
As Rob said in his comment, we provided him with the following workaround through our support portal. If anyone else is having issues, refer to this piece of code, but do let us know. import com.atlassian.event.api.EventPublisherimport…
-
Hi! We'd like to give you a hand fixing it. But it isn't much info to be honest. To know if your function is running or not, you can check the information of the script, there should be a "Run x times" dialog somewhere in your version. We need an screenshot of your configuration. To do this properly you will need: 1. A…
-
Hi Nati. I could, let me do some investigation in these couple of days and get back to you. Is this very urgent? I'm a bit busy with a development. If it is, I could ask someone from customer support to get to you. Cheers! DYelamos
-
Hi Nati! I am not going to contradict my hosts as you can imagine. I could have been wrong in which case I apologise. I would not know how to extract the information that you want from that event though... Cheers! DYelamos
-
Hello Nati. No, it doesn't, because that link wouldn't be an issueLink, it would be an external link. If you check the documentation, it says that it returns an IssueLink, which has objects and ids. I am actually not sure if you check for confluence links without using the issueEdit event, and that would be a bit overkill.…
-
Hi! What version of Scriptrunner are you using? What JIRA version? Cheers! Dyelamos
-
Hi Paul. Actually this might be a bit more complicated than I originally thought. I've submitted a feature request here: https://productsupport.adaptavist.com/browse/SRBITB-289 That you can follow. This seems like a reasonable request that could be done relatively soon. If you don't mind waiting sometime for us to release…
-
Hi Mani. You want this tutorial about pre-receive hooks. You want to enforce naming conventions I suppose. Do say if this helped or not. Cheers! DYelamos