Comments
-
Hi Nick, Thank you for confirming that you have resolved your issue. I can also confirm that I have come up with an alternative way to validate than an issue has at least one linked issue which is shown here and wanted to share this with you as well as a reference. Regards, Kristian
-
Hi Ricardo, I can see from the line of "${customField.key}":[value: "${lastComment}"] as Map in your code that you passing the value as a map to the field and the error expects you should be passing the value as a String. Also, you may need to convert the value you have extracted from the comment field and into a…
-
Hi Ricardo, Thank you for your response. Can I please clarify when you are trying to put the value on an issue what type of field are you trying to put in so that I can recommend a way of doing this? I.E are you trying to set the Time to resolution field itself or would you want to put the value extracted from this field…
-
Hi Nick, Thank you for your question. I can confirm that we have created the Knowledge Base article located here which explains how Script Validators work inside of ScriptRunner for Jira Cloud. You will see in the Knowledgebase articlle that it shows that validators are defined using the Jira Expression Framework as…
-
Hi Ricardo, Thank you for your response. I can confirm this error means that the syntax of your rest call to set the field is incorrect as you not passing the data to be set in the structure that the rest API expects as it expects a string to be returned. So that we can advise further on this can you please provide us with…
-
Hi Ricardo, Thank you for your question. I can confirm that the Time to resolution SLA is stored as a custom field on an issue which means that it is possible to get its value inside of a post function with ScriptRunner for Jira Cloud. Your post-function script will need to make a call to the Issue rest API which Atlassian…
-
Hi Ricardo, Thank you for your question. I can confirm from your response that you are getting that the error indicates that ScriptRunner for Jira Cloud cannot set the custom field with the ID of customfield_10943 as it is not on the create and edit screens for the project. By default, the plugin can only set fields which…
-
Hi Dale, Thank you for your question. I can confirm that the developers are aware of an issue which is causing this behaviour and I can confirm that they are currently working with Atlassian in order to try to get this issue fixed as soon as possible. If you have any further questions on this issue then we would ask you to…
-
Hi Leonard, Thank you for your suggestion. I can confirm that the linked post above will only work on Jira Server as Jira Cloud does permit injecting JavaScript as Atlassian restricts this in Jira Cloud. This means that Script Fragments are limited in ScriptRunner for Jira Cloud and in Jira Cloud work in their own Iframe…
-
Hi Pooja, Thank you for your question. I can confirm that the ScriptRunner for JIRA Cloud plugin is unable to perform any dynamic validation on issue forms to link or hide fields like the server version can with the Behaviors feature. Also, I can confirm that the plugin cannot dynamically populate field values or options…
-
Hi Benjamin, Thank you for your response. I can confirm that in my previous response I meant no it is not possible to have transition only fields with ScriptRunner for Jira Cloud. I can also confirm that what I meant about how to configure the post function was that this is where I would place the post function to ensure…
-
Hi Benjamin, Thank you for your question. I can confirm that it is not possible to have transition only fields with ScriptRunner for Jira Cloud, due to the fact that Jira Cloud does not support this and requires all fields to exist on a screen and have their values stored on an issue. This means that to get input during a…
-
Hi Alexandra, I can confirm that the code samples provided above will not work with ScriptRunner for Jira Clouddue to the fact the code you have provided is for ScriptRunner for Jira Server and this will not work as Atlassian only provide a rest API in Jira Cloud and do not provide a Java API in the cloud-like they do in…
-
Hi Manoj, Thank you for your response. I can confirm that if you are using the built-in Create Subtask post function provided by ScriptRunner for Jira Cloud that you can add some code in the Additional Code Box to set the assignee. This code will get the accountId value off the user picker field on the parent issue and…
-
Hi Vando, Thank you for your response. I can confirm in this case you can just check if the status of the parent issue changed in the change history and if it did then you can run some code to transition the sub-tasks. Regards, Kristian
-
Hi Vando Eduardo de Brito Goncalves, Thank you for your question. I can confirm that it is possible to achieve your requirement using ScriptRunner for Jira Cloud and can confirm that to achieve this that you would need to create a Script Listener which is configured on the Issue Updated event. The script listener would…
-
Hi Manoj, I can confirm to set the assignee that you would need to write some code to extract the value from the user field and to save this to a variable in your script. Your script would then need to make a put request to the issue API to update the issue and to the assignee to the value, you saved in your variable. I…
-
Hi Manoj.abraham, I can confirm that it is not possible to pop up a dialogue form which can be used to select the assignee when creating a subtask with ScriptRunner for Jira Cloud. The reason for this is due to the fact that Atlassian does not provide the same Java API in Jira Cloud that they do in Jira Server and that…
-
Hi Angela, Thank you for your question. I can confirm that the Enhanced Search for Jira Cloud plugin contains the subtasksOf() search function that you can use to query subtasks related to an issue. The documentation page located here explains how this works in more detail and may be useful to help you to achieve your…
-
Hi, a.borger, Thank you for your question. I can confirm that the reason that you are getting the error above is due to the fact that the structure of your rest call is not valid for ScriptRunner for Jira Cloud. I can confirm that we have an example script which shows how to Update an Issue inside of the documentation page…
-
Hi Daniel, Thank you for your response. I can confirm the listener shown in your attached screenshot is only configured to fire on the CC status changed to INV event which means any workflow in your instance configured to fire the event will trigger this listiner. Can I ask if you completetly delete the listener does the…
-
Hi Dachi, Thank you for your question. I can confirm that ScriptRunner for Jira Cloud does not have any built-in functionality to auto get the ID of a page which means you will need to make a call to the Confluence Cloud Rest API in your script which is documented here in order to get the ID for the page you require. You…
-
Hi Yellisetty, I can confirm that to specify the storage format over multiple lines you need to define a multi-line string which in Groovy is defined by using three speech marks such as """ as described in the page located here. I can confirm we have an example of this in the documentation example located here which you…
-
Hi Ash, I do not have an exact example that I can share with yourself that uses a specific template and updates the Jira Issue filter/ macro on a page as you require. However, I can confirm that the example snippet that I shared yesterday which is located here shows an example of how to create a Confluence page. I can…
-
Hi Ash, Thank you for your question. I have reviewed the error attached in the screenshot above and can confirm that it indicates that the user who is logged into Jira Cloud when the script was not run does not have a user account in Confluence Cloud with permissions to create pages. I can confirm that the Libray script…
-
Hi Suresh, Thank you for your question. I can confirm that each put rest API call your script will add a separate record into the issue change history and that this is how Jira Cloud is designed to work. Currently, as you are making your put requests based on If/else statements then it will not be possible to have one…
-
Hi Daniel, So that I can try to help yourself diagnose the cause of this further can I please ask if you can provide a screenshot of how the listener has been configured as without seeing this it is hard for me to understand what is configured in your instance. Also, can I ask if you have checked your *atlassian-jira.log*…
-
Hi Daniel, Thank you for your response. It sounds like there is some other configuration the that is adding the two watchers when it is manually triggered such as a post function and I would advise reviewing your workflow to identify what could be causing this behaviour. Regards, Kristian
-
Hi Davey, Thank you for your response. I can confirm that the link I sent you for the Store the Number of Subtasks in the Parent was because lines 1 to 3 of that script show how to check if the current issue type matches a specific issue type. In this example, it is checking if it is not a subtask but you will be able to…
-
Hi Davey, Thank you for your question. I can confirm that to achieve your requirement with ScriptRunner for Jira Cloud of setting a custom field when an issue is created based on its issue type that you would need to create a Script Listener which is configured to fire on the Issue Created event. The script for your…