Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Getting the milestone version in a custom defect plugin


#1

Hello,

Is it possible to access to the milestone version in a custom defect plugin ?

Thanks in advance


#2

In fact, it is the milestone version of the run test.


#3

Hello,

We don’t currently include the milestone details for a test run in the context information that we pass to the defect plugins. We will consider adding this information in the future. If this is a critical detail for you, it would theoretically be possible to query this directly in the database.

Thanks,
Dennis


#4

Hello,

I know that it possible to get it in the database.
But my idea is :

  • I’m giving the name of the version, that I test, to the milestone to have a link between the version Id in Redmine and TestRail in the defect plugin.

Regards


#5

Hello,

When I meant querying the value in the database, I actually meant that you could do such a query from a defect plugin in order to find the milestone (name) for a test run through the database. We don’t currently use direct database queries in the defect plugin to make it more robust for future updates, so we only recommend doing this if this is a critical feature for you.

Thanks,
Dennis


#6

Thanks a lot,
I will try this way.

It can help me for access to other informations like separated steps,…

Bertrand


#7

Hi Bertrand,

you can actually access the steps via the $context variable:

$context[‘tests’][0]->case->custom_

The data is stored in JSON format though so you would need to unpack it via the json::decode() method first.

I hope this helps.

Thanks,
Dennis


#8

Thanks Dennis,

This helps me, I can find custom_step_results, that I passed to Redmine

Sbert


#9

Glad to hear that this worked for you. Just let me us know if there’s anything else you need.

Thanks,
Dennis