Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,768
Community Members
 
Community Events
165
Community Groups

Is there a drag and drop JIRA event for java script on the kanban board / rapid view?

Hello everyone,

 

we want to do some custom loading actions after editing a card or drag and drop a card on the kanban board / rapid view.

For the first problem we already found your event online:

JIRA.bind(JIRA.Events.INLINE_EDIT_SAVE_COMPLETE, function() {
//code
})

With this we can catch the event when a user has done some inline editing on the right hand side in the detail view on a field or customfield.

 

We are now looking for a JIRA event like this, so that we can catch the 'card dropped' event (to the next column).

Please let us know if there is any solution to this.

 

Thanks in advance and best regards,

Nicolai

2 answers

So we checked it. From our point of view to put the script into the workflow transitions is not the right place.

We want to add the information to the card while the page of the kanban board is loading in the browser.

I attached a mockup. On the card 'TISK-2' I added 3 circles on the bottom right hand side.additional_kanban_info.png

We want to load a user list based on a multi user customfield and show the avatars there like in Trello.

trello_screenshot.png

But when we drag&drop a card to another column, the info disappears. At that time we want to reload the whole page with the kanban board using location.reload().

0 votes

No, there's no javascript for this, but "drag issue from one column to another" is very much a workflow event, so you absolutely can hook into post-functions or transition automations.

Thanks for this hint. We will look for such a solution.

 

 

But I need to add the follwing information to understand what we want to do:

 

We are trying to add some additional information to each card on a kanban board at the runtime in the browser.

For this we use the Script Runner function 'Script Fragments' --> 'Show a web panel'.

The panel hast the location 'com.atlassian.jira.plugin.headernav.left.context'. (later we hide it via CSS).

In the provider class/script we use the writer.write() function to add javascript and CSS code.

In the javascript section we then check if we are on the respective kanban board and then we run our code to add the additional information to each card.

As these additional information will only show on a reload of the page we need to catch several cases to make sure the additional information is showing correctly all the time.

E.g. when the user is performing an inline edit in the detail view on the right hand side (mentioned above in the first post) the reason 'JIRA.CONTENT_ADDED_REASON.panelRefreshed' fires and we reload the page 1 second delayed.

When a user is performing a drag and drop of a card to another column, the additional information disappears again. This is the moment when we want to reload the page again.

For now we created our own drag and drop events (over mousedown & mouseup checking the distance between page.X and page.Y). But this is not appropriate coding...

 

BR,

Nicolai

Ok, so I would recommend removing your code, as it's not doing much of any use, and can't then put scripts into the workflow transitions.

Please check the above new post.

It's the same answer.  Stop botching this with Javascript and do it properly, with a post-function, listener or automation.  It's what they are for.

But what does such a solution with the post-functions, listeners or automations look like?

How can we get not standard/additional information on a card on the kanban board?

Can you please provide more information?

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you