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

Atlassian Jira. Admin evolution. Part 8

Part 7

JSP pages

Never use JSP pages. There are multiple disadvantages:

  • you can easily introduce security bugs
  • there is no API checks that is why it is time consuming to develop such a solution
  • you need to restart Jira after every change introduced to a JSP page, which makes development very annoying and long
  • You will not have errors in the logs if your JSP file ran with an error or had errors in syntax.
  • You need to document your solution to make sure you do not loose your solution while restoring your Jira, moving your Jira to another server, updating your Jira server.

Well, then what to use?

Jira project for lookup tables

Let's remember why we needed the database table and JSP pages in the first place. We needed it to create and manage a lookup table which stores mapping between users and managers.

And a much better way which can be used in your Jira instance is to create a Jira project for the lookup table.

For example, we can create a user_managers project with issues like this:

Screenshot-2020-08-11-at-13.03.33.png

As you can see when I create an issue in the user_managers project, I need to provide the user and the manager. And after I create this issue you can consider that a new row has been added to a table.

The summary field is absent in the screen but ss you know the summary field is required for an issue, that is why Icreated a bit more of JS and added this JS to the announcement banner.

<script>
      setInterval(function(){ 
         $("input#summary").val("mapping");
         $("input#summary").parent().css("display", "None");
      }, 3000);
</script>

Now everything should work.

Yes, I successfully created two issues:

Screenshot-2020-08-11-at-13.35.15.png

So what do we have now? We have the user_managers project which stores information about users and managers and we can edit this project via UI. We will talk later how to access the data in this project. But for now we created a table and UI to manage it without a new Jira database table and JSP pages. And it was very fast and we did not use any black magic. Very nice!

We also had a requirement that only the lookup user could edit the data. And you have a very flexible Jira permission scheme to handle this requirement. Again very nice and clean solution.

But what is wrong with this solution?

The weakest link is the UI. UI is very robust. It is enough to manage the data but if your users want a more user friendly interface (lookup tables on other fields, wizards and so on), then you would need to change this solution or add a couple of plugins to this solution. We will talk about it later.

Part 9

1 comment

Comment

Log in or Sign up to comment
Taranjeet Singh
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 1, 2020

Nice work @Alexey Matveev !

TAGS
AUG Leaders

Atlassian Community Events