Comments
-
Hello August. Yes it is, however it would add quite a bit of load to your server if I am not mistaken. Basically you would set up a script listener that triggers on Issue Commented event and on IssueCreated event. The listeners shuold parse the description in case of the IssueCreated event. And in case of the…
-
Hi Monique. Helping out a colleague today I realised that the "interceptor" triggers mostly when you copy from other answers in the community or from jira or confluence. It doesn't seem to like copying hyperlinks and codeboxes, once the text is put out and placed again manually it seems to work again. I'd be glad to demo…
-
Hi Geir. You could have a custom scripted listener that listens for UserCreated Event(this would also be part of ScriptRunner). When it is triggered, it would apply that user category. This would be better because it would only trigger when a user is created, and not when anyone creates an issue, like you have right now.…
-
Also please This: Makes it really hard to work with the app. I spend 20 minutes crafting an answer for a user, then I get this message and I need to guess where my error is, which just adds another 10 minutes of copy pasting parts of the answer. I usually get this when inserting groovy codes in brackets, but I am not…
-
Hello guys. First of all, thanks for your hard work in the community lately, it has gotten a lot better to use and you guys are doing a terrific job. However, the code box width issue is still there, and it is one of the things that influence me the most on a daily basis. Can you please fix the code width? I look at…
-
Hello Mirco. We have a few examples of this in our documentation, for example this link about validating multi selects. I would advice some preparation before trying to get actual functionality running, going through a few examples and understanding them. Cheers! Dyelamos
-
You are missing the customfield import I believe: take this: import com.atlassian.jira.issue.fields.CustomFieldCustomField cField = customFieldManager.getCustomFieldObject("customfield_25401")def cFieldValue = issue.getCustomFieldValue(cField)issue.setCustomFieldValue('customfield_25407', cFieldValue) Does that work?
-
Hello Louis. You would add a custom listener to an issue. That triggers on "Issue Commented" event. Aftewards, in the script you would check if the event is an internal or a public comment, and update the customfield accordingly. There are a lot of examples in both this community and our official documentation on how to do…
-
Hello Mirco, I believe this is due to groovy dynamic typing.I believe you need something like this: def cField = customFieldManager.getCustomFieldObject("customfield_25401")def cFieldValue = issue.getCustomFieldValue(cField as CustomField)issue.setCustomFieldValue('customfield_25407', cFieldValue) or something like this:…
-
Hello Marcus, Did you add the directory to your script roots? If not, you can find this community question in which Jamie Echlin explains how to set this up properly. If this does not help you, please let me know. Cheers Dyelamos
-
Hi Dorde. This is possible using conditional selects. I recently answered a question about this here If it doesn't help, please give me a concrete example of the fields and data that you would be using in order to carry this out and I will try to demo this. Cheers! Dyelamos
-
Hello Marcus. Recently we have seen a few issues that relate to being unable to resolve a class from an outside plugin or jar. They have been solved by placing the "@WithPlugin" diretive as the latest import on your import list. Can you try setting up your file imports like so: ...import…
-
Hi Ian. Before I go to an instance to try this out, I want to be sure I fully understand what you want to do. I understand that all of this is to be carried out in the Edit Issue Dialog. 1. You want to reset a number of fields everytime a user changes the Issue Type. 2. You want to reset some fields in case validation for…
-
Hello Randy. If I'm not mistaken, that information is kept in "linkedIssues" through the IssueLinkManager. In this post, you will find some more info about it. I'm attaching the answer from Jamie Echlin in that very post: for (IssueLink issueLink : issueLinkManager.getOutwardLinks(issue.getId())) { if…
-
Apologies: You get it like this def static projectService = ComponentAccessor.getComponent(ProjectService) I updated my answer to better reflect what you need to do.
-
Hi Maxxrdrgz. To create a project in Jira you firrst need to validate the creation of the project. Then you need to create the project using the validation results of that first step. This is how you would create a project with scriptrunner: import com.atlassian.jira.bc.project.ProjectService def static projectService =…
-
Hello Angela. Try the following: import com.atlassian.jira.component.ComponentAccessorif (getActionName() != "Create Issue") { log.debug("MY ACTION NAME IS:" + getActionName()) return } def storypoints = getFieldById("customfield_10002") int defaultVal = 1storypoints.setFormValue(defaultVal) That will insert a string in…
-
Hey Tasher, if it solved your issue, could you please kindly mark the answer as resolved? Cheers!
-
Hello Shravanakumar: The problem that you have is that create permissions are required for both creating and cloning issue, so it would not be possible to use this validator if you do not want to restrict cloning issues from that particular project. However, we have a new feature, comming up within our "Clone Issue"…
-
Hello Tasher. This is an incoming feature that is almost ready to be released, is is named "Canned Scripted Fields" and as I said, it will be out shortly as an out of the box script. However, if you are in a hurry here is a custom script, Steven Cheesley kindly helped customising the initial script so that it would work in…
-
Hello Gokaraju. You can use something like this: issue.getParentObject().getLabels() As stated in the Atlassian API documentation. If this doesn't work or you need further assitance please let us know. Cheers! Dyelamos
-
Hello Jan: In this question you will find an asnwer on how to get a comment from an Issue Object. Afterwards you can iterate to find the latest one, or find the one with the latest date. If this doesn't work for you, let us know and I'll program a 1 on 1 meeting with you to get it working. Cheers!
-
Hi Rodrigo. Validating links in transitions is a bit more complicated than the example shows. The correct example for this can be seen in the documentation, you can access the example in this link: The reason why it doesn't work is because the issue is not yet created, so issue.getId() returns null. In the example avobe…
-
Hey Tools Admin There is a bug in our backlog that closely resembles what you have stated. The team and I have been taking a look at this today. We are unable to reproduce the exact behaviour you mention, so if you would be so kind as to give us directions on how to reproduce it in this ticket we could help you further.…
-
Hello Pramukha. We have done some testing, setting up a listener like so: And we have sent a post request through the API like it explains in the official Atlassian documentation here We have been unable to reproduce the error, as far as we can see the IssueCreated event is firing correctly and it is catched by the…
-
Hello Ariel. This can be done through the scripted post-function Clones and issue and links. 1. Go to workflows. 2. Select the workflow for your project A 3. Select the transition from the status that you want to trigger your post function. For example, the "To Do" transition. 4. Go to the post functions tab. 5. Click "Add…
-
Hi Daniel. We have this issue in our backlog and it will be fixed sometime in the near future. If you want to track its progress, you can follow: https://productsupport.adaptavist.com/browse/SRJIRA-2244 If you have any other questions do not hessitate to ask. Cheers Daniel
-
If we get your full script, with screenshots that show how you set this up, that would be very useful for debbuggin purposes. If you want you can use our own platform at: https://productsupport.adaptavist.com/projects/SRJSUP/queues
-
Hi Alan. May we have your scriptrunner version number and your Jira version as well? I want to test this in your version to make sure that I can debug and see what's wrong. Cheers!
-
Hi Jesha. After giving this a try, we've found that this is not supported. We have added this new feature to our backlog. You can track its progress here: SRJIRA-2239 Cheers!