Comments
-
Anyone still encountering this, you may want to vote on: https://jira.atlassian.com/browse/JSDSERVER-6342 My experience is that JSM approvals ignore all Conditions and Validators.
-
I'm not sure what you looking up with SQL but if you have to query a DB, I'd recommend setting up your DB in the Resources tab of Scriptrunner then using the DatabaseUtil.withSql() method instead of coding your own access to SQL. But you are indicating that you want to apply a value to a Single Select based on the…
-
I don't think it's possible to filter the project list. This is the closest thing that I'm aware of, but it's not dynamic: https://docs.adaptavist.com/sr4js/6.24.0/features/script-fragments/built-in-fragments/create-constrained-issue?utm_source=product-help
-
I was a little worried about your question. We are currently using Insight 8.x with Jira 8.13.11/JSD 4.13.11 (server) and I was concerned that I would be locked down to this version until we upgrade to DC. But I was able to upgrade a staging environment to Jira 8.20.0/JSM 4.20.0 without issues. It showed that I was…
-
What version of Jira are you using? The link you provided is for version 7.0.0 On my version, I can see the "setArchvived" method in the MutableProjectComponent (Jira 8.13.11 API) object but I could not see that option in the 7.0.0 version. I don't recall when archiving components became possible. But presumably, if your…
-
I think AUI's select2 is based on the old Select2 version (3.5x). You will find the old doco here: https://select2.github.io/select2/ Here is an example Javascript I have that initializes a select2 with some parameters (including ajax for dynamically loading the data): AJS.\$("#select2-id").auiSelect2( { multiple:false,…
-
I don't think this is possible with Automation out of the box. You need access to Insight-automation or some groovy engine (like scriptrunner or insight groovy automation). Since Insight doesn't have a way to process edit events (like automation or scriptrunners do), you would need to somehow force this sort of edit to be…
-
I am not sure if would provide much value in the Scriptrunner context since we get logs and execution details right from the ScriptRunner UI. But I suspect that variable exists in the binding because they have to generate it to use the built-in scheduler component of Jira. I think if you added a message to the job, you…
-
According to this: https://docs.adaptavist.com/sr4jc/latest/scriptrunner-migration/feature-differences ... behaviour is not a feature of Scriptrunner for cloud yet due to limitation on what Atlassian allows plugins to do.
-
You would need to add a the same script to both you date field and your select field to be sure the rule is picked up whichever field is updated first: def dateField = getFieldByName('End of project') def conditionField = getFieldByName('Fixtermin') dateField.clearError().setRequired(false) if(conditionField.value ==…
-
In my experience, other groovy implementation outside of scriptrunner doesn't allow you to pick up custom classes built with/for scriptrunner. You will see in bitbucket, I've explained the situation a little bit in the ReadMe. In this case, you'll want to use this version of the…
-
@Dirk Ronsmans I don't officially support this code. It's shared as a starting point for the community. So I don't want to provide any official means for issues to be reported. That being said, I don't mind making small updates on the basis of what you've found. So this post is as good a place as any to report it. In this…
-
Hi @Dirk Ronsmans You are right... looks like I missed a few imports whenI copied these methods from my own implementation to the one for sharing on bitbucket. Add these 4 imports: import com.atlassian.jira.project.Project import com.atlassian.jira.exception.CreateException import…
-
Probably not from a behaviour implementation since the interactions are mostly browser-side or client-side. There are samples out there for how to copy attachments from server side implementations (e.g. in a workflow post-function)
-
The Jira API call for issue.getCustomFieldValue(CustomFieldObject) will return an array of ObjectBean. Then to access attributes of that object bean, you'll want to consult all the Insight APIs
-
The select conversion method need the JSON in very specific format. So you'll need to prepare a return object with that format. Based on what you provided, I'm expecting the vmInfo object returned by httpBuilder.request to look something like this (as you would deeclarie it in groovy) [ name:'dummy', location:"don't care",…
-
Flags are not well suited for long-running tasks. Your browser will give up before you get a response default browser timeout). Ideally, some sort of UI that provides a progress bar would be best. But that' not something that's available from scriptrunner. What you might do is send the processing of your long-running task…
-
I have a droplist box which need to be populated at the time the user open a request from the service Desk What do you mean by "doplist box needs to be populated"? * Do you want the list of values available in the droplist box to be adjusted dynamically from the API call? * Or do you want one of the pre-configured items in…
-
There are 2 options 1) Have a job that runs on a schedule to fetch the source data from Azure and add/updates the options in your select custom field. When users access the form, all the data is local to jira. The data is stored in jira as "option id" 2) create a new FREE TEXT FIELD in jira, and use the scriptrunner…
-
I like opencsv for this: Here is a simple implementation import com.opencsv.CSVReader @Grapes( @Grab(group='com.opencsv', module='opencsv', version='5.5.2') ) def reader = new CSVReader(new FileReader(new File('path to csv'))) def csvAsArrayOfMaps = reader.collect { it }.with { rows -> def header = rows.head() def dataRows…
-
Let's try to add some debug messaging in your script. import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.IssueInputParametersImpl import com.atlassian.jira.workflow.TransitionOptions def issueService = ComponentAccessor.issueService def issueLinkManager =…
-
You won't get any traction with an Atlassian feature request. This is a scriptrunner JQL functionality. You need to ask Adaptavist for this: https://productsupport.adaptavist.com/servicedesk
-
I'm not sure I understand what the purpose of doing that would be. It seems redundant to have 2 aspects of an issue mean essentially the same thing. But if you want to add/remove data from a jira issue when the issue is either created or updated, you must use a custom scripted listener. Your listener will listen for the…
-
I am not aware of a URL you can click that will cause the issue to transition automatically from the customer portal. The customer portal option to transition an issue calls a rest API with a PUT method and some payload. url: /rest/servicedesk/1/customer/requests/transition payload: {issueKey: "ISV-2", transitionId: 11,…
-
You might want to try to rephrase your question. I think some clarity was lost in the translation. But with scriptrunner, there are workLog-related events that can be listened to with a script. This script will have access to the worklog details including the issue and all its custom fields. And it can use all that data to…
-
You can get the full list of options application from a custom field by calling the Jira Java api. For example: import com.atlassian.jira.component.ComponentAccessor def cfMgr = ComponentAccessor.customFieldManager def optMgr = ComponentAccessor.optionsManager def formField = getFieldByName('Drop Down Field') def…
-
If you actually tried to execute the behavior and looked in the log file, you would see something like this: groovy.lang.MissingMethodException: No signature of method: com.atlassian.jira.project.version.DefaultVersionManager.getVersion() is applicable for argument types: (String) values: [35720] This gives more details...…
-
I"m assuming you'll need to account for all 5 possible values of probability and impact. Maybe something like this? https://cio-wiki.org/wiki/Risk_Matrix Then if will be very ugly and hard to maintain to have a bunch of if groups. This is much better: import com.atlassian.jira.component.ComponentAccessor import…
-
Without scriptrunner and a custom listener, the other possible option is to use scheduled insight automation and a flag attribute. Maybe run the automation every x minutes looking for objects using IQL that have connected tickets but don't have a special attribute populate. E.g. create a boolean attribute called "Connected…
-
Also, I'd question why you think you need to extract and duplicate this information. If you just want to easily view the information when viewing an issue, you can make sure the attribute is selected in the insight custom field as suggested by @Uday Kiran Bhaviri . If you want to be able to find issues based on an…