hiding tts-fields for users not in dedicated group

Issue #123 closed
Former user created an issue

we are just evaluating wether to use your plugin or Jira Servicedesk.

There is one problem where I couldn't find a solution yet.

We would like to show the customfields of the tts-plugin only to users of dedicated groups.

Using the field permissions of the tts plugin solves the Problem only partial, because only the values of the fields are hidden. The labels remain visible.

I already found out, that I can hide the fields with some java-script:

    <script type="text/javascript"> 
      target = document.getElementById('rowForcustomfield_12598'); 
      target.style.display='none'; 
    </script>

I think I will find out how to get the current user and his groupmemberships, to complete the java-script code to our needs.

What I don't know is where I have to put the code.

I found the footer jsp in .../includes/decorators/aui-layout/footer.jsp and this worked fine, when an issue is first displayed, but after editing some fields, the tts-customfields reappear. I think the footer is not send during the update, so my code can't run this time.

Can You please tell me where to put the javascript-code or how you would solve the problem otherwise?

We are running Jira 6.3.5 and tts-Version 5.4.1 scriptrunner 3.0.5 is also installed

Comments (5)

  1. Tuncay Senturk repo owner

    Hi,

    We will fix the problem within next release. But if it is urgent for you, you can place that code within .vm files.
    - Under plugins folder, you should see time-to-sla-plugin-5.4.1.jar file
    - You can open that file with a zip program, under templates/customfields/timetosla/view-timetoslas.vm file - You can place the code within this file before script section, after link section
    - You can also apply to other fields view.vm file

    Regards

  2. Log in to comment