Comments
-
So, when you copy the JQL project = AHS and created > StartOfWeek('1d') To your issue navigator, you get some issues? Here is what it looks like in my environment (i only added a filter to only get a few sample projects): If that's not working for you, then there is something different about your environment. Are you sure…
-
Try to add log.info "createdJql=$createdJql" log.info "resolvedJql=$resolvedJql" log.info "unresolvedJql=$unresolvedJql" Then grab some examples JQL generated and try them in your issue navigator to see how it might differ. Also, make sure that the user specified in "adminUser" has browse permission for those projects. Or…
-
Sorry.. typo again. log.setLevel(Level.INFO)
-
I'm only using the console as a means of doing a proof of concept. You asked for sample scripts and references. I gave you a sample script that can read a table from a confluence page. You will have to do some work on your side to understand what the script is doing and modify it according to your business case. and…
-
Seeing your table screenshot, I replicated your table. Viewing the storage format of that page would still be helpful in cases there is other xml that might interfere with the jsoup parsing. Here is what happen on my instance after I re-created a page that looks like yours: Here is a successful result And here is a failure…
-
You know you don't have to wait for emails to test this. Just paste the code in the console and replace everything from line 48 to the end (the part starting withMailServerManager) with "writer.toString()" This will output the table right there on the page for you to review. Then, play around with the code until you get…
-
Can you share a sample of what your page/table looks like in its storage format?
-
So as it turns out, enabling the dialog2 functionality in Refined is all on our end. And it's not all that hard Here is a sample javascript that you can post via "install web resource" fragment in the context "refined.customer-portal": //load the dialog functionality…
-
Here is a sample script that should get you started in the correct direction: import groovy.json.JsonSlurper import com.atlassian.jira.applinks.JiraApplicationLinkService import com.atlassian.applinks.api.application.confluence.ConfluenceApplicationType import com.atlassian.jira.component.ComponentAccessor import…
-
Try this version: import com.atlassian.jira.bc.issue.search.SearchService import com.atlassian.jira.component.ComponentAccessor import com.atlassian.mail.Email import com.atlassian.mail.MailFactory import com.atlassian.mail.queue.SingleMailQueueItem import com.atlassian.mail.server.MailServerManager import…
-
Another typo... line 21 or so Instead of tr "Unresolved" It should be td "Unresolved"
-
Try builder.table (style:"border-style:solid;border-width:thin"){ Notice the word "style" is not in quotes. Only the style value. There was obviously a typo on my part in the original response (I'll update it)
-
You don't need to manually create the change history. Instead of using CustomField.updateValue() method, use either IssueManager.updateIssue() or IssueService.update() methods. Either of them will take care of history tab. The seconf option will also take care of the re-indexing. Try something like this: import…
-
Ah yes, I see the error on my side too. Try to replace def writer = StringWriter with def writer = new StringWriter() And yes, you need import groovy.xml.MarkupBuilder
-
Ah, ok, I haven't experienced this particular issue. But just remove that line. It's not needed for execution. It's just there to tell an external IDE or the Script Editor static type checking what to expect. You might see errors in the Script Editor (if you store your script as a file). But it will be fine in the Scripted…
-
I think you'll find that you're not likely to find a lot of people willing to suggest how you might go about inserting these attributes via a SQL statement. There are connecting tables that might need other rows inserted and unique ids generated. I would recommend the following instead: * Exporting those usernames (include…
-
Hi @[deleted] It looks to me that this script includes a combination of Behaviour and Scripted field aspects. This line has no purpose in a Scripted Field: import com.onresolve.jira.groovy.user.FieldBehaviours And it only works in Behaviour. But other aspects of the script look like Customer Scripted Field to me. However,…
-
Hi @Shah Baloch I just whipped this together ... obviously untested (I have >1000 projects in my instance, I would not want to run this). But here is a starting point on how you might achieve this with a script: import com.atlassian.jira.bc.issue.search.SearchService import com.atlassian.jira.component.ComponentAccessor…
-
Your error is with String myVariableValue = ( String ) TeleportField .getValue() In my experience, it's never a good idea to perform this sort of type conversion in groovy. A multi-select field should typically return an array. If you convert that to strings, it becomes complex to process it. Let groovy do the work for…
-
Sorry gents, I do not expect to move to Cloud any time soon.
-
One would need access to the scriptrunner sourcecode. The .jar file includes a class you can attempt to decompile, but it won't make much sense. It could very well be that under the covers, both the jira default functionality as well as the scriptrunner BulkFixResolution both use the issue.store() method. But even looking…
-
FYI, you don't need the indexing block (last 4 lines) and corresponding imports if you are not updating the resolutionDate and storing the value. The issueService.update() method will take care of indexing the changes presented in the issueInputParameter (iip)
-
It looks like the only way to set this value is with an internal method that has some very strongly worded warning against using it But if you want to disregard those warnings: import com.atlassian.jira.util.ImportUtils import com.atlassian.jira.issue.index.IssueIndexingService import…
-
Hi @Timothy Ryner I'm on server. I'm careful to check which questions I can safely answer or note based on the environment type since I don't have much experience with cloud. The first 2 lines would not be possible at all on cloud. There is no access to any com.atlassian classes. It's normal to see some red like this in…
-
I don't think the automation supports placeholders. That only works in IQL. You would need to create a groovy script to update/set the attribute Here is an example from the documentation: https://confluence.atlassian.com/insightapps/automation-1085180924.html Here is a version of the sample script adapted for your use case…
-
First, let me warn you that it's a BAAAD idea to attempt to perform a transaction (updating a field) on a scripted field script. See, the script for your field is executed every time an issue is accessed. Every time a user refreshes a page. Every time the issue is returned in a REST api call. Every time the issue is…
-
Please read-up on the behaviour limitations: https://docs.adaptavist.com/sr4js/latest/features/behaviours/behaviour-limitations#id-.BehaviourLimitationsv6.19.0-Screens You can't hide a field from the view screen. And while the field may appear editable, usually, if behaviour is working correctly, when you click on the…
-
FieldScreenManager is for creating system/project configuration objects that will apply to everyone that use a project. You can't do this on the fly based on user selection. Tabs are static containers to organize custom fields. If you have multiple tabs with different collections of custom fields in each tabs, then you can…
-
You should find all information about authenticating to Server/Data center here: https://developer.atlassian.com/server/jira/platform/security-overview/ This will be true regardless of whether you are accessing Jira or Insight api. If you are configured for using SAML either using DC or server with third party plugin,…
-
There is nothing functionally wrong with your code. Where did you put it? Showing/Hiding a field based on the current user is probably best done from the Initialiser. Here is a simplified version: import com.atlassian.jira.component.ComponentAccessor def groupManager = ComponentAccessor.groupManager def currentUser =…