Hello,
We are using Query Issues Custom Fields plugin. One of the fields is Query issue multi linker custom field wich stores data in an array.
To change data in that field without user interaction we use:
def cField = customFieldManager.getCustomFieldObject(cField_ID) def tmp = new ArrayList<String>() tmp.add(issue.key) issue.setCustomFieldValue(cField, tmp) issueManager.updateIssue( currentUser.directoryUser , issue , EventDispatchOption.ISSUE_UPDATED , false);
But it updates that field value for an issue.
What we need to achive
When we call a transition_1 we have a screen with an emty Query issue multi linker custom field.
We need to push some data into that field on screen load. And that data should not instantly update an issue field, but be present on that screen only until form is submited. Any advice on how can we achieve that?
If this situation is plugin scpecific, maybe someone could help me with the sources of that plugin (maybe to achive my goal I have to import some class of that plugin?)
Hi @aleksandr_pavlovic ,
you are using scriptrunner for this, right?
I think what you want to archive, is to set an default value instead of update the issue.
Take a look at the initialisers of the behavious module from the scriptrunner plugin.
https://scriptrunner.adaptavist.com/latest/jira/recipes/behaviours/setting-default-fields.html
In my opinion the examples from the scriptrunner guys are quite good but if you need some help for the code, just let me know.
Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.
Get Certified! ✍️Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.