Comments
-
Glad we were able to help Eugenio. Kristian
-
Hi Eugenio, I attach an example of the code below which shows how to take the value of a Date Field from a parent issue and display it in a Date/Time type script field on the sub task. The code for this is shown below. Code: // Required Importsimport com.atlassian.jira.component.ComponentAccessor;// Get the field and its…
-
Hi Andrian, This requirement can be used using the Script Fields functionality provided by the ScriptRunner Plugin. The way to do this is to set a new Script Field called Last Comment Added and configure its searcher type to be Date Time Range Picker and ensure this field is set to appear on issues for all projects and…
-
Script variables are stored in memory when the script is run for the lifetime of the script. You cannot write out to the log file. If you know the value you are searching for then you create a seperate variable with this value in.
-
In my example code below the value variable has the option value stored and can be used again later in on in the script. If you get the option values how I have below the they will be stored in variables that can be used later.
-
Hi Pierre, I have enclosed some code below which shows how to set an option for a Multi Select field that was wrote on JIRA 6.4.12 and Script Runner 4.1.3. The code gets the Client select list field and finds the XX option in it before applying it to the issue. The post function for this code should always be place first…
-
Hi Craig, Please see the Configuring File Attachments documentation by Atlassian for steps on how to increase the maximum attachment size. Note - This requires system administration access to JIRA to make these changes. I hope this helps. Kristian
-
HI Jens, Glad I was able to help. If this answer is useful could you please accept it so that others can easily find it as a validated answer in future. Thanks Kristian
-
Hi Jens, By default all attachments in Confluence are stored in the <confluence-home/attatchments. The Atlassian documentation here outlines how you can see in your instance what the configured attachment file store path is. This should tell you the directory that needs more space adding to it or files removing from. I…
-
Hi Mel, As per the official Atlassian FAQ here you need to purchase a licence for the number of users you have in JIRA. A quote from the FAQ to state this is shown below. "Purchase the license tier that matches the number of users you have licensed for your host application. For example, if you have a 25-user JIRA…
-
Hi Michael, The Atlassian documentation on Configuring the Confluence sidebar may be of help to you. I hope this helps. Thanks Kristian
-
Glad I was able to help. Kristian
-
Hi Clem, I have attached below a sample script which can be added as a behaviour on the resolution field in order to only display certain resolutions to users who are in a specific group. import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.sal.api.user.UserManagerimport static…
-
Hi Hyenoh, You may find the built in Create Sub Task post functioned described at https://scriptrunner.adaptavist.com/latest/jira/builtin-scripts.html#_create_a_sub_task is a useful solution for your requirement above. Here you could place multiple instances of the Create Sub Task post function on the create transition of…
-
Hi Robert, Apologies for calling you the wrong name, I got my names muddled up with another message that i was sending. As for checking the values returned by cfvalues, you may bale to do this by including some log.debug statements in your condition otherwise you may find the documentation here helpful which talks about…
-
Hi Robert, As your issue is with a field provided by the third party Database Values plugin then you will need to contact the Vendor of this plugin via a support request to see how they recommend to access the values for the field. The examples above show how you can validate that the select list has a specific value or is…
-
Hi Robert, Looking at your Youtube video and it looks as if the Customer field is a single select list field. To validate that a single select list field matches a value using ScriptRunner then you should use a syntax similar to below. This syntax could be applied to a Simple Scripted Validator to display an error to the…
-
Hi Chris, Could you please attach a code the code for this groovy script to this ticket along with some screenshots of where and how you have configured the script to run so that we can look to replicate this issue and look to find a solution. Also could you please tell us what version of JIRA you are running this code in.…
-
Hi Chris, Have you considered using a Post Function to update the value of the Story Type field. Validators are designed to check the input of a field on a transition is valid rather than update the value of a field. Kristian
-
Hi Florent, Unfortunately the last log file is full of user misisng from project role errors which looks like it causing behaviours to fail on permission checks. Can you please and check and confirm that all of these projects roles exist and if not create them as we are not seeing any further errors in the logs due to…
-
Hi Florent, Can you please confirm if the User is now added to all project roles? Also can you confirm that if this is the case that the behaviours are now taking 4 seconds to run? I am seeing from your last log file lots of errors saying user test_mcc(test_mcc) must be in role XXX. Can you please try adding all users to…
-
Hi Florent, Could you please try fixing the errors flagged up by the Integrity Checker. Also i notice in the log that your are getting lots of user admin(admin) must be in role errors which is causing behaviours to execute lots of permission checks. Can you please review the log and ensure the user is added to each role…
-
Hi Florent, Could you please advise if you have tried restarting the server following the upgrade and if not please perform a restart to see if this resolves the issue. Also you could you please perform the following actions for me so we can help you to diagnose the cause of this error. * Restart the JIRA Server * Perform…
-
Hi Mark, I am glad I was able to help. Thanks Kristian
-
Hi Mark, You may consider looking at formatting the value returned using Java Simple Date Format. I have an example of how to format the date value returned by a scripted field here. I hope this helps. Thanks Kristian
-
Hi Mel, I recently answered a similar question here on how to report on user properties inside of JIRA using Script Runner which may be of interest to yourslef. I hope this helps. Kristian
-
Hi Chris, You should format the date needed using Java Simple Date Format. I have an example of how this can be done in the following answer: https://answers.atlassian.com/questions/37044719. I hope this helps. Kristian
-
Hi DF, If you want to use my script then you can get the value of your SLA Date field which you could do by chaning the following line of: Date dueDate = issue.getDueDate() to be def dueDate = getCustomFieldValue("SLA Date") as Date providing the SLA Date Field is a date picker field in JIRA. dueDate i just a variable for…
-
Hi DF, I have done a similar thing in the past where I have created a scripted field called SLA Breach which calculates the number of days that have passed since the Due Date of an issue in order to show how much the SLA has been breached by. This uses the TimeDuration in Groovy to work out how many days and hours overdue…
-
Hi Mel, I was glad that I was able to help. Kristian