How to Hide Status in Customer Portal View

Sam February 22, 2021

Is there a way to hide the status for a non-licensed customer in Jira Service Management Server? For instance, in the attached image, is there a way to completely remove the status with a red "X" over it?

image.png

Would there be a way to hide the "Status" column of the below image as well?

image.png

 

2 answers

1 accepted

1 vote
Answer accepted
Sam February 22, 2021

I ended up using ScriptRunner Fragments to solve this problem. I created a custom Web Panel that would display in the "servicedesk.portal.footer.view_request" section with the following code:

if(context.requestTypeId.toString().equals("67")) {
writer.write('''
<script>
require(['jquery'],function($) {
$('.rw_request_status').remove();
})
</script>
''')
}

This ensures that when the customer looks directly at the form, they don't see a status at all:

image.png

To make sure the status is hidden in the "My Requests" section, I added another Web Panel under the "servicedesk.portal.subheader.my_requests" location, this time with the code:

writer.write('''
<script>
require(['jquery'],function($) {
$('.rw_table_row').each(function(index, value) {
$(this).find('.rw_item_text').each(function() {
if($(this).text()==="Hide status for this request type") {
$('.rw_table_row').eq(index).find('.rw_request_status').remove();
}
})
})
})
</script>
''')

This will go through the rows of requests, checks to see if there's a cell with text equal to the request type you want to hide statuses, and subsequently removes that status for the row. See below:

image.png 

However, there is one limitation to this approach:

Users can still see the status of an issue if they export the results as a csv! That's the closest I've come to a solution to this problem, however. If anyone knows of a way to block statuses from a csv import, that would be very helpful and much appreciated!

2 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 22, 2021

Hi @Sam 

It's not possible as of now. But we can replace how it can be shown to the customer.

This may help. Please check this.

https://support.atlassian.com/jira-service-management-cloud/docs/customize-the-workflow-statuses-for-a-request-type/

Thanks,
Pramodh

Sam February 22, 2021

Hi @[deleted] , thank you for the suggestion. This isn't quite what I needed, but it is still very helpful to know. I actually was able to find another way using ScriptRunner; I'll post what I did in another comment.

Like Pramodh M likes this

Suggest an answer

Log in or Sign up to answer