3 answers
- 10-1
Hi Samip,
I believe the problem is in the following lines of your script:
if (replica.typeName != issue.type.name)
This isn't working as you'd expect, you can only use .typeName when you are creating a new issue, the replica's .typeName field is always empty. You should use the following:
if (replica.type.name != issue.type.name)
Let me know if this solves things for you.
Thanks,
André
- Samip K Banker
I had replica.type.name before but then it complained... so I changed to "replica.typeName". I know the script is going in the if loop as its hitting this exception in the if loop
//throw new IssueTrackerException("incomming issuetype = " + replica.typeName + " current issuetype = " + issue.type.name)
- Samip K Banker
Any update on this? we are going live in our project using Exalate mid next week and we are struggling to set this up.
~Samip
- André Leroy-Beaulieu Castro
Hi Samip,
Can you try this two things please:
- Show us how it fails using replica.type.name
- Replace your usage of Move.move(...) with Move.move(issue, issue.project.key, replica.type.name, replica.status.name)
If this doesn't seem to work, please open up a support ticket and I will assist you there, and when we get to the bottom of it I will post the final answer here
Thanks,
André
Add your comment... - 10-1
Andre:
After I added the groovy file I don't see any error but I don't see any transition happening.
Below is my code in the incoming Sync
..... some code before this..
//https://docs.idalko.com/exalate/display/ED/How+to+move+issues+automatically
if (replica.typeName != issue.type.name)
{
//throw new IssueTrackerException("incomming issuetype = " + replica.typeName + " current issuetype = " + issue.type.name)
Move.move(
//moveStatusMapping:
["Bug workflow" : ["Enhancement workflow" : ["New":"New","On Hold":"On Hold"] ] ],
true, //sameStatusIfNotInMapping
issue,
issue.project.key, // the key of the project where the issue is moved to here
replica.typeName // the name of the issue type where the issue is moved to
)
}
else
{
//do something else
}..... some code after this..
Do I need to put this code in specific place (top or bottom)? I do see other changes that are being send to are getting added to the issue... but issue type is not being changed. I also don't see error message in the exalate or Jira logs...
What am I doing wrong?
~Samip
- Samip K Banker
Any update on this.... we are currently blocked... any help is appreciated.
~Samip
Add your comment... - 10-1
Hi Samip,
Here is the Move.groovy script you need to add to your external scripts library
Thanks,
André
- Samip K Banker
Thanks. Let me try that out and let you know if it works.
Add your comment...
I came across this article and I am error when a issue moves from Bug to Task (issue Type)...
https://docs.idalko.com/exalate/display/ED/How+to+move+issues+automatically
Based on the error it suggests that "No such property: Move for class"...
Where can I get the helper class Move ?