Basicly i want people to be able to upload a file into a ticket. Once that is done it should get a status "pending" or whatever is handy in that case untill a admin of that project comes and says "approved" on which the workflow will execute a command line (shell) script with the contents of the attachments.
For approval i've seen https://answers.atlassian.com/questions/158793/workflow-with-approval-s and for the execution https://marketplace.atlassian.com/plugins/com.pawelniewiadomski.devs.jira.automat (or bob's plugin?)
Only how to get the attachments on the commandline is something i have no clue to go about.
Any thoughts on this is appreciated.
Or, if you want a plugin that has everything inside, try this one: https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.jjupin
Example of an approval workflow: http://confluence.kepler-rominfo.com/display/TR/Start+progress+on+an+issue+only+after+the+approval+of+project+manager
The sytem routine is here to help you as well: http://confluence.kepler-rominfo.com/display/SIL/system
Have fun, R.
Ok so one plugin to rule them all :)
But that still leaves me a bit blank on how to get the attachment. How can i use a script with the attachment from the commandline. I only see http://confluence.kepler-rominfo.com/display/SIL/attachFile attach a file to a issue but not extract.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm on the move, I will ask one of my colleague to respond you ....
In any case, check standard variable 'attachments' http://confluence.kepler-rominfo.com/display/SIL/Variable+Resolution
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.
The attachment should be runnable script itslef to be used with the system() routine.
The actual file is stored by default using its attachment id as name in <JIRA_HOME>/data/attachments/<project_key>/<issue_key>/<attachment_id>
You can use the sql routine to execute "select id from fileattachment where issueid = " + id
Note that if used within a post-function, the "id" variable used to generate the SQL statement is the issue id
Once you have the attachment id, you can generate the file path, copy it to a known folder, use the system() routine to make it executable (+x) and the system() routine again to execute it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'll give it a shot, not a 1.2.3. job but its clear from my point of view.
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.