The user has run into an issue with the description of the ticket is being overwritten by the description we've tested in Scriptrunner. I've tested this out and can confirm that after modifying the description with relevant data and submitting the Request, the description is overwritten with the original pre-populated text
Hello @sunitamumbai
It sounds like your code needs an if statement. If you look a the tutorial from adaptavist you can see how they do it.
If you look at the example, the "if (!desc.formValue) is saying if there is nothing in the description then fire the code. If there is something there don't do anything.
My real issue is not the pre-population of the description field. I am able to achieve that however when the user modifies the pre-populated description(which is the expected behavior, because the user needs to add the answers) and saves the issue, the user's changes are not saved, only the pre-populated text is saved.
For example, my code can pre-populate the following question in the description.
What is the platform?
Now the user is supposed to answer this question in the following way.
What is the platform? Microsoft
now then the user saves this issue, it doesn't save the answer it only saves the text which was pre-populated, i.e. 'What is the platform?'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Where are you firing the script in the behaviour? Directly on the description field or are you using a script initialiser? Try using the initialiser if you aren't already.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @sunitamumbai
And what is the question? As I understood from your post - everything is working fine.
You made template for request and it fills description field on creation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The description is overwritten with the original pre-populated text and does not get saved.
Thanks
Sunita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please see above, I have added additional details in the above question
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, got it.
It looks like, that you have additional automation rule, that rewrites user changes.
It can be easily checked - look at issue history, if there are entries, with information entered by user, and right after that another entry with changing it to default template, then you have to look at working listeners/workflow postfunctions/automation rules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.