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
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.
We want to load a user list based on a multi user customfield and show the avatars there like in Trello.
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().
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.