I have created a workflow for a software project on Jira software. Can i create an approval process without using the service desk?
Hi Fumida!
At our organisation we've implemented this for our copy team, you do need the JSU plugin for this, I highly recommend this plugin, very useful.
1. Create a custom user picker field called 'Approver'
2. Create a transition called 'Approve' that leads to the desired status.
3. Add the condition 'User Is In Custom Field' and choose the 'Approver' field you created in step 1.
Might be other ways to achieve this, even without the add-on as well, but this is how we did it at least
Hope it helps!
Hi @Fumida Ashraf
Robin Flood's suggestion is one way to go about it, and as he mentioned you can also make use of the default conditions on your workflow to get this function.
1. Create a project role called approver and set the role to those who will approve the requests.
2. Put in a status called approval in your WF.
3. Put a condition on the outgoing transition from approval status called "User is in project Role" that restricts the transition to those in the role "Approver". This is a built-in condition, so no need of plug-ins.
That way only the approvers will be able to transition the issue.
Hope this helps!
Thank you for the suggestion. I tried this out but I am not able to see the button for transitions with the project role condition associated with them. Do you know what might be the issue here?
If you are unable to see the transition to where you have put in a condition, it means you are not allowed to perform the transition and the condition has turned out to be false.
Recheck if you are in the project role to which you restricted the condition to.
Hi,
As I'm currently in the testing phase, I am the only one in the project role to which the condition is restricted.
This is what we ended up doing.
Fantastic! This is very helpful! I will try to do it as well
I don't believe I have any special plug-ins for this, but I had downloaded a few ready-made workflows over time and I usually use them to copy statuses, transitions, and properties that I like into my own workflows. There's an approval button that I like very much. When you create a new status called Approval or Waiting for Approval, open Properties and add the following:
Property Key: approval.transition.approved
Property Value: 901
Property Key: approval.transition.rejected
Property Value: 911
Property Key: approval.condition.type
Property Value: number
Property Key: approval.condition.value
Property Value: 1
Property Key: approval.active
Property Value: true
Property Key: approval.field.id
Property Value: customfield_XXXXX
*Where the X's represent the custom field number of your custom Approver field. You can find the field number of your custom field in the URL of the edit or the configuration screen. Example: ...?customFieldId=XXXXX
Once you have set your properties accordingly, refresh your workflow draft page and click on the status. You will see a new checkbox called Add Approval with a link to configure next to it. Configure the the following:Get approves from: Your customer field for Approvers
Consider approved after: All approvals or n number of approvals.
Where to transition if approved or denied.
Hi @Elizabeth Huber, I'm new to Jira Software. I have no idea about properties other than these https://confluence.atlassian.com/adminjiraserver/workflow-properties-938847526.html properties.
I tried to follow the steps as you said but I don't see the Add Approval Checkbox. Could you please help to get this get this done.
I was under the impression following these steps will be the workaround for the issue https://jira.atlassian.com/browse/JRACLOUD-62053
Dear All,
Sorry, could you please clarify, how to make it work? What is condition and where and how to add it? What is user picker?
Does this apply to the customer portal side of approvals for Jira Service Desk?
I also guess the suggestion from @Elizabeth Huber relates to the Jira ServiceDesk Management (ServiceDesk)
In the JSM project you will find those properties when you setup the approval process - however I am afraid you can´t use it in the same way in Jira Software projects
But I find time will test this
After extensive googling and using the massive knowledge in this community, I put together a solution using SriptRunner which works much like the one in Service desk:
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.MutableIssueimport com.atlassian.jira.issue.fields.CustomFieldimport com.atlassian.jira.user.ApplicationUserCustomField approvers = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Approvers")CustomField approvals_pending = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Approvals pending")List users = issue.getCustomFieldValue(approvers) as Listif(users == null)return;issue.setCustomFieldValue(approvals_pending, users);
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.MutableIssueimport com.atlassian.jira.issue.fields.CustomFieldimport com.atlassian.jira.user.ApplicationUserApplicationUser user = ComponentAccessor.getJiraAuthenticationContext().getUser()CustomField approvers = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Approvals pending")//Delete userList users = new ArrayList <> ();for(ApplicationUser multiUseruser: (List) issue.getCustomFieldValue(approvers)){if(!multiUseruser.getKey().equals(user.getKey())){users.add(multiUseruser)}}issue.setCustomFieldValue(approvers, users);
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.MutableIssueimport com.atlassian.jira.issue.fields.CustomFieldimport com.atlassian.jira.user.ApplicationUserimport com.atlassian.jira.issue.ModifiedValueimport com.atlassian.jira.issue.util.DefaultIssueChangeHolderdef issue = event.issueCustomField approvers = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Approvers")CustomField approvals_pending = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Approvals pending")List users = issue.getCustomFieldValue(approvers) as Listif(users == null)return;approvals_pending.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(approvals_pending), users), new DefaultIssueChangeHolder())
@Kántor Tibor @Thank you for your time and effort for compiling all this data. However, is it possible you can make a video of this for those who can’t follow along textually. It really would be appreciated, help, and go a long way..
either way, thanks!!
I am a developer of Approval Path for Jira. It is a go-to solution for setting up the approval process. Is it available on marketplace: https://marketplace.atlassian.com/apps/1220490/approval-path-for-jira.
I think this is the most versatile and flexible solution for approval in Jira.
You can easily manage approvals,the approval process is presented very intuitively:
Also, there many more features like:
We provide a similar solution for Confluence:Approval Path for Confluence
@Krzysztof Bogdan Good day!Can you please tell me if notifications in the cloud work? I am testing this step, but notifications are not received in the mail. What am I doing wrong?
Thanks a lot!
Hello @CloudA@Cloud Accountplease reach us via or support portal here: https://warsaw-dynamics.atlassian.net/servicedesk/customer/portal/1
We will investigate this.
(Happy New Year!)
Hi @Krzysztof Bogdan
I am implementing the Approval Path for Jira. It works ok for User and Issue Field - User but for Issue field Group it doesn't not seem to acknowledge the approvals when Approve button is used. Reject works fine. Any known issues or is this a config problem?
Thanks
Kantor Tibor, Thank you for the detailed steps. I am trying to implement the same in Jira Cloud version using ScriptRunner for Jira Cloud. ScriptRunner for cloud using REST API, so the implementation is quite different that what you have and it seems the features are limited. Can you suggest ideas and answer to the question I had described here?
https://community.atlassian.com/t5/Jira-Software-questions/How-to-get-the-current-user-using-ScriptRunner-Jira-cloud-and/qaq-p/2064899?utm_source=dm&utm_medium=unpaid-social&utm_campaign=P:online*O:community*I:social_share*
@Kántor Tibor , Sorry didn't include your user id in my previous reply. See my reply above. It would be great if you could check my question and answer it
It looks like you're new here. Sign in or register to get started.