Comments
-
Ugly workaround for now (I have 26 fields total): 1. Export all issues with Better Excel - I get 20 fields (including Key) --> save in A.xlsx 2. Change columns, select Key + 6 fields that are missing from #1 --> save in B.xlsx --> Notes: * sort order must be the same, * Make sure you got the same # of results (meaning that…
-
OK, after digging deeper, I found the reason - the Export-->Excel (current fields) takes the columns from My Defaults instead of from Filter, as shown below. However, I did not find any way to force the export to use the Filter option. Further investigation: Using the BEPJ export, all fields are exported when the query…
-
Hey Nic, The problem is not with the custom fields but rather with system fields such as Description, Priority, etc. As I said, in the issue navigator I see all fields that I marked; the export omits some. To your question, I did not check all fields, but those that I did have the default searchers.
-
You need to change the field text renderer to Wiki Style Renderer and then it works. You do that in the field configuration.
-
I can always set the field value with def newValue = "{color:red}" + oldFieldValue + "{color}" customFieldObj.setFormValue(newValue)
-
Found the solution: use issue.setComponent(). Here is the full working code: import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.ComponentManager import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.project.Project final String compName = "FRI Product" final issueTypes = ["FRI…
-
Thanks @Alexey Matveev If I modify the field in a Behaviour, it might trigger the Behaviour again and then will go into an infinite loop...is that what you mean?
-
The plugin above does not do what I need... The solution I see is to add a ScriptRunner Behaviour on the field and whenever it changes, add the color coding around it. A really ugly solution...
-
Thanks!
-
Unfortunately, since Atlassian does not provide this feature, you cannot avoid using an add-on. I did this by: * Defined a new custom field [ called Assignee (display-only) ], of type User Picker * Added field to relevant screens * Added a ScriptRunner Script Listener on the issue assigned event. The script sets the value…
-
Thanks Moses, but this is an old post (2013) and it doesn't work for me. I modified my code to use this: import com.atlassian.jira.ComponentManager ComponentManager componentManager = ComponentManager.getInstance() def component =…
-
Here's a reference post: https://community.atlassian.com/t5/Answers-Developer-Questions/Post-function-groovy-search-summary-and-according-to-keywords/qaq-p/502061 Which I based my code on. But I suspect that the Jira API has changed and projectComponent and component are not the same now. I'm using Jira 7.4.1
-
IIRC, my problem was that some validators were failing and thus the behaviour was not invoked. The way to debug is twofold: 1. Add logging (using com.onresolve.scriptrunner.runner.util.UserMessageUtil). Be aware that there may be some delay until the log messages are displayed 2. Open the browser's inspect, go to…
-
It's a nice hack, but IMO, putting executable code in a text field is really a bad idea, reminds me of SQL injection :-(.
-
I've just noticed that the example that I used from the Script Listeners console (Assignee Changed) is tagged as Workflow functions only. I assume that's the reason why my code does not work as a condition for a stand-alone listener. I am now using Roland's answer above and it works.
-
Hi, can anyone share such a listener?
-
@Daniel Brown Thanks, works great!
-
Great! will check it later
-
I am trying this (from the KB) and the JQL rejects the field "Request Type". Anyone? I'm using Jira 7.4.1 & Service Desk 3.6.1.
-
@Alexey Matveev Just to clarify, in my case, the function does not return anything, but questions 3 and 4 are related to your example.
-
Thanks. Followup questions: 1. What import do I need to add to get the CustomField type? 2. Can the function be placed anywhere in the script? Best practice (e.g. in Python) would be to put it in the beginning, right after all the import statements, right? 3. Is the ';' in the return really needed? 4. Is it not better to…
-
Joshua Yamdogo @ Adaptavist Being a community champion, please do something about the bug - it's been open for 2 months with no assignee and no response from Adaptavist
-
Apparently, something changed in ScriptRunner 5.3.7 and later - the hashMap trick no longer work. Here is what works for me (found it here: LINK) Map cfValue_acct = issue.getCustomFieldValue(cf_acct) as Map if (cfValue_acct) { String acct_acct_name = cfValue_acct.get(null) // get 1st value String acct_saas_region =…
-
The error reported above is now happening to me as well, after my ScriptRunner version was updated to 5.3.7. I assume it worked before on an older version that I was using. If anyone from Adaptavist is watching this thread, please respond.
-
The code works for me. Maybe you're using an older versions? I'm using ScriptRunner 5.3.7 on Jira 7.4.1
-
please show the full script. Lines 9-10 are obscured
-
[Correction on your answer - I am showing/hiding one field out of fields A,B,C,D, depending on value of X] But you are correct, I already set the main field (X) to be Required and Visible. Thanks.
-
Just FYI, the above issue is marked as Fixed
-
@JamieA Sorry for my ignorance, but I miss these points: * Where do I put this groovy code? * How is it activated? * Where is the output shown/written to? Thanks
-
Note that in order to display the Priority field, it must be added to the Create screen of the issue type and then manually added into the request type fields.