Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

how to write a script on the field that is not available on all the form ? e.g. Reporter

Saqib Dar
Contributor
March 5, 2023 edited

Hi Community,

I hope you all are doing well.

how to write a script(Scriptrunner) on the field that is not available on all the form? e.g. Reporter

 

We are having a customer screen to create an issue for a service project on the customer portal.

same screen used by end customers and by our agents. 

For our agents, there is a Reporter field(request on behalf of) where they can open requests on the base of other customers. 

for our customer's reporter field is not available.

Now I wants to write some script based on reporter that whatever value is there it will return that value metadata. However, if this field is not available then I want to fetch meta data on base of logged in user.

how I can achieve this.

Thanks.

Regards, 

Saqib Dar

2 answers

0 votes
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 5, 2023

@Saqib Dar -

The "Reporter (raise an request on behalf of )" it is same issue's reporter field.  If the user (regardless of Agent or Customer) are granted with your project's permissions "Modify Reporter" right, then he/she will be able to switch the reporter value at the time of issue creation via the portal.

If the user are not given the above right, then he/she will not be able to see it on the portal UI during issue creation process.

So if is not quite clear to me on what you want to do with writing a script to obtain the reporter value.

Please advise.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

Saqib Dar
Contributor
March 5, 2023

@Joseph Chung Yin thanks for the reply.

For customer we are not consuming license they only have access to raise a request through customer portal. There is no reporter field on it for the users on customer portal (Modify reporter access to Service project customer - portal access) they are non license users.

Reporter field available for license users only.

In this case how I can add Reporter Field for customers.

Once i get this field on customer i will write some script to get meta data of users and set form value from these meta data.

Thanks.

Regards,

Saqib Dar 

Jira Technical Consultant

Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 5, 2023

@Saqib Dar -

I understand that customer access to the portal is not using a license, that what I was trying to refer.  So you want to achieve the ability for customers who want to specify that they submitting the issue for someone else?

If so, this will still not giving you the ability to set the issue reporter to someone else via a script in my opinion for the form setup.

At a high level - the only thing I can think of is for you to create a custom field which allows the customers to specify, then your script can then access the custom field (inputted by the customer) on the backend after the issue is created via the portal and change the created issue's reporter value afterward.

Hope this makes sense.

Best, Joseph

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2023

What app are you using to write scripts?

Saqib Dar
Contributor
March 5, 2023

Scriptrunner

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Upcoming Jira Service Management Events