Comments
-
Create a behaviour configuration linked to your project and sub-task issue type. Then add a server-side script on the Completion Date field. import com.atlassian.jira.component.ComponentAccessor def dateFormat = 'dd-MMM-yyy' def dateFld = getFieldById(fieldChanged) def dateValue = dateFld.value as Date dateFld.clearError()…
-
I don't think there is any web-fragment location that you can bind a web panel to in a dialog. I think the best hack I can think of to add a webpanel-like element on a screen dialog would be to use behaviour and use setHelpText() on the last field in the screen and put your html in the helptext. You would have to override…
-
Perhaps ... I do see a slightly different styling of your Label field than mine. I'm on Jira 8.13.6 (Software+JSM)
-
There is no other way to change the mobile app that I'm aware of.
-
If you need to get the list of users from an external source... how you do that depends on the source. If the data is in LDAP you can connect to LDAP directly from a groovy script Something like @Grab(group='org.apache.directory.api', module='api-all', version='2.0.1') import org.apache.directory.ldap.client.api.* def ldap…
-
Not sure what's going on there ... it's working for me. Here I use the code exactly as is except for def A= getFieldByName("Theme") The script is put against a random text field ... if I type "123" in my text field, I get this:
-
Yes, but with some limitations. A scripted field on issue A based on status in Issue B will be calculated and added to index when A is changed or indexed. If issue B changes status, the indexed data will be stale (still have the old value) until issue A is updated/indexed again.
-
Scriptrunner behaviour will have no effect on the mobile app. I would not expect that to ever change. If you want to prevent in-line edit in the mobile app, I suspect you would need to remove the field in question from the edit screen. But then, you need a way for users to set/change it in the desired controlled way (with…
-
With scriptrunner ... if you can do something in the UI, its generally safe to assume you can do it with a script ... but that means learning the deep innards of the Jira Java API as much as any plugin developer would have to learn. You will find many examples in this forum. For example:…
-
Scriptrunner comes pre-loaded with some libraries that make doing rest request easier than what you're trying. You can see their examples here: https://library.adaptavist.com/entity/using-external-apis-in-sr?_ga=2.145965245.826574474.1620181182-1635025387.1620181182 I haven't played with the RestClient class myself, I…
-
I don't think the Insight REST API has an equivalent to the "fields" filter that the Jira Issue API offers to only include the attributes you can about. https://insight-javadoc.riada.io/insight-javadoc-8.6/insight-rest/# You must either call the /object/{id} to get all the objects details, call /object/{id}/attributes to…
-
Yes, generally the instructions for adjusting the issue types using scriptrunner behaviour are here: in https://docs.adaptavist.com/sr4js/latest/features/behaviours/behaviours-examples/restricting-issue-types But we can simplify the example and wrap the logic in a block to check that the Epic Link field is populated.…
-
Bringing in the response I posted in slack... Scripted field don't store anything in the database. The script is executed every time the data is accessed and the render template is applied just for the html display. The searcher is used when the issue is indexed to determine the format to put in the lucene index and…
-
It really depends on what you are using to make that REST API. What library/method are you using?
-
I don't use MS Teams ... but I don't think you can open the Teams desktop app. I found this: https://microsoftteams.uservoice.com/forums/555103-public/suggestions/34501303-open-links-to-teams-in-desktop-app But with the webitem fragment ... if you want to point to some website with the user's email address, you can add…
-
I don't think there is a web module associated with a single field. What is your end goal? Maybe we can help you achieve that.
-
Hi @Michael Cederström In case you were not aware, this is a community-supported forum. This means that most people the provide answers here are just other users like you willing to help each other. There are some Atlassian staff that also provide some help, but there is no guarantee that they'll see the question This…
-
I think you'll have better luck getting an answer if you rephrase a little bit. I can't understand what you're asking. Maybe include a picture?
-
Try it like this: def debugMsgs = [] def thisField = getFieldById(getFieldChanged()) def A= getFieldByName("A") debugMsgs << "A= $A" debugMsgs << "thisField = $thisField" debugMsgs << "thisField.value = $thisField.value" def valueMap = ['123':'568'] if (valueMap.containsKey(thisField.value)) { debugMsgs << "thisField.value…
-
I'm guessing this was posted in CLOUD in error (I don't think these methods are accessible in cloud) and the correct post is https://community.atlassian.com/t5/Jira-Software-questions/Api-method-getAssociatedIssueTypes-returning-null-objects/qaq-p/1682398
-
When in doubt ... throw some debug message. With behaviour, I like to use the setHelpText() for immediate visual feedback def debugMsgs = [] def thisField = getFieldById(getFieldChanged()) def A= getFieldByName("A") debugMsgs << "A= $A" debugMsgs << "thisField = $thisField" debugMsgs << "thisField.value = $thisField.value"…
-
There seem to be some methods in the FieldConfigScheme that no longer work ... but I get get the desired results from the manager: import com.atlassian.jira.component.ComponentAccessor def issueTypeSchemeManager = ComponentAccessor.getIssueTypeSchemeManager() def projectKey = 'JSP' def project =…
-
Then my guess is that if Created Date is a Thursday then the target date must be the next Monday? If so, that's how I would do it: def today = new Date() def minDate = today.clearTime() +2 if(today.day in [4,5,6]){ //on thursday, friday or saturday add 2 days to account for the weekend minDate = minDate+2 }…
-
Sure... simple enough... User a simple scripted validator with this script: def today = new Date() today.day != 5 || cfValues['Target Date'] > today.clearTime() + 4 This will be true if either: * today is not a Friday * the target date is later than 00:00am on the 4th day after today When the validator is true, the…
-
I recommend https://regex101.com/ to test and validate your regex. Then double-test in the scriptrunner console with something like this with different "val" input until you are satisfied the logic works. def val = '100.00' if (!val.matches(/\$[0-9]*\.[0-9]{2}/)) { "Amount must be in dollar format." } else { "good" }
-
Your regex is both incomplete and with bad syntax \$[0-9].[0-9]{2}) ^ ^ | | This means any | character | | Where tis the corresponding open parens? Also, it's best to use slashy strings for regular expressions in groovy to avoid the need for certain double escaping Try like this: if (!val.matches(/\$[0-9]*\.[0-9]{2}/)) {…
-
Just use the built-in label template builder. Create a template the size of a full page of paper and print that.
-
It really depends on what you need and how your data is organized. Insight has some built-in reporting features (though I haven't explored them much) and some REST APIs. And if you know what you are doing or are adventurous, you could fetch data directly from the db (though that is not generally recommended). Some of the…
-
Is your automation running as a specific user? If so, then you could use the event.getUser() to check to see if the event was executed by the Automation user or not. If your automation is always running as "current user" and that can't be changed, you need to somehow cause the 2 events to be separated in time from each…
-
I'm not sure what to try next. Are you sure your DB is compatible with the newer version of jira? Do you have the correct .jar file for the dbengine you are using? For example, jira doesn't ship with a mysql driver. You have to install that in <jira-install>/lib