I'm trying to resolve erroneous issues from broken Workflows via SIL Scripts.
I tried the following:
string issueKey = "ISSUE-193";
%issueKey%.resolutionID = 1;
%issueKey%.resolutionDate = currentDate();
Unfortunately, it doesn't update the resolutionDate. Any ideas on the correct format for the resolutionDate and how to set it in SIL?
Hello,
The resolutionDate field is a read-only field. You can find it in documentation:
https://confluence.cprime.io/display/SIL/Variable+resolution
You can not change it.
And you do not need to change it. It will be set to the currentDate, I suppose.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, the resolutionDate is not set when using %issueKey%.resolutionId = 1; for example.
I tried to raiseEvent the 'Issue Resolved' event, still no luck. This is rather unfortunate, the event should really be triggered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you on Cloud or Server? Could you provide your complete code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Or I will take your code like this:
string issueKey = "ISSUE-193";
%issueKey%.resolutionID = 1;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I tried exactly the code you posted and also something more elaborate like:
string issueKey = "ISSUE-149";
%issueKey%.resolution = "Gelöst.";
%issueKey%.resolutionId = 1;
raiseEvent("Generic Event", issueKey, currentUser());
raiseEvent("Issue Updated", issueKey, currentUser());
raiseEvent("Issue Resolved", issueKey, currentUser());
raiseEvent("Issue Closed", issueKey, currentUser());
I have no luck with the resolutionDate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you use Jira Cloud or Jira Server?
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.
Hello,
I tried your code and it worked for me.
You can use a code like this:
string issueKey = "ISSUE-149";
%issueKey%.resolution = "Gelöst";
And it should work. If it does not work, then try to change Gelost to the English analog as you can see in the issues->resolutions.
You can also use:
string issueKey = "ISSUE-149";
%issueKey%.resolutionId = 1;
But I believe that your id is wrong. The id of a resolution is a 5 digit number. You can find out the id of a resolution, if you go to issues -> resolutions and then hover your mouse over the edit button. You will see a url with the id of the resolution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Alexey,
just to clarify: when you set the resolution with SIL, ist the resolutiondate of the issue also updated? That's my problem. The resolutiondate stays null.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Daniel,
I asked the developers of the plugin. It is currently not possible to set the resolution date with Power Scripts
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.
If your problem is to fix resolution date to an specific date for N issues, there's way to do it with JSU Plugin
1. Create a transition (e.g. Fix Resolution) in your workflow to the same final status
2. Add a post function in this transition and choose "Update Any Field (JSU)"
3. Choose "Resolved" and set to the date you wish to change
4. Publish the workflow
Make sure this transition is not changing anything but the Resolved field and make sure this transition is going to the same final status. The problem with this is that every time you need to change the final date you need to change in the transition and re-publish the workflow.
Hope this can help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.