Forum Discussion

hkhan's avatar
hkhan
Ideator I
5 years ago

Email Configuration

Can anyone help me with a sample email notification, with query which has a relationship to the item as well as html with a loop which displays that relationship. A good example can be of ECN to Affected items i.e. documents/

6 Replies

  • In order to keep everyone apprised of any updates made to a work item, the server can be set up to send out alert emails to the item's owner and any subscribers. The server can also be set up to send out invitations to users via email. This option is turned off by default. slope unblocked

  • Hkhan,

    If you expand a bit more what kind of loop you want, I'm sure I can point you in a more specific direction, but a query with a relationship might look something like the following:


    <AML>
        <Item type="ECN" action="get">
            <id>[ID]</id>
            <Relationships>
                <Item type="ECN Affected Item" action="get"/>
            </Relationships>
        </Item>
    </AML>

    You'd have to sort out exactly what information you want- the above is just going to dump most of the output on you- but my understanding is you've got that part and you're just looking for how to get at relationships. For queries which you want to go deeper and deeper, an alternative to nesting can be something like getting repeating items with the same structure. Take a look at the GetItemRepeatConfig instruction in this article, and let me know if that helps.

    Skyler C

    • kennedystewart's avatar
      kennedystewart
      Ideator I

      Thanks for your post. it helps me understand the problem better. I've done it already. I will be following more of your posts. geometry dash 

    • hkhan's avatar
      hkhan
      Ideator I

      Hello Skyler,

      I was trying to add Document Numbers in ECN Affected Item relationship. Hence i need to loop them somehow as they can be 1:many. do you know how can i do that?

      -Haider

      • Skyler_Crossman's avatar
        Skyler_Crossman
        Ideator I

        Ah, I think I have a solution- or rather, a previous labs member made one for us. The email form can't loop, but the query can run any available action, and actions can be custom methods- once you're in JavaScript, you can do all sorts of things, including writing the html yourself and returning that to the email. Take a look at this community project for an example that might get you most of the way there:  github.com/.../workflow-email-report.