Comments
-
If you can't provide the flexibilities of what the current PDF exporter offers with HTML (most of what @Bruce Michelsen described), please don't force this to us. We have production implementations for current PDF exporter. Perhaps, you can provide a clarity on if the current PDF exporter will remain in future.
-
Hi @Tricia Wegner, It is important to make sure you have a good overview of your DC instance's 3rd party app usage. As James pointed out, ScriptRunner can be a crucial part of your migration to Cloud. I am from the customer success team for ScriptRunner. If your organization is indeed a user of ScriptRunner, we've built…
-
Hi @Anca Cristescu, I cannot reproduce this problem, your Behaviour script works fine as initialiser in my local instance, Jira 9.12.1 and ScriptRunner 8.34.0. The script filters versions just fine. I can select versions after 3rd options in the list. I can select more than 3 options. Please consider raising this to The…
-
Hi @ALARY Yann, the payload is a list of new options, like: def payload = [ options: [ [ value: 'newOptionA', ], [ value: 'newOptionB', ], ] ] You also do not actually need `disabled: false,`. So, even you are just adding one new option, you still need brackets to enclose the new option: def payload = [ options: [ […
-
The main difference is that, for dynamically add reviewers listener, the "configuration script" field allows you to script more complicated logics on adding the reviewers. For example, you might want a reviewer from same time zone as mandatory, reviewers from different time zones as normal reviewers. For time zone use…
-
Hi @Angel, I can confirm that `issue.parent` on create screen only works for subtasks. This is documented in Jira Expressions types. I reproduce the problem and it works when I create a subtask. So, it doesn't work for other issues under Plans hierarchy. You might want to raise this with Atlassian to add support.
-
The “Require commits to be associated with a valid Jira issue” built-in pre-hook actually works as expected. As the name of the pre-hook suggests, the pre-hook validation is based on commits. A push is allowed even the branch name doesn’t contain issue key as long as the commits contain a valid one. I can confirm that an…
-
The problem is that, since you are retrieving a value from an Insight field, you are getting an insight key, instead of an issue key. So, you need to replace: final issueKey = getFieldById("customfield_38711") def issue = issueManager.getIssueByCurrentKey(issueKey.getValue() as String) with something like: import…
-
I didn't see that you just need for a single parent issue type. You can use: issue.parentObject?.status.name != "Done" || issue.parentObject?.issueType.name != "Story"
-
The easiest way to achieve that is to use Simple Scripted Validator on Create transition for the sub task issue type(s) with following snippet: issue.parentObject?.status.name != "Done" An error message will be displayed only when the user click on the create button:
-
Hi Mark, The library script that uses ContentService does work. When I tested it previously, I passed: contentService.streamFile(repository, branchRefId, filePath) So, it only retrieve the current content. With the new library script, filePaths[filePath] returns the commit id. So, it will retrieve the pushed content. Sorry…
-
Interesting. It is different to SR4J. I have tested following snippet in ScriptRunner > Console, you can use Bitbucket's Java API to set the level like so: import com.atlassian.sal.api.component.ComponentLocator import com.atlassian.bitbucket.log.LoggingService def loggingService =…
-
I think, as I have tested previously, ContentService only read the current content of the file, instead of the new changes being pushed. So, you can use CompareService for checking the changes (diff's). Following snippet will also work for newly added file: import com.atlassian.sal.api.component.ComponentLocatorimport…
-
Yes, you certainly can. You would need ScriptRunner in your Jira instance. There are two ways to do it. Basically you make a POST call using the following Rest API to create a branch in a workflow post function from Jira to BitBucket: /rest/branch-utils/1.0/projects/{projectKey}/repos/{repositorySlug}/branches With App…
-
Yes, you certainly can. You would need ScriptRunner in your Jira instance. There are two ways to do it. Basically you make a POST call using the following Rest API to create a branch in a workflow post function from Jira to BitBucket: /rest/branch-utils/1.0/projects/{projectKey}/repos/{repositorySlug}/branches With App…
-
I not sure if I understand your condition. To apply only on consecutive items, I think you have to use a for loop to achieve that. Perhaps, the toUnqiue(closure) or toUnique(comparator) methods could achieve this too.
-
The script should work fine. The steps to reproduce is as followed: 1. You should have a custom select list field named "Favourite Fruit", with some options including "Other". Another custom text field named "Favourite Fruit (Other)". 2. Both fields are configured to show on the screens. You use Behaviour to hide them as…
-
This is a use case of ScriptRunner's Behaviour. It field return a Priority object. 1. Navigate: ScriptRunner > Behaviour > create and edit your Behaviour > add "Priority" field. 2. Add following server-side script: def currentPriority = getFieldById(getFieldChanged()).getValue().name if (currentPriority == "Hightest" ||…
-
Are you saying you only want values with "in Development" in "fromString" and "toString" keys? You can do this: changeHistoryManager.getChangeItemsForField(issue, "status").collect { [ "fromString": it.fromString, "toString": it.toString ] }.findAll {it.fromString == "In Development" || it.toString == "In Development"}
-
The listener should work. Have you test it? You still need to make appropriate modifications.
-
You can use following snippet to return a List<Map>: changeHistoryManager.getChangeItemsForField(issue, "status").collect { [ "fromString": it.fromString, "toString": it.toString ] }
-
Can you confirm that the Due Date is a custom field, not the system field? This should be done via a listener on Issue Created event and Issue Updated event. The script logic is a little different because you want to only set the Due Date custom field when the Feature issue update.: import…
-
I assumes you want to set Story's due date after Story issue creation via a post-function and the link to feature is selected in creation. As an example, I am creating an issue with a link "causes" to another Isuue. The issue link type name is "Problem/Incident". After creation, newly created issue should have the same…
-
ah, the snippet can be actually further simplified: def selectField = getFieldByName("Your Select Field Name") if (underlyingIssue && selectField.getValue()) { if (selectField.getValue() != "changeApp") { selectField.setFieldOptions(["error", "customization"]) } }
-
Unfortunately, from Deviniti documentation, Dynamic Forms for Jira is not compatible with ScriptRunner's Behaviour, you can log your request to ScriptRunner support portal. The more requests, the likely the Product Manager will work on this matter. Anyway, for other users, Behaviour is the best choice in this use case. If…
-
This can be achieved with Scripted Fields, instead of Script Listeners. There is no such event for listener to listen on. To do that, navigate ScriptRunner > Scripted Fields: 1. Make appropriate configurations. 2. Under Field Type, choose "Text field". 3. Under Script to execute, use following snippet: def projectKey =…
-
I can confirm the Rest API you used is correct. Perhaps, you want to programmatically retrieve the account id with email like so: def newLead = get("/rest/api/3/user/search") .header('Content-Type', 'application/json') .queryString("query", "xxx@example.com") .asObject(List) .body .first() as Map def result =…
-
I have modified the script to account for the situation where estimate in subtask changes: def hasEstimateChanged = changelog.items.any {(it as Map).field == "timeoriginalestimate"} def issueFields = get('/rest/api/2/issue/' + issue.key) .header('Content-Type', 'application/json') .asObject(Map) .body .fields def…
-
You can just replace: def customFieldValue = (issue.fields[customFieldId] as Map)?.value with: def customFieldValue = issue.fields[customFieldId] It might due to old API. I am not sure. I have tested my snippet, it works. The reason for defining those variables so that user don't have to look for the custom field id, you…
-
As an example, I use a Listener on Issue Updated event. 1. Navigate ScriptRunner > Script Listeners > Make appropriate configurations. 2. Choose to listen on "Issue Updated" event. 3. Under "Code to run", use following script: def hasEstimateChanged = changelog.items.any {(it as Map).field == "timeoriginalestimate"} def…